diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java index e2a3810eb..da2c017df 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -404,8 +404,7 @@ public class WxCouponServiceImpl implements WxCouponService { } else { return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "请填写有效时间类型"); } - if(!EnumCouponType.COUPON_DOUYIN.getCode().equals(record.getType()) - && !this.validCouponDate(record)) { + if(!this.validCouponDate(record)) { return new ResultData(ResultData.ERROR,"券有效使用日期必须在30天以内。"); } } @@ -1236,6 +1235,15 @@ public class WxCouponServiceImpl implements WxCouponService { //有价券开启了分账,必须在30天以内。,停车券,积分券,积分停车券,卡无次限制 @Override public boolean validCouponDate(WxCoupon wxCoupon) { + if(wxCoupon.getType().equals(EnumCouponType.COUPON_DOUYIN.getCode())){ + return true; + } + if(wxCoupon.getSalePrice() == 0){ + return true; + } + if(wxCoupon.checkIsCard()){ + return true; + } EnumPayShare isShare = EnumPayShare.NO; WxAppinfo appinfo = wxAppinfoService.getCouponAppInfo(wxCoupon); if (null == appinfo) {