Commit 33268a08 by 刘鹏飞

coco订单详情展示的商品单价需要加上小料的价格

parent 340735c1
...@@ -178,20 +178,19 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService { ...@@ -178,20 +178,19 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
} }
product.setQty(1); product.setQty(1);
}
// 商品原单价=商品原单价+小料原单价 // 商品原单价=商品原单价+小料原单价
List<ProductVo> smallMaterial = product.getSetMaterialProducts(); List<ProductVo> smallMaterial = product.getSetMaterialProducts();
Long smallMaterialOriTotal = 0L; Long smallMaterialOriTotal = 0L;
if(smallMaterial != null && !smallMaterial.isEmpty()){ if(smallMaterial != null && !smallMaterial.isEmpty()){
for(ProductVo sm : smallMaterial){ for(ProductVo sm : smallMaterial){
smallMaterialOriTotal = smallMaterialOriTotal + sm.getOriginalPrice(); smallMaterialOriTotal = smallMaterialOriTotal + sm.getOriginalPrice();
}
} }
// 商品现单价 = 商品现单价+小料现单价
smallMaterialOriTotal = smallMaterialOriTotal == null ? 0 : smallMaterialOriTotal;
product.setOriginalPrice(smallMaterialOriTotal + (product.getOriginalPrice() == null ? 0L : product.getOriginalPrice()));
} }
// 商品现单价 = 商品现单价+小料现单价
smallMaterialOriTotal = smallMaterialOriTotal == null ? 0 : smallMaterialOriTotal;
product.setOriginalPrice(smallMaterialOriTotal + (product.getOriginalPrice() == null ? 0L : product.getOriginalPrice()));
} }
} }
......
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