Commit effccad2 by 周晓航

解决前人 留下的坑: 校验套餐商品的时候 会导致校验失败

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 4568d9fa
......@@ -582,6 +582,10 @@ public class ShoppingCartConvertAdapter {
? cartGoods.getSkuId() : cartGoods.getSpuId());
//fisherman 这里 商品服务校验需要商品原价, 不是购物车的 finalPrice
productType.setPrice(cartGoods.getOriginalPrice() == null ? 0 : cartGoods.getOriginalPrice().intValue());
if (Objects.equals(cartGoods.getGoodsType(), GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType())) {
// 套餐会出现商品组的情况,会导致 商品服务校验失败,商品服务不需要商品组的价格 坑B 所以只能取 套餐商品原价格
productType.setPrice(cartGoods.getFinalPrice() == null ? 0 : cartGoods.getFinalPrice().intValue());
}
productType.setValidatePrice(productType.getPrice() == 0 ? 0 : 1);
productType.setValidateAttribute(1);
productType.setValidateStatuses(Arrays.asList(2));
......
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