|
@@ -289,7 +289,8 @@ public class UserController {
|
|
|
@ApiParam(value = "滑动验证数值",required = false) @RequestParam(required = false) String vrifyCode
|
|
|
) throws Exception {
|
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
|
|
|
- Integer count = userService.lambdaQuery().eq(User::getMobile, phone).eq(User::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId()).count();
|
|
|
+ Integer count = userService.lambdaQuery().eq(User::getMobile, phone).eq(User::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId())
|
|
|
+ .ne(User::getUserId,currentCompanyWechat.getUserId()).count();
|
|
|
if(count > 0){
|
|
|
throw new RemoteServiceException("手机号已被绑定,请勿重复绑定");
|
|
|
}
|
|
@@ -316,6 +317,22 @@ public class UserController {
|
|
|
return ResponseHelper.success();
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("phone/upBind")
|
|
|
+ @ApiOperation("修改绑定手机号")
|
|
|
+ public ResponseHelper upBind(
|
|
|
+ @ApiParam(value = "手机号码",required = true) @RequestParam String phone,
|
|
|
+ @ApiParam(value = "短信验证码",required = true) @RequestParam String code
|
|
|
+ ){
|
|
|
+
|
|
|
+ smsLogic.checkSmsCode(phone, code);
|
|
|
+
|
|
|
+
|
|
|
+ //User user = userService.lambdaQuery().eq(User::getMobile, phone).last("limit 1").one();
|
|
|
+ //授权手机号后检查是否有预设置的师傅身份信息
|
|
|
+ userLogic.upBind(phone);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("open/bindOpenId")
|
|
|
@ApiOperation("绑定手机号")
|
|
|
public ResponseHelper bindOpenId(
|