2021与蓝度共同重构项目,服务端
liuhaonan
2022-03-09 ed037879103f9051f9f7381f02f9d93dc681ea42
ximon-admin/src/main/java/com/sandu/ximon/admin/service/RoleService.java
@@ -148,6 +148,11 @@
        if (role == null) {
            throw new BusinessException("找不到角色");
        }
        //超级管理员不能删除
        if(RoleLevelStatus.SUPER.getCode().equals(role.getLevel())){
            throw new BusinessException("当前角色为超级管理员,无法删除");
        }
        assertLevels(role.getLevel());
        List<AdminRoleRelation> list = adminRoleRelationService.list(Wrappers.lambdaQuery(AdminRoleRelation.class).eq(AdminRoleRelation::getRoleId, role));
        if (CollectionUtil.isNotEmpty(list)) {