|
|
@ -42,6 +42,7 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
@ -208,9 +209,15 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
|
* @Date 15:51 2021-03-16 |
|
|
|
**/ |
|
|
|
private List<GovMenuDTO> getCustomerMenuList(String customerId, Integer type) { |
|
|
|
List<GovMenuDTO> govMenuDTOS = govMenuRedis.getCustomerMenuList(customerId,type); |
|
|
|
if (!CollectionUtils.isEmpty(govMenuDTOS)){ |
|
|
|
return govMenuDTOS; |
|
|
|
} |
|
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage()); |
|
|
|
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); |
|
|
|
return TreeUtils.buildTree(dtoList); |
|
|
|
govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
|
govMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS); |
|
|
|
return govMenuDTOS; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|