| | |
| | | import com.xinquan.common.security.auth.AuthUtil; |
| | | import com.xinquan.common.security.service.TokenService; |
| | | import com.xinquan.common.security.utils.SecurityUtils; |
| | | import com.xinquan.meditation.api.feign.RemoteMeditationService; |
| | | import com.xinquan.system.api.domain.AppUser; |
| | | import com.xinquan.system.api.domain.SysMenu; |
| | | import com.xinquan.system.api.domain.SysRole; |
| | |
| | | private SysUserClient userClient; |
| | | @Resource |
| | | private RemoteAppUserService remoteAppUserService; |
| | | |
| | | @Resource |
| | | private RemoteMeditationService remoteMeditationService; |
| | | |
| | | /** |
| | | * 发送验证码 |
| | |
| | | } |
| | | if(type==3){ |
| | | AppUser data = remoteAppUserService.getUserByPhone(cellPhone).getData(); |
| | | if (data!=null){ |
| | | if (data==null){ |
| | | return R.fail("当前手机号未注册"); |
| | | } |
| | | } |
| | |
| | | @PostMapping("/app/register") |
| | | public R<AppLoginUser> appRegister(@RequestBody AppRegisterBody appRegisterBody) |
| | | { |
| | | System.err.println("controller传递的邀请人id"+(appRegisterBody.getInviteUserId()==null?"":appRegisterBody.getInviteUserId())); |
| | | // 用户注册 |
| | | AppLoginUser appLoginUser = sysLoginService.appRegister(appRegisterBody); |
| | | return R.ok(tokenService.createToken4AppLoginUser(appLoginUser)); |
| | |
| | | if (data.getUserStatus() == 2){ |
| | | return R.fail("您的账号已被冻结"); |
| | | } |
| | | return R.ok(tokenService.createToken4AppLoginUser(appLoginUser)); |
| | | AppLoginUser token4AppLoginUser = tokenService.createToken4AppLoginUser(appLoginUser); |
| | | System.err.println("微信登录token"+token4AppLoginUser.getAccessToken()); |
| | | return R.ok(token4AppLoginUser); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R<?> verifyCellPhone(@Validated @RequestBody AppVerifyCellPhoneBody body) { |
| | | AppLoginUser appLoginUser = sysLoginService.verifyCellPhone(body); |
| | | |
| | | return R.ok(tokenService.createToken4AppLoginUser( |
| | | appLoginUser)); |
| | | AppLoginUser token4AppLoginUser = tokenService.createToken4AppLoginUser(appLoginUser); |
| | | System.err.println("校验手机号token"+token4AppLoginUser.getAccessToken()); |
| | | return R.ok(token4AppLoginUser); |
| | | } |
| | | |
| | | /** |