|
@@ -1,5 +1,7 @@
|
|
|
package com.ruoyi.web.controller.weChat;
|
|
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.mapper.SysUserMapper;
|
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
|
import com.ruoyi.weChat.service.WeChatService;
|
|
import com.ruoyi.weChat.service.WeChatService;
|
|
@@ -23,8 +25,8 @@ public class WeChatController {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/getAccessToken")
|
|
@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
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/getOpenId")
|
|
@GetMapping("/getOpenId")
|
|
|
- public String getOpenId(String code) {
|
|
|
|
|
|
|
+ public AjaxResult getOpenId(String code) {
|
|
|
String openId=userService.setOpenId(code);
|
|
String openId=userService.setOpenId(code);
|
|
|
- return openId;
|
|
|
|
|
|
|
+ return AjaxResult.success("200",openId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|