|
@@ -302,6 +302,10 @@ public class UserServiceImpl implements UserService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 修改手机号
|
|
// 修改手机号
|
|
|
|
|
+ User oldUser = userDao.findByMobile(newMobile);
|
|
|
|
|
+ if (oldUser != null) {
|
|
|
|
|
+ throw new VisibleError("该手机号已被注册");
|
|
|
|
|
+ }
|
|
|
user.setMobile(newMobile);
|
|
user.setMobile(newMobile);
|
|
|
user.setMobileValidCode((short) Status.AUTHENTICATED.getCode());
|
|
user.setMobileValidCode((short) Status.AUTHENTICATED.getCode());
|
|
|
|
|
|