Commit a5ed495f by 刘鹏飞

coco点餐页购物车行价格商品现单价不做二次编辑

parent 9d13cb3a
......@@ -356,13 +356,15 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
product.setGoodsId(null);
}
// 商品的单价 = 商品单价+小料单价
product.setOriginalPrice(originalPrice);
// 商品现单价 = 商品现单价+小料现单价
log.info("coco日志,smallMaterialOriTotal:{}",smallMaterialOriTotal);
log.info("coco日志,setFinalPrice:{}",product.getFinalPrice());
smallMaterialOriTotal = smallMaterialOriTotal == null ? 0 : smallMaterialOriTotal;
product.setFinalPrice(new Long(smallMaterialOriTotal) + (product.getFinalPrice() == null ? 0L : product.getFinalPrice()));
// 如果是赠品行,这行的价格就不用算了
if(!gifeProductIds.contains(product.getGoodsId()) && product.getActivityType() != null){
// 商品的单价 = 商品单价+小料单价
product.setOriginalPrice(originalPrice);
// 商品现单价 = 商品现单价+小料现单价
smallMaterialOriTotal = smallMaterialOriTotal == null ? 0 : smallMaterialOriTotal;
product.setFinalPrice(new Long(smallMaterialOriTotal) + (product.getFinalPrice() == null ? 0L : product.getFinalPrice()));
}
newProducts.add(product);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment