|
@@ -2383,14 +2383,14 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
customerContractProductList.stream().collect(Collectors.groupingBy(ContractProduct::getProductId));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- List<ContractProduct> contractProductList = contractProductService.list(q -> q
|
|
|
- .in(ContractProduct::getProductId, pIds)
|
|
|
- .orderByDesc(ContractProduct::getCreateTime)
|
|
|
- .orderByDesc(ContractProduct::getId)
|
|
|
- .last("LIMIT 20")
|
|
|
+
|
|
|
+ List<ContractProductVo> contractProductList = baseMapper.getProductPriceInfo(IWrapper.getWrapper()
|
|
|
+ .in("cp.product_id", pIds)
|
|
|
+ .orderByDesc("c.create_time")
|
|
|
+ .orderByDesc("c.id")
|
|
|
+ .last("LIMIT 3")
|
|
|
);
|
|
|
- Map<Long, List<ContractProduct>> contractProductMap =
|
|
|
+ Map<Long, List<ContractProductVo>> contractProductMap =
|
|
|
contractProductList.stream().collect(Collectors.groupingBy(ContractProduct::getProductId));
|
|
|
|
|
|
|
|
@@ -2402,9 +2402,15 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
Long productInfoId = productInfo.getId();
|
|
|
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
+
|
|
|
data.put("price", ehsdJson.getPrice());
|
|
|
+ data.put("currency", ehsdJson.getCurrency());
|
|
|
+
|
|
|
data.put("costPrice", ehsdJson.getCostPrice());
|
|
|
+ data.put("costCurrency", ehsdJson.getCostCurrency());
|
|
|
+
|
|
|
data.put("customerContractProductList", customerContractProductMap.get(productInfoId));
|
|
|
+
|
|
|
data.put("contractProductList", contractProductMap.get(productInfoId));
|
|
|
|
|
|
reData.put(productInfoId, data);
|