...
|
...
|
@@ -124,4 +124,21 @@ public class ProductHelpService { |
|
|
productInfo.setLeastPrice(leastPrice);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置商品维度的最高求购价
|
|
|
* @param productInfo
|
|
|
* @param goodsSizes
|
|
|
*/
|
|
|
public void setProductMosterPrice(ProductInfo productInfo, List<GoodsSize> goodsSizes) {
|
|
|
if (CollectionUtils.isEmpty(goodsSizes)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
List<BigDecimal> mosterPriceList = goodsSizes.stream().map(GoodsSize::getBidMosterPrice).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
if (!CollectionUtils.isEmpty(mosterPriceList)) {
|
|
|
BigDecimal mosterPrice = mosterPriceList.stream().max((p1, p2) -> (p1.compareTo(p2))).get();
|
|
|
productInfo.setMosterPrice(mosterPrice);
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|