mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-08 02:04:04 +08:00
fixed: 管理员人员编辑
This commit is contained in:
parent
1ea456bdcf
commit
a231e7e6a0
@ -130,6 +130,8 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||
public void updateWithRoleIds(AdminUser user, String name, String email, String password, Integer isBanLogin, Integer[] roleIds) throws ServiceException {
|
||||
AdminUser updateAdminUser = new AdminUser();
|
||||
updateAdminUser.setId(user.getId());
|
||||
updateAdminUser.setName(name);
|
||||
updateAdminUser.setIsBanLogin(isBanLogin);
|
||||
|
||||
if (!user.getEmail().equals(email)) {//更换了邮箱
|
||||
if (emailExists(email)) {
|
||||
@ -142,14 +144,6 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||
updateAdminUser.setPassword(HelperUtil.MD5(password + user.getSalt()));
|
||||
}
|
||||
|
||||
if (!user.getName().equals(name)) {//更换了姓名
|
||||
updateAdminUser.setName(name);
|
||||
}
|
||||
|
||||
if (!user.getIsBanLogin().equals(isBanLogin)) {
|
||||
updateAdminUser.setIsBanLogin(isBanLogin);
|
||||
}
|
||||
|
||||
updateById(updateAdminUser);
|
||||
|
||||
resetRelateRoles(user, roleIds);
|
||||
|
Loading…
x
Reference in New Issue
Block a user