商品 价格字段
This commit is contained in:
@@ -251,7 +251,11 @@ public class TbProductServiceImpl implements TbProductService {
|
|||||||
if ("sku".equals(product.getTypeEnum())){
|
if ("sku".equals(product.getTypeEnum())){
|
||||||
if(tbProductSkus.size() > 1){
|
if(tbProductSkus.size() > 1){
|
||||||
BigDecimal maxPrice = tbProductSkus.stream().map(TbProductSku::getSalePrice).max(BigDecimal::compareTo).get();
|
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 {
|
}else {
|
||||||
productNewVo.setLowPrice("¥" +productNewVo.getLowPrice());
|
productNewVo.setLowPrice("¥" +productNewVo.getLowPrice());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user