| | |
| | | * 获取角色下的菜单 |
| | | */ |
| | | public List<Menu> listByRoleIds(List<Long> roleIdList) { |
| | | List<Long> menuIdList = roleMenuRelationService.list(Wrappers.lambdaQuery(RoleMenuRelation.class).in(RoleMenuRelation::getRoleId, roleIdList).select(RoleMenuRelation::getMenuId)) |
| | | List<Long> menuIdList = roleMenuRelationService.list(Wrappers.lambdaQuery(RoleMenuRelation.class) |
| | | .in(RoleMenuRelation::getRoleId, roleIdList).select(RoleMenuRelation::getMenuId)) |
| | | .stream().map(RoleMenuRelation::getMenuId).distinct().collect(Collectors.toList()); |
| | | if (CollectionUtil.isEmpty(menuIdList)) { |
| | | return null; |
| | |
| | | |
| | | Menu menu = new Menu(); |
| | | BeanUtils.copyProperties(param, menu); |
| | | menu.setType(one.getType()); |
| | | menu.setId(menuId); |
| | | return updateById(menu); |
| | | } |