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);