Commit bfbfe9a7 by huiyang.chen

fix 购物车存在相同的商品券,先删除后添加

parent 829f2a7f
......@@ -227,7 +227,8 @@ public class ShoppingCartMCoffeeServiceImpl {
coupons.add(calculationDiscountCoupon);
}
if (StringUtils.isNotEmpty(couponCode) && couponCode.equals(cartGoods.getCouponCode())) {
throw new ServiceException(ResponseResult.SHOPPING_CART_COUPON_USED);
//使用券的是,如果购物车已经存在这个券,先清除,再添加
cartGoods.setQty(0);
}
//同样商品券不能使用
/* if (StringUtils.isNotEmpty(couponCode)&& StringUtils.isNotEmpty(cartGoods.getCouponCode()) && goodsId.equals(cartGoods.getGoodsId())) {
......
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