1.新增或修改用户时用户名称,手机号码,邮箱的唯一性校验修改.
This commit is contained in:
parent
a551afffd1
commit
8ac17b9241
@ -232,7 +232,7 @@ public class SysUserServiceImpl implements SysUserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void checkUsernameUnique(Long id, String username) {
|
private void checkUsernameUnique(Long id, String username) {
|
||||||
if (StrUtil.isNotBlank(username)) {
|
if (StrUtil.isBlank(username)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SysUserDO user = userMapper.selectByUsername(username);
|
SysUserDO user = userMapper.selectByUsername(username);
|
||||||
@ -249,7 +249,7 @@ public class SysUserServiceImpl implements SysUserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void checkEmailUnique(Long id, String email) {
|
private void checkEmailUnique(Long id, String email) {
|
||||||
if (StrUtil.isNotBlank(email)) {
|
if (StrUtil.isBlank(email)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SysUserDO user = userMapper.selectByEmail(email);
|
SysUserDO user = userMapper.selectByEmail(email);
|
||||||
@ -265,11 +265,11 @@ public class SysUserServiceImpl implements SysUserService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkMobileUnique(Long id, String email) {
|
private void checkMobileUnique(Long id, String mobile) {
|
||||||
if (StrUtil.isNotBlank(email)) {
|
if (StrUtil.isBlank(mobile)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SysUserDO user = userMapper.selectByMobile(email);
|
SysUserDO user = userMapper.selectByMobile(mobile);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user