|
@ -231,6 +231,16 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
return getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(),tableName,tokenDto.getUserId()); |
|
|
return getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(),tableName,tokenDto.getUserId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<GovMenuDTO> navDigitalCommunity(TokenDto tokenDto, String tableName) { |
|
|
|
|
|
tableName = getTableName(tableName); |
|
|
|
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); |
|
|
|
|
|
Map<Boolean, List<GovMenuEntity>> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus)); |
|
|
|
|
|
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class); |
|
|
|
|
|
List<GovMenuDTO> govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
|
|
|
return govMenuDTOS; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取客户,配置的 菜单信息 |
|
|
* 获取客户,配置的 菜单信息 |
|
|
* |
|
|
* |
|
@ -247,8 +257,7 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
return govMenuDTOS; |
|
|
return govMenuDTOS; |
|
|
} |
|
|
} |
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage(),tableName); |
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage(),tableName); |
|
|
Map<Boolean, List<GovMenuEntity>> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus)); |
|
|
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); |
|
|
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class); |
|
|
|
|
|
govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS,tableName); |
|
|
govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS,tableName); |
|
|
return govMenuDTOS; |
|
|
return govMenuDTOS; |
|
|