From a4d6b24b1d22b9b1eae35ac1a209a73485ef2d80 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Thu, 9 Apr 2020 23:18:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=80=80=E6=AC=BE][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E9=80=80=E6=AC=BE=E5=87=BA=E9=94=99=E5=8A=A0=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=8F=8A=E5=8F=AA=E5=A4=84=E7=90=86180=E5=A4=A9?= =?UTF-8?q?=E5=86=85=E7=9A=84=E8=AE=A2=E5=8D=95=EF=BC=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=9B=B4=E4=B9=85=E7=9A=84=E4=B8=8D=E5=A4=84=E7=90=86=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/schedule/CouponOrderExpiringSchedule.java | 7 +++++++ .../src/main/resources/mapper/WxCouponOrderMapper.xml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java index eb34ae8e5..d66623d32 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java @@ -10,6 +10,7 @@ import com.iformall.mapper.*; import com.iformall.service.WxOrderService; import com.iformall.service.WxProfitSharingOrderService; import com.iformall.service.WxRefundOrderService; +import com.iformall.utils.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -120,6 +121,12 @@ public class CouponOrderExpiringSchedule { appinfo.setType(EnumAppType.B.getCode()); appinfo = wxAppinfoMapper.findList(appinfo).get(0); + Date limitDate = DateUtils.getTimeAfterDays(180, co.getCreateDate()); + if (limitDate.before(new Date())) { + // 系统只自动处理180天内的订单 + return; + } + try { wxRefundOrderService.createRefundOrder(appinfo, co.getId(), EnumPayType.PAY_AUTO_REFUND, null); } catch (MallinkException e) { diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index 4b55fdcfa..d30bbeb9d 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -538,12 +538,12 @@