Commit 8b2c3915 by 查志伟

修复购物车不能带券加车的问题

parent aab02add
...@@ -97,6 +97,12 @@ public class ProductServiceImpl implements ProductService { ...@@ -97,6 +97,12 @@ public class ProductServiceImpl implements ProductService {
//非法商品(商品是否存在、商品是否处于上架状态)自动移除,返回前端提示 //非法商品(商品是否存在、商品是否处于上架状态)自动移除,返回前端提示
boolean hasChange = false; boolean hasChange = false;
for (CartGoods cartGoods :checkCartRequest.getCartGoodsList()) { for (CartGoods cartGoods :checkCartRequest.getCartGoodsList()) {
// 当goodsId为空或商品是商品券时直接跳过
if (StringUtils.isEmpty(cartGoods.getGoodsId()) || Objects.equals(cartGoods.getGoodsType(), GoodsTypeEnum.COUPON_GOODS.getGoodsType())
|| Objects.equals(cartGoods.getGoodsType(), GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType())
|| Objects.equals(cartGoods.getGoodsType(), GoodsTypeEnum.BUY_M_SEND_N_COUPON.getGoodsType())) {
continue;
}
if (!successMap.containsKey(cartGoods.getCartGoodsUid())){ if (!successMap.containsKey(cartGoods.getCartGoodsUid())){
hasChange = true; hasChange = true;
cartGoods.setCartGoodsUid(null); cartGoods.setCartGoodsUid(null);
......
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