|
@@ -85,7 +85,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
throw new StatusException("角色不能为空");
|
|
throw new StatusException("角色不能为空");
|
|
}
|
|
}
|
|
if (domain.getRole().equals(Role.SUPER_ADMIN)) {
|
|
if (domain.getRole().equals(Role.SUPER_ADMIN)) {
|
|
- throw new StatusException("不能新增编辑超管");
|
|
|
|
|
|
+ throw new StatusException("不能新增超管");
|
|
}
|
|
}
|
|
if (!domain.getRole().equals(Role.SECTION_LEADER) && CollectionUtils.isNotEmpty(domain.getCourse())) {
|
|
if (!domain.getRole().equals(Role.SECTION_LEADER) && CollectionUtils.isNotEmpty(domain.getCourse())) {
|
|
throw new StatusException("只有科组长可关联科目");
|
|
throw new StatusException("只有科组长可关联科目");
|
|
@@ -96,6 +96,9 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
if (ue == null) {
|
|
if (ue == null) {
|
|
throw new StatusException("未找到用户");
|
|
throw new StatusException("未找到用户");
|
|
}
|
|
}
|
|
|
|
+ if (ue.getRoleId().equals(Role.SUPER_ADMIN.getId())) {
|
|
|
|
+ throw new StatusException("不能编辑超管");
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
if (getByLoginName(domain.getLoginName()) != null) {
|
|
if (getByLoginName(domain.getLoginName()) != null) {
|
|
throw new StatusException("登录名已存在");
|
|
throw new StatusException("登录名已存在");
|