mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-07 23:57:20 +08:00
feat 增加限制高级管理员不能停用
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user