Commit 02b311c6 by shuhu.hou@freemud.cn

修改校验套餐价格校验逻辑

parent f665486a
......@@ -59,7 +59,9 @@ public class ShoppingCartAdapter {
ValidateShopProductType productType = new ValidateShopProductType();
productType.setSpuId(cartGoods.getSpuId());
productType.setSkuId(ObjectUtils.equals(GoodsTypeEnum.SKU_GOODS.getGoodsType(), cartGoods.getGoodsType()) ? cartGoods.getSkuId() : cartGoods.getSpuId());
productType.setPrice(cartGoods.getOriginalPrice() == null ? 0 : cartGoods.getOriginalPrice().intValue());
// 应产品要求
// 普通商品,取商品的finalePrice(普通商品售价);套餐商品,取originalPrice(套餐价格)
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