forked from github/cool-admin-java
fix: 用户名为空时后端也禁止修改邮箱
This commit is contained in:
@@ -51,6 +51,9 @@ public class AdminUserInfoController extends BaseController<UserInfoService, Use
|
||||
if (ObjUtil.isNotEmpty(before.getUsername())) {
|
||||
t.setUsername(null);
|
||||
}
|
||||
if (ObjUtil.isEmpty(before.getUsername())) {
|
||||
t.setEmail(null);
|
||||
}
|
||||
if (ObjUtil.isNotEmpty(t.getEmail()) && !ObjUtil.equals(t.getEmail(), before.getEmail())) {
|
||||
userInfoService.checkEmailUnique(t.getEmail(), id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user