Commit 0a3ad6fa by 孙昱

Merge branch 'feature/20201112_套餐价格计算_yu.sun' into qa

parents 637a27cb bcadd874
......@@ -510,6 +510,8 @@ public class ShoppingCartConvertAdapter {
// 应产品要求
// 普通商品,取商品的finalePrice(普通商品售价);套餐商品,取originalPrice(套餐价格)
if (ObjectUtils.equals(com.freemud.sdk.api.assortment.shoppingcart.constant.GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType(), cartGoods.getGoodsType())){
int price = (null == cartGoods.getProductGroupList() ? 0 : cartGoods.getProductGroupList().stream().mapToInt(t->(null == t.getOriginalPrice() ? 0 : t.getOriginalPrice().intValue()) *t.getQty()).sum()) +
cartGoods.getOriginalPrice().intValue();
productType.setPrice(null == cartGoods.getOriginalPrice() ? 0 : cartGoods.getOriginalPrice().intValue());
}else{
productType.setPrice(cartGoods.getFinalPrice() == null ? 0 : cartGoods.getFinalPrice().intValue());
......
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