diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java index 965459b77..8acdac6ee 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java @@ -68,10 +68,11 @@ public interface CombinationActivityConvert { List spuList) { PageResult pageResult = convertPage(page); Map spuMap = convertMap(spuList, ProductSpuRespDTO::getId); + Map> productMap = convertMultiMap(productList, CombinationProductDO::getActivityId); pageResult.getList().forEach(item -> { MapUtils.findAndThen(spuMap, item.getSpuId(), spu -> item.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()) .setMarketPrice(spu.getMarketPrice())); - item.setProducts(convertList2(productList)); + item.setProducts(convertList2(productMap.get(item.getId()))); // 设置统计字段 item.setGroupCount(groupCountMap.getOrDefault(item.getId(), 0)) .setGroupSuccessCount(groupSuccessCountMap.getOrDefault(item.getId(), 0))