|
@@ -91,7 +91,7 @@ public class CacheServiceImpl implements CacheService {
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(productInfos) && CollectionUtils.isNotEmpty(channelInfos) && CollectionUtils.isNotEmpty(distributeGroups) && CollectionUtils.isNotEmpty(channelGroups)) {
|
|
|
//通道产品 根据 通道id第一层 区域第二层 面额分第三层 进行分组
|
|
|
- Map<Long, Map<String, Map<Long, ChannelProductInfo>>> productListMap = productInfos.stream().filter(a -> a.getChannelId() != null && !StringUtils.isEmpty(a.getAreaNum()) && a.getStandardPrice() != null).collect(Collectors.groupingBy(ChannelProductInfo::getChannelId, Collectors.groupingBy(ChannelProductInfo::getAreaNum, Collectors.toMap(ChannelProductInfo::getStandardPrice, a -> a, (k1, k2) -> k2))));
|
|
|
+ Map<Long, Map<String, Map<Long, ChannelProductInfo>>> productListMap = productInfos.stream().filter(a -> a.getChannelId() != null && !StringUtils.isEmpty(a.getAreaNum()) && a.getFacePrice() != null).collect(Collectors.groupingBy(ChannelProductInfo::getChannelId, Collectors.groupingBy(ChannelProductInfo::getAreaNum, Collectors.toMap(ChannelProductInfo::getFacePrice, a -> a, (k1, k2) -> k2))));
|
|
|
//将产品挂载到通道上面
|
|
|
channelInfos.forEach(a -> a.setProductListMap(productListMap.get(a.getChannelId())));
|
|
|
//通道按分发组id进行分组
|