From e44d9fe136efff873a9fd997ef4453fab56d03e4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 17 Aug 2025 10:37:06 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E3=80=90mall=20=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E3=80=91=E4=BC=98=E6=83=A0=E5=8A=B5=E5=9C=A8=E2=80=9C=E9=A2=86?= =?UTF-8?q?=E5=8F=96=E4=B9=8B=E5=90=8E=E2=80=9D=E5=9C=BA=E6=99=AF=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E8=AE=A1=E7=AE=97=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/convert/coupon/CouponConvert.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/convert/coupon/CouponConvert.java b/yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/convert/coupon/CouponConvert.java index 0ac9c58da1..6af2f65cb5 100755 --- a/yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/convert/coupon/CouponConvert.java +++ b/yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/convert/coupon/CouponConvert.java @@ -30,7 +30,7 @@ public interface CouponConvert { CouponRespDTO convert(CouponDO bean); default CouponDO convert(CouponTemplateDO template, Long userId) { - CouponDO couponDO = new CouponDO() + CouponDO coupon = new CouponDO() .setTemplateId(template.getId()) .setName(template.getName()) .setTakeType(template.getTakeType()) @@ -44,13 +44,13 @@ public interface CouponConvert { .setStatus(CouponStatusEnum.UNUSED.getStatus()) .setUserId(userId); if (CouponTemplateValidityTypeEnum.DATE.getType().equals(template.getValidityType())) { - couponDO.setValidStartTime(template.getValidStartTime()); - couponDO.setValidEndTime(template.getValidEndTime()); + coupon.setValidStartTime(template.getValidStartTime()); + coupon.setValidEndTime(template.getValidEndTime()); } else if (CouponTemplateValidityTypeEnum.TERM.getType().equals(template.getValidityType())) { - couponDO.setValidStartTime(LocalDateTime.now().plusDays(template.getFixedStartTerm())); - couponDO.setValidEndTime(LocalDateTime.now().plusDays(template.getFixedEndTerm())); + coupon.setValidStartTime(LocalDateTime.now().plusDays(template.getFixedStartTerm())); + coupon.setValidEndTime(coupon.getValidStartTime().plusDays(template.getFixedEndTerm())); } - return couponDO; + return coupon; } CouponPageReqVO convert(AppCouponPageReqVO pageReqVO, Collection userIds);