From 41b6a18676adc835f460f9f6d766acebd96e52e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Mon, 25 Nov 2024 15:08:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E6=83=A0=E5=88=B8=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E4=B8=8D=E6=B6=88=E8=80=97=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/CartService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java index 160bd85..36a4fc2 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java @@ -1590,6 +1590,9 @@ public class CartService { } private void consumeCoupon(List outRecordList, Integer memberId, TbOrderInfo orderInfo) { + if (outRecordList.isEmpty()) { + return; + } boolean use = shopCouponService.use(Integer.valueOf(orderInfo.getShopId()), orderInfo.getId(), memberId, outRecordList); if (!use) { throw new MsgException("消耗券失败");