feat 增加限制高级管理员不能停用
This commit is contained in:
parent
589cf8d31c
commit
48c153c4c7
|
|
@ -351,6 +351,12 @@ public class AdminServiceImpl implements IAdminService {
|
|||
.ne("id", updateValidate.getId())
|
||||
.last("limit 1")), "昵称已存在换一个吧!");
|
||||
|
||||
Admin admin = systemAuthAdminMapper.selectOne(new QueryWrapper<Admin>().eq("id", updateValidate.getId()).isNull("delete_time"));
|
||||
|
||||
if (admin.getRoot().equals(1) && updateValidate.getDisable().equals(1)) {
|
||||
throw new OperateException("超级管理员不能设为停用");
|
||||
}
|
||||
|
||||
Admin model = new Admin();
|
||||
|
||||
model.setId(updateValidate.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue