mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【代码修复】MALL:拼团活动的商品拼接不正确的问题
This commit is contained in:
parent
743383faf2
commit
4959479ac6
@ -68,10 +68,11 @@ public interface CombinationActivityConvert {
|
|||||||
List<ProductSpuRespDTO> spuList) {
|
List<ProductSpuRespDTO> spuList) {
|
||||||
PageResult<CombinationActivityPageItemRespVO> pageResult = convertPage(page);
|
PageResult<CombinationActivityPageItemRespVO> pageResult = convertPage(page);
|
||||||
Map<Long, ProductSpuRespDTO> spuMap = convertMap(spuList, ProductSpuRespDTO::getId);
|
Map<Long, ProductSpuRespDTO> spuMap = convertMap(spuList, ProductSpuRespDTO::getId);
|
||||||
|
Map<Long, List<CombinationProductDO>> productMap = convertMultiMap(productList, CombinationProductDO::getActivityId);
|
||||||
pageResult.getList().forEach(item -> {
|
pageResult.getList().forEach(item -> {
|
||||||
MapUtils.findAndThen(spuMap, item.getSpuId(), spu -> item.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl())
|
MapUtils.findAndThen(spuMap, item.getSpuId(), spu -> item.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl())
|
||||||
.setMarketPrice(spu.getMarketPrice()));
|
.setMarketPrice(spu.getMarketPrice()));
|
||||||
item.setProducts(convertList2(productList));
|
item.setProducts(convertList2(productMap.get(item.getId())));
|
||||||
// 设置统计字段
|
// 设置统计字段
|
||||||
item.setGroupCount(groupCountMap.getOrDefault(item.getId(), 0))
|
item.setGroupCount(groupCountMap.getOrDefault(item.getId(), 0))
|
||||||
.setGroupSuccessCount(groupSuccessCountMap.getOrDefault(item.getId(), 0))
|
.setGroupSuccessCount(groupSuccessCountMap.getOrDefault(item.getId(), 0))
|
||||||
|
Loading…
Reference in New Issue
Block a user