From 18e446083d91e85568fdf1f0d7907e2f94c9ca08 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:16:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=96=E6=B6=88=E5=88=B8=E7=BD=AE?= =?UTF-8?q?=E7=A9=BA=E7=9B=B8=E5=85=B3=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/PayService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java index d91214f..5b69020 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -504,7 +504,7 @@ public class PayService { static void returnCoupon(TbOrderInfo orderInfo, TbShopCouponService shopCouponService, MpCashierCartMapper cashierCartMapper) { if (StrUtil.isNotBlank(orderInfo.getCouponInfoList())) { - OrderCouponInfoDTO couponInfoDTO = JSONObject.parseObject(orderInfo.getCouponInfoList(), OrderCouponInfoDTO.class); + OrderInfoCouponInfoDTO couponInfoDTO = JSONObject.parseObject(orderInfo.getCouponInfoList(), OrderInfoCouponInfoDTO.class); // 券返还 if (!couponInfoDTO.getOutRecordList().isEmpty()) { couponInfoDTO.getOutRecordList().forEach(item -> { @@ -512,6 +512,8 @@ public class PayService { }); shopCouponService.refund(couponInfoDTO.getOutRecordList()); couponInfoDTO.setOutRecordList(new ArrayList<>()); + couponInfoDTO.setProductCoupon(new ArrayList<>()); + couponInfoDTO.setFullReductionCoupon(new ArrayList<>()); orderInfo.setCouponInfoList(JSONObject.toJSONString(couponInfoDTO)); orderInfo.setUserCouponId(null); orderInfo.setUseCouponInfo(null);