From 1d20be8603a62bdd80b351b6a25735763a1c14db Mon Sep 17 00:00:00 2001 From: xhxu Date: Thu, 23 Mar 2023 14:49:31 +0800 Subject: [PATCH] //COUPON --- .../src/main/java/com/iformall/domain/po/WxCoupon.java | 4 ++-- .../java/com/iformall/service/impl/WxCardInfoServiceImpl.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java index a3f276fc5..e75cb230f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java @@ -120,9 +120,9 @@ public class WxCoupon extends TenantEntity { private Integer sendType; @io.swagger.annotations.ApiModelProperty(value="EnumCouponValidType 有效时间类型1.时间范围(valid_start_date,valid_end_date). 2领取后几日有效(valid_days)",name="validType") private Integer validType; - @io.swagger.annotations.ApiModelProperty(value="卷有效日期-开始",name="validStartDate") + @io.swagger.annotations.ApiModelProperty(value="券有效日期-开始",name="validStartDate") private Date validStartDate; - @io.swagger.annotations.ApiModelProperty(value="卷有效日期-结束",name="validEndDate") + @io.swagger.annotations.ApiModelProperty(value="券有效日期-结束",name="validEndDate") private Date validEndDate; @io.swagger.annotations.ApiModelProperty(value="自领取之日几日有效,(停车券当天有效)",name="validDays") private Integer validDays; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java index d44363ea1..3461c21cf 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java @@ -463,8 +463,10 @@ public class WxCardInfoServiceImpl implements WxCardInfoService { if(wxCoupon.getSubsidyNum() != null && wxCoupon.getSubsidyNum() > 0){ return new ResultData(ErrorCode.CARD_IS_NOT_RECHARGE.getCode(),"有补贴不支持充值"); } - Date currentDate = new Date(); + if(currentDate.after(wxCoupon.getValidEndDate())){ + return new ResultData(ErrorCode.CARD_IS_NOT_RECHARGE.getCode(),"卡已过期,不支持充值"); + } WxCardSpend record = new WxCardSpend(); record.updateTenantInfo(cardInfo);