| | |
| | | } |
| | | List<MenuMapping> menuMappingList = menuMappingService.selectList(new EntityWrapper<MenuMapping>().in("table_name", tableNameSet)); |
| | | List<String> menuIds = menuMappingList.stream().map(MenuMapping::getMenuId).collect(Collectors.toList()); |
| | | if (menuIds.isEmpty()) { |
| | | return Result.success(null); |
| | | } |
| | | LinkedHashSet<String> parentIdSet = new LinkedHashSet<>(menuIds); |
| | | Set<String> byParentId = menuService.getByParentId(parentIdSet); |
| | | |
| | | if (byParentId == null || byParentId.isEmpty()) { |
| | | return Result.success(null); |
| | | } |
| | | List<SysMenu> parentList = menuService.selectBatchIds(byParentId); |
| | | |
| | | return Result.success(parentList); |