商品 价格字段
This commit is contained in:
parent
edfaaa8c44
commit
6b75ca5ff9
|
|
@ -251,7 +251,11 @@ public class TbProductServiceImpl implements TbProductService {
|
|||
if ("sku".equals(product.getTypeEnum())){
|
||||
if(tbProductSkus.size() > 1){
|
||||
BigDecimal maxPrice = tbProductSkus.stream().map(TbProductSku::getSalePrice).max(BigDecimal::compareTo).get();
|
||||
productNewVo.setLowPrice("¥" +productNewVo.getLowPrice() + "~¥" + maxPrice);
|
||||
if (maxPrice.compareTo(new BigDecimal(productNewVo.getLowPrice())) == 0) {
|
||||
productNewVo.setLowPrice("¥" +productNewVo.getLowPrice());
|
||||
}else {
|
||||
productNewVo.setLowPrice("¥" +productNewVo.getLowPrice() + "~¥" + maxPrice);
|
||||
}
|
||||
}else {
|
||||
productNewVo.setLowPrice("¥" +productNewVo.getLowPrice());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue