cloudroam
2024-09-11 ec34e9cac976a734b2116f2651376490ca3f10a0
src/main/java/com/mzl/flower/service/impl/coupon/CouponRecordServiceImpl.java
@@ -188,6 +188,8 @@
                        }
                    }
                    // 手动设置ID
                    couponRecordDO.setId(IdUtil.simpleUUID());
                    return baseMapper.insert(couponRecordDO)>0;
                } finally {
@@ -497,7 +499,7 @@
        // 查询订单使用的优惠券
        final CouponRecordDO couponRecordDO = getCouponByOrderId(orderId);
        if(null==couponRecordDO){
            throw new IllegalArgumentException("优惠券不存在,无法操作");
            return false;
        }
        log.info("优惠券退回之前:"+ JSON.toJSONString(couponRecordDO));
        couponRecordDO.setStatus(CouponUsedStatusEnum.UNUSED.getType());