mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-02 07:01:47 +08:00
feat 后台修改手机号增加唯一校验
feat 移动端登录UI优化
This commit is contained in:
@@ -189,6 +189,13 @@ public class UserServiceImpl implements IUserService {
|
||||
if (!Pattern.matches("^[1][3-9][0-9]{9}$", value)) {
|
||||
throw new OperateException("手机号格式不正确!");
|
||||
}
|
||||
User uMobile = userMapper.selectOne(new QueryWrapper<User>()
|
||||
.eq("mobile", value)
|
||||
.isNull("delete_time")
|
||||
.last("limit 1"));
|
||||
if (StringUtils.isNotNull(uMobile) && uMobile.getId().equals(id) == false) {
|
||||
throw new OperateException("手机号已被其它账号绑定!");
|
||||
}
|
||||
user.setMobile(value);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user