Browse Source

[卡][修改]:卡有效期修改

release_toaliyun_real
Stormeye Wu 6 years ago
parent
commit
3c35399750
2 changed files with 13 additions and 2 deletions
  1. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java

+ 11
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java View File

@@ -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;
}

}

+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java View File

@@ -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();


Loading…
Cancel
Save