权限校验

This commit is contained in:
ly19960718 2021-01-27 18:00:26 +08:00
parent 6fcd8e958d
commit 36cc4f8b4e

View File

@ -50,8 +50,10 @@ public class CardUserAppController extends AbstractController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@GetMapping("weiXinLoginBySmallRoutine"+ISystemConstant.RELEASE_SUFFIX+"/{vxCode}") @GetMapping("weiXinLoginBySmallRoutine"+ISystemConstant.RELEASE_SUFFIX+"/{vxCode}/{vxPhone}")
public SuccessResult weiXinLoginBySmallRoutine (@PathVariable("vxCode") String vxCode) throws Exception { public SuccessResult weiXinLoginBySmallRoutine(
@PathVariable("vxCode") String vxCode, @PathVariable("vxPhone") String vxPhone
) throws Exception {
WxApiUtil wxapi = new WxApiUtil(); WxApiUtil wxapi = new WxApiUtil();
WeiXinAuthResult austerest = wxapi.weiXinLoginGetAuth(vxCode, ISystemConstant.VX_APP_ID, ISystemConstant.VX_APP_SECRET, ISystemConstant.VX_GRANT_TYPE); WeiXinAuthResult austerest = wxapi.weiXinLoginGetAuth(vxCode, ISystemConstant.VX_APP_ID, ISystemConstant.VX_APP_SECRET, ISystemConstant.VX_GRANT_TYPE);
if (austerest == null) { if (austerest == null) {
@ -70,6 +72,8 @@ public class CardUserAppController extends AbstractController {
CardUserVO carduservo = new CardUserVO(); CardUserVO carduservo = new CardUserVO();
carduservo.setVxOpenId(austerest.getOpenid()); carduservo.setVxOpenId(austerest.getOpenid());
carduservo.setVxUnionId(austerest.getUnionid()); carduservo.setVxUnionId(austerest.getUnionid());
carduservo.setUserPhone(vxPhone);
carduservo.setUserName(vxPhone);
userId = cardUserService.saveCardUserReturnId(carduservo); userId = cardUserService.saveCardUserReturnId(carduservo);
userdto = cardUserService.getCardUserByVxOpenId(userId); userdto = cardUserService.getCardUserByVxOpenId(userId);
} }