Merge pull request #11 from shanzhiliu/master

1.新增或修改用户时用户名称,手机号码,邮箱的唯一性校验修改.
pull/2/head
芋道源码 2021-04-07 18:42:29 +08:00 committed by GitHub
commit bbf916e1e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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;
} }