|
@ -33,7 +33,7 @@ import com.epmet.dao.GovMenuDao; |
|
|
import com.epmet.dto.GovMenuDTO; |
|
|
import com.epmet.dto.GovMenuDTO; |
|
|
import com.epmet.entity.GovMenuEntity; |
|
|
import com.epmet.entity.GovMenuEntity; |
|
|
import com.epmet.enums.MenuTypeEnum; |
|
|
import com.epmet.enums.MenuTypeEnum; |
|
|
import com.epmet.feign.EpmetUserFeignClient; |
|
|
import com.epmet.redis.GovCustomerMenuRedis; |
|
|
import com.epmet.redis.GovMenuRedis; |
|
|
import com.epmet.redis.GovMenuRedis; |
|
|
import com.epmet.service.*; |
|
|
import com.epmet.service.*; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
@ -58,7 +58,7 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit |
|
|
@Autowired |
|
|
@Autowired |
|
|
private GovMenuRedis govMenuRedis; |
|
|
private GovMenuRedis govMenuRedis; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private EpmetUserFeignClient epmetUserFeignClient; |
|
|
private GovCustomerMenuRedis govCustomerMenuRedis; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private GovRoleMenuService govRoleMenuService; |
|
|
private GovRoleMenuService govRoleMenuService; |
|
|
@Autowired |
|
|
@Autowired |
|
@ -209,14 +209,14 @@ 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) { |
|
|
private List<GovMenuDTO> getCustomerMenuList(String customerId, Integer type) { |
|
|
List<GovMenuDTO> govMenuDTOS = govMenuRedis.getCustomerMenuList(customerId,type); |
|
|
List<GovMenuDTO> govMenuDTOS = govCustomerMenuRedis.getCustomerMenuList(customerId,type); |
|
|
if (!CollectionUtils.isEmpty(govMenuDTOS)){ |
|
|
if (!CollectionUtils.isEmpty(govMenuDTOS)){ |
|
|
return govMenuDTOS; |
|
|
return govMenuDTOS; |
|
|
} |
|
|
} |
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage()); |
|
|
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage()); |
|
|
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); |
|
|
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); |
|
|
govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
govMenuDTOS = TreeUtils.buildTree(dtoList); |
|
|
govMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS); |
|
|
govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS); |
|
|
return govMenuDTOS; |
|
|
return govMenuDTOS; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|