|
|
@ -491,9 +491,18 @@ public class MyController extends BaseController {
|
|
|
|
return Result.failed(StatusCode.USER_MOBILE_VERIFICATION_CODE_MISMATCH);
|
|
|
|
return Result.failed(StatusCode.USER_MOBILE_VERIFICATION_CODE_MISMATCH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
UserInfo userInfo = userInfoService.findById(userId);
|
|
|
|
UserInfo userInfo1 =userInfoService.findByMobile(loginReq.getMobile());
|
|
|
|
userInfo.setMobile(loginReq.getMobile());
|
|
|
|
UserInfo userInfo2 = userInfoService.findById(userId);
|
|
|
|
userInfoService.update(userInfo);
|
|
|
|
if (null != userInfo1) {
|
|
|
|
|
|
|
|
// 如果绑定的手机号已存在
|
|
|
|
|
|
|
|
userInfo1.setAppleId(userInfo2.getAppleId());
|
|
|
|
|
|
|
|
userInfoService.update(userInfo1);
|
|
|
|
|
|
|
|
userInfoService.deleteById(userId);
|
|
|
|
|
|
|
|
return Result.success();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
userInfo2.setMobile(loginReq.getMobile());
|
|
|
|
|
|
|
|
userInfoService.update(userInfo2);
|
|
|
|
return Result.success();
|
|
|
|
return Result.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|