Commit 28acd1fa by yu.sun

sunyu::fixbug::fix bug about material price NPE

parent 9ef3647c
......@@ -502,7 +502,7 @@ public class CalculationServiceImpl {
//单品、多规格加料
if(CollectionUtils.isNotEmpty(cartGoods.getProductMaterialList())){
for (CartGoods.MaterialGoods materialGoods : cartGoods.getProductMaterialList()){
materialPrice+= materialGoods.getFinalPrice() * cartGoods.getQty();
materialPrice+= (null != materialGoods.getFinalPrice() ? materialGoods.getFinalPrice() : 0) * (null != cartGoods.getQty() ? cartGoods.getQty() : 0);
}
}
return materialPrice;
......
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