ソースを参照

商品改造导致的财务导出问题

zouxuan 5 ヶ月 前
コミット
ee045f06a5

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -2834,7 +2834,7 @@ public class ExportServiceImpl implements ExportService {
                     .map(e -> e.getGoodsId().toString()).distinct().collect(Collectors.joining(",")));
             goodsList.addAll(goodsService.findGoodsByIds(sellOrders.stream().filter(e->e.getGoodsSkuId() != null)
                     .map(e -> e.getParentGoodsId().toString()).distinct().collect(Collectors.joining(","))));
-            goodsMap = goodsList.stream().collect(Collectors.toMap(Goods::getId, Function.identity()));
+            goodsMap = goodsList.stream().collect(Collectors.groupingBy(e -> e.getId(), Collectors.collectingAndThen(Collectors.toList(), v -> v.get(0))));
         }
 
         //获取订单详情