| | |
| | | return R.fail("当前手机号已被绑定"); |
| | | } |
| | | } |
| | | if(type==1){ |
| | | AppUser data = remoteAppUserService.getUserByPhone(cellPhone).getData(); |
| | | if (data!=null){ |
| | | return R.fail("当前手机号已注册"); |
| | | } |
| | | } |
| | | sysLoginService.sendCaptchaCode(cellPhone, type); |
| | | return R.ok(); |
| | | } |
| | |
| | | @PostMapping("/app/login") |
| | | public R<AppLoginUser> appLogin(@Validated @RequestBody AppLoginBody body) { |
| | | AppLoginUser appLoginUser = sysLoginService.appLogin(body); |
| | | Long appUserId = appLoginUser.getAppUserId(); |
| | | AppUser data = remoteAppUserService.getAppUserById(appUserId + "").getData(); |
| | | if (data.getUserStatus() == 2){ |
| | | return R.fail("您的账号已被冻结"); |
| | | } |
| | | return R.ok(tokenService.createToken4AppLoginUser(appLoginUser)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/app/captchaLogin") |
| | | public R<AppLoginUser> appCaptchaLogin(@Validated @RequestBody AppCaptchaBody body) { |
| | | AppLoginUser appLoginUser = sysLoginService.appCaptchaLogin(body); |
| | | Long appUserId = appLoginUser.getAppUserId(); |
| | | AppUser data = remoteAppUserService.getAppUserById(appUserId + "").getData(); |
| | | if (data.getUserStatus() == 2){ |
| | | return R.fail("您的账号已被冻结"); |
| | | } |
| | | return R.ok(tokenService.createToken4AppLoginUser(appLoginUser)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/app/wxLogin") |
| | | public R<AppLoginUser> thirdLogin(@Validated @RequestBody AppWXLoginBody body) { |
| | | AppLoginUser appLoginUser = sysLoginService.wxLogin(body); |
| | | Long appUserId = appLoginUser.getAppUserId(); |
| | | AppUser data = remoteAppUserService.getAppUserById(appUserId + "").getData(); |
| | | if (data.getUserStatus() == 2){ |
| | | return R.fail("您的账号已被冻结"); |
| | | } |
| | | return R.ok(tokenService.createToken4AppLoginUser(appLoginUser)); |
| | | } |
| | | |
| | |
| | | @RequestParam(value = "device", required = true) String device |
| | | ) { |
| | | AppLoginUser appLoginUser = sysLoginService.appleLogin(appleId,device); |
| | | Long appUserId = appLoginUser.getAppUserId(); |
| | | AppUser data = remoteAppUserService.getAppUserById(appUserId + "").getData(); |
| | | if (data.getUserStatus() == 2){ |
| | | return R.fail("您的账号已被冻结"); |
| | | } |
| | | return R.ok(tokenService.createToken4AppLoginUser(appLoginUser)); |
| | | } |
| | | |