|
@ -242,16 +242,15 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
* @Date 15:51 2021-03-16 |
|
|
* @Date 15:51 2021-03-16 |
|
|
**/ |
|
|
**/ |
|
|
private List<GovMenuDTO> getCustomerMenuList(String customerId, Integer type, String tableName,String userId) { |
|
|
private List<GovMenuDTO> getCustomerMenuList(String customerId, Integer type, String tableName,String userId) { |
|
|
/*List<GovMenuDTO> govMenuDTOS = govCustomerMenuRedis.getCustomerMenuList(customerId,type,tableName); |
|
|
List<GovMenuDTO> govMenuDTOS = govCustomerMenuRedis.getCustomerMenuList(customerId,type,tableName); |
|
|
if (!CollectionUtils.isEmpty(govMenuDTOS)){ |
|
|
if (!CollectionUtils.isEmpty(govMenuDTOS)){ |
|
|
return govMenuDTOS; |
|
|
return govMenuDTOS; |
|
|
}*/ |
|
|
} |
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage(),tableName); |
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage(),tableName); |
|
|
disposeGovMenu(menuList,userId); |
|
|
|
|
|
Map<Boolean, List<GovMenuEntity>> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus)); |
|
|
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> dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class); |
|
|
List<GovMenuDTO> govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
// govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS,tableName);
|
|
|
govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS,tableName); |
|
|
return govMenuDTOS; |
|
|
return govMenuDTOS; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|