过滤 menuId 1的
This commit is contained in:
@@ -152,6 +152,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
|
||||
// Step 2: 解析 apiInfo 并判断菜单是否已绑定
|
||||
for (BaseMenu menu : menuList) {
|
||||
if (menu.getMenuId() == 1L) {
|
||||
continue;
|
||||
}
|
||||
// 解析 apiInfo
|
||||
if (StrUtil.isNotBlank(menu.getApiInfo())) {
|
||||
List<MenuApiInfoItemDTO> itemDTOS = JSONArray.parseArray(menu.getApiInfo())
|
||||
@@ -177,6 +180,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
|
||||
List<SysMenu> matchedMenus = sysMenuService.list(wrapper);
|
||||
for (SysMenu matched : matchedMenus) {
|
||||
if (matched.getMenuId() == 1L) {
|
||||
continue;
|
||||
}
|
||||
long count = sysRolesMenusService.count(new QueryWrapper()
|
||||
.eq("menu_id", matched.getMenuId())
|
||||
.eq("role_id", roleId)
|
||||
|
||||
Reference in New Issue
Block a user