fix: 取消券置空相关信息
This commit is contained in:
@@ -504,7 +504,7 @@ public class PayService {
|
|||||||
|
|
||||||
static void returnCoupon(TbOrderInfo orderInfo, TbShopCouponService shopCouponService, MpCashierCartMapper cashierCartMapper) {
|
static void returnCoupon(TbOrderInfo orderInfo, TbShopCouponService shopCouponService, MpCashierCartMapper cashierCartMapper) {
|
||||||
if (StrUtil.isNotBlank(orderInfo.getCouponInfoList())) {
|
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()) {
|
if (!couponInfoDTO.getOutRecordList().isEmpty()) {
|
||||||
couponInfoDTO.getOutRecordList().forEach(item -> {
|
couponInfoDTO.getOutRecordList().forEach(item -> {
|
||||||
@@ -512,6 +512,8 @@ public class PayService {
|
|||||||
});
|
});
|
||||||
shopCouponService.refund(couponInfoDTO.getOutRecordList());
|
shopCouponService.refund(couponInfoDTO.getOutRecordList());
|
||||||
couponInfoDTO.setOutRecordList(new ArrayList<>());
|
couponInfoDTO.setOutRecordList(new ArrayList<>());
|
||||||
|
couponInfoDTO.setProductCoupon(new ArrayList<>());
|
||||||
|
couponInfoDTO.setFullReductionCoupon(new ArrayList<>());
|
||||||
orderInfo.setCouponInfoList(JSONObject.toJSONString(couponInfoDTO));
|
orderInfo.setCouponInfoList(JSONObject.toJSONString(couponInfoDTO));
|
||||||
orderInfo.setUserCouponId(null);
|
orderInfo.setUserCouponId(null);
|
||||||
orderInfo.setUseCouponInfo(null);
|
orderInfo.setUseCouponInfo(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user