Bladeren bron

研发打卡修改

anderx 2 jaren geleden
bovenliggende
commit
f5dece4b40
1 gewijzigde bestanden met toevoegingen van 6 en 4 verwijderingen
  1. 6 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/weChat/WeChatController.java

+ 6 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/weChat/WeChatController.java

@@ -1,5 +1,7 @@
 package com.ruoyi.web.controller.weChat;
 
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.system.mapper.SysUserMapper;
 import com.ruoyi.system.service.ISysUserService;
 import com.ruoyi.weChat.service.WeChatService;
@@ -23,8 +25,8 @@ public class WeChatController {
      * @return
      */
     @GetMapping("/getAccessToken")
-    public String getAccessToken() {
-        return weChatService.getAccessToken();
+    public AjaxResult getAccessToken() {
+        return AjaxResult.success("200",weChatService.getAccessToken());
     }
 
     /**
@@ -32,9 +34,9 @@ public class WeChatController {
      * @return
      */
     @GetMapping("/getOpenId")
-    public String getOpenId(String code) {
+    public AjaxResult getOpenId(String code) {
         String openId=userService.setOpenId(code);
-        return openId;
+        return AjaxResult.success("200",openId);
     }