From 8b937769bfdbbc32de56e654c2c532dfb4bd4c51 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Fri, 27 Dec 2024 11:20:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B1=87=E8=81=94=E9=80=9Adi?= =?UTF-8?q?stributorId=20=20=E5=8E=9F=E5=8F=82=E6=95=B0aNId4A3X=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BAorjuOND7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cweb/controller/goods/GoodsController.java | 10 ++++++++-- .../java/com/order/controller/notify/JdNotify.java | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) 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); } } + }