From 3c35399750da60384a59db33d82c81f8dcd75981 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Wed, 18 Sep 2019 15:45:13 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8D=A1][=E4=BF=AE=E6=94=B9]:=E5=8D=A1?= =?UTF-8?q?=E6=9C=89=E6=95=88=E6=9C=9F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/iformall/domain/po/WxCoupon.java | 11 +++++++++++ .../com/iformall/service/impl/WxOrderServiceImpl.java | 4 ++-- 2 files changed, 13 insertions(+), 2 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 048917a67..8175d4c26 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java @@ -265,4 +265,15 @@ public class WxCoupon extends BaseEntity { return false; } + public boolean checkIsCard() { + if(type == null) { + return false; + } + + if(type == EnumCouponType.CARD_MULTIMCH.getCode()) { + return true; + } + return false; + } + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index b52f549cb..b02b5cfb6 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -644,7 +644,7 @@ public class WxOrderServiceImpl implements WxOrderService { if (coupon.getValidType().equals(EnumValidStatus.VALID_RANGE.getCode()) || coupon.getType().equals(EnumCouponType.COUPON_TINGCHE.getCode())) { valid_date = coupon.getValidEndDate(); - if (coupon.getSalePrice() > 0) { + if (coupon.getSalePrice() > 0 && !coupon.checkIsCard()) { // 有价券核销有效期不能大于分账过期时间 Date limit_date = DateUtils.getTimeAfterDays(limit_days, curr); if (valid_date.after(limit_date)) { @@ -652,7 +652,7 @@ public class WxOrderServiceImpl implements WxOrderService { } } } else { - if (coupon.getSalePrice() > 0) { + if (coupon.getSalePrice() > 0 && !coupon.checkIsCard()) { // 有价券核销有效期不能大于分账过期时间 if (coupon.getValidDays() < Constant.WX_LIMIT_DAYS) { limit_days = coupon.getValidDays();