|
|
|
@@ -95,10 +95,10 @@ public class MallUserInfoController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
if(checkUniqueName(userInfo.getUsername(), currentUser.getTenantId()) > 0){ |
|
|
|
return new ResultData(ErrorCode.USER_NAME_IS_FOUND,"用户名已存在"); |
|
|
|
return new ResultData(ErrorCode.USER_NAME_IS_FOUND.getCode(),"用户名已存在"); |
|
|
|
} |
|
|
|
if(checkUniquePhone(userInfo.getPhone(), currentUser.getTenantId()) > 0){ |
|
|
|
return new ResultData(ErrorCode.USER_PHONE_IS_FOUND,"手机号已存在"); |
|
|
|
return new ResultData(ErrorCode.USER_PHONE_IS_FOUND.getCode(),"手机号已存在"); |
|
|
|
} |
|
|
|
Assert.notNull(userInfo.getPassword(), "密码不能为空"); |
|
|
|
PasswordHelper passwordHelper = new PasswordHelper(); |
|
|
|
@@ -128,12 +128,12 @@ public class MallUserInfoController extends BaseController { |
|
|
|
MallUserInfo oldUser = userInfoService.getById(userInfo.getId()); |
|
|
|
if (!oldUser.getUsername().equals(userInfo.getUsername())) { |
|
|
|
if(checkUniqueName(userInfo.getUsername(), currentUser.getTenantId()) > 0){ |
|
|
|
return new ResultData(ErrorCode.USER_NAME_IS_FOUND,"用户名已存在"); |
|
|
|
return new ResultData(ErrorCode.USER_NAME_IS_FOUND.getCode(),"用户名已存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!oldUser.getPhone().equals(userInfo.getPhone())) { |
|
|
|
if(checkUniquePhone(userInfo.getPhone(), currentUser.getTenantId()) > 0){ |
|
|
|
return new ResultData(ErrorCode.USER_PHONE_IS_FOUND,"手机号已存在"); |
|
|
|
return new ResultData(ErrorCode.USER_PHONE_IS_FOUND.getCode(),"手机号已存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|