添加多规格商品价格最大值
This commit is contained in:
parent
dc176f6e46
commit
e823832cdb
|
|
@ -153,11 +153,17 @@ public class TbProductServiceImpl implements TbProductService {
|
|||
for (TbProduct product : page.getContent()) {
|
||||
//sku
|
||||
List<TbProductSku> tbProductSkus = tbProductSkuRepository.searchSku(product.getId().toString());
|
||||
|
||||
BigDecimal maxPrice=tbProductSkus.stream().map(TbProductSku::getSalePrice).max(BigDecimal::compareTo).get();
|
||||
log.info("maxPrice:{}",maxPrice);
|
||||
|
||||
List<TbProductSku> skuList = new ArrayList<>();
|
||||
TbProductVo tbProductVo = new TbProductVo();
|
||||
//sku,并且计算销量以及库存
|
||||
double stockNumber = 0.00;
|
||||
|
||||
tbProductVo.setMaxPrice(maxPrice);
|
||||
|
||||
if (product.getIsDistribute() == 1) {
|
||||
stockNumber = product.getStockNumber() == null ? 0 : product.getStockNumber();
|
||||
TbProductSku tbProductSku = null;
|
||||
|
|
|
|||
|
|
@ -219,6 +219,8 @@ public class TbProductVo {
|
|||
|
||||
private String skuSnap;
|
||||
|
||||
private BigDecimal maxPrice;
|
||||
|
||||
private TbPurchaseNotice notices=new TbPurchaseNotice();
|
||||
private List<TbCouponCategoryDto> groupCategoryId = new ArrayList<>();
|
||||
private List<TbPlatformDictDto> tags = new ArrayList<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue