Commit 370a4faf by yu.sun

sunyu::fix bug about combo-product calculate price

parent 5afe39ea
...@@ -72,7 +72,8 @@ public class SetMealCalculation { ...@@ -72,7 +72,8 @@ public class SetMealCalculation {
productGroupTotalAmount += productGroupAmount * cartGoods.getQty(); productGroupTotalAmount += productGroupAmount * cartGoods.getQty();
// 固定商品现总价 // 固定商品现总价
long productComboAmount = cartGoods.getProductComboList().stream().mapToLong(t -> t.getFinalPrice() * t.getQty()).sum(); long productComboAmount = cartGoods.getProductComboList().stream().mapToLong(t -> (null != t.getFinalPrice() ?
t.getFinalPrice():0) * (null != t.getQty() ? t.getQty():0)).sum();
long productComboTotalAmount = productComboAmount * cartGoods.getQty(); long productComboTotalAmount = productComboAmount * cartGoods.getQty();
long materialPrice = 0l; long materialPrice = 0l;
......
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