diff --git a/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java b/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java index 2210acc..c68991a 100644 --- a/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java +++ b/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java @@ -172,13 +172,19 @@ public class GoodsController { CouponDiscountGoodsRel discountGoodsRel = couponDiscountGoodsRel.stream().filter(s -> s.getSpecsId().equals(specs.getId())).findFirst().orElse(null); if (discountGoodsRel == null) { specs.setExt1("0"); + } else { + specs.setExt1("1"); } + + } } - // todo 删除没有绑定优惠券的 - goodsSpecs = goodsSpecs.stream().filter(s-> !s.getExt1().equals("0")).collect(Collectors.toList()); + if (discountId != null) { + // todo 删除没有绑定优惠券的 + goodsSpecs = goodsSpecs.stream().filter(s-> !s.getExt1().equals("0")).collect(Collectors.toList()); + } if (goodsSpecs.isEmpty()) { continue; diff --git a/order/src/main/java/com/order/controller/notify/JdNotify.java b/order/src/main/java/com/order/controller/notify/JdNotify.java index e2e0a86..39a01c5 100644 --- a/order/src/main/java/com/order/controller/notify/JdNotify.java +++ b/order/src/main/java/com/order/controller/notify/JdNotify.java @@ -50,4 +50,5 @@ public class JdNotify { log.error("WechatPayController --> wechatNotify() error!", e); } } + }