微信接口开发

This commit is contained in:
huangdeliang
2021-05-13 20:01:15 +08:00
parent 2e8e6d7b8d
commit 735296b0f9
6 changed files with 125 additions and 1 deletions

View File

@ -66,6 +66,8 @@ public class WechatAppletController extends BaseController {
private ISysOrderPauseService sysOrderPauseService;
@Autowired
private ISysDictTypeService iSysDictTypeService;
@Autowired
private IWechatAppletService iWechatAppletService;
/**
* 查询微信小程序中展示的客户案例
@ -472,6 +474,7 @@ public class WechatAppletController extends BaseController {
}
curWxUserInfo.setCustomerId(AesUtils.encrypt(curWxUserInfo.getCusId().toString()));
curWxUserInfo.setCusId(null);
// 并返回一系列登录后的数据
return AjaxResult.success(curWxUserInfo);
@ -530,6 +533,11 @@ public class WechatAppletController extends BaseController {
return request.getParameter("echostr");
}
@GetMapping("/getToken")
public String getToken(@RequestParam String appId) {
return iWechatAppletService.getAccessToken(appId);
}
}