From 4959479ac619256dc75ebe068ed1ce445fcd6735 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 21 Jul 2024 18:23:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91MALL=EF=BC=9A=E6=8B=BC=E5=9B=A2=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=9A=84=E5=95=86=E5=93=81=E6=8B=BC=E6=8E=A5=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../convert/combination/CombinationActivityConvert.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))