From e1a837b6e94ff206f9805b1fa6454d418fafec6f Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Tue, 22 Jan 2019 16:08:26 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A0=8D=E4=BB=B7=E5=88=B8][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9]:=E7=A0=8D=E4=BB=B7=E5=88=B8=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/schedule/OrderExpiringSchedule.java | 4 ++-- .../src/main/resources/mapper/WxOrderMapper.xml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java index b92595743..d2ba2213f 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java @@ -31,8 +31,8 @@ public class OrderExpiringSchedule { WxOrderService wxOrderService; - @Scheduled(cron = "0 */5 * * * *?") // 每5分钟检查一次 - //@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次 + //@Scheduled(cron = "0 */5 * * * *?") // 每5分钟检查一次 + @Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次 public void orderExpireSchedule() { Map dateMap = new HashMap(); diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index c0bb770ed..4317a72f9 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -135,10 +135,10 @@ AND type = #{type,jdbcType=TINYINT} - AND `create_date` > #{startDate,jdbcType=TIMESTAMP} + AND unix_timestamp(`create_date`) > unix_timestamp(#{startDate,jdbcType=TIMESTAMP}) - AND `create_date` < #{endDate,jdbcType=TIMESTAMP} + AND unix_timestamp(`create_date`) < unix_timestamp(#{endDate,jdbcType=TIMESTAMP}) @@ -146,15 +146,15 @@ select from wx_order - where order_status = 7 and press_end_date is not null + where press_end_date is not null and (order_status = 6 or order_status = 7) AND type = #{type,jdbcType=TINYINT} - AND `create_date` > #{startDate,jdbcType=TIMESTAMP} + AND unix_timestamp(`create_date`) > unix_timestamp(#{startDate,jdbcType=TIMESTAMP}) - AND `press_end_date` < #{endDate,jdbcType=TIMESTAMP} + AND unix_timestamp(`press_end_date`) < unix_timestamp(#{endDate,jdbcType=TIMESTAMP})