From c044b6dd024b6884a4f39bc56e4873c95b13fe02 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 22 八月 2019 11:59:00 +0800
Subject: [PATCH] 免单更改

---
 fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java b/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java
index 5d1eb3e..1f3f905 100644
--- a/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java
+++ b/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java
@@ -13,6 +13,7 @@
 import com.yeshi.fanli.entity.jd.JDOrder;
 import com.yeshi.fanli.exception.jd.JDOrderException;
 import com.yeshi.fanli.service.inter.jd.JDOrderService;
+import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.RedisManager;
 import com.yeshi.fanli.util.cmq.JDOrderCMQManager;
 import com.yeshi.fanli.util.jd.JDApiUtil;
@@ -57,15 +58,15 @@
 	 */
 	@Scheduled(cron = "0 0/1 * * * ? ")
 	public void updateSoonOrder() {
-		// if (!Constant.IS_TASK)
-		// return;
+		if (!Constant.IS_TASK)
+			return;
 		long now = System.currentTimeMillis();
 
 		JDOrderResult result = JDApiUtil.getOrderList(1, 200, new Date(now), JDApiUtil.ORDER_TYPE_CREATETIME);
 		if (result != null && result.getOrderList() != null)
 			saveJDOrders(result.getOrderList());
 		// 鏌ヨ涓婁釜灏忔椂鐨�
-		result = JDApiUtil.getOrderList(1, 200, new Date(now - 1000 * 60 * 60 * 24L), JDApiUtil.ORDER_TYPE_CREATETIME);
+		result = JDApiUtil.getOrderList(1, 200, new Date(now - 1000 * 60 * 60L), JDApiUtil.ORDER_TYPE_CREATETIME);
 		if (result != null && result.getOrderList() != null)
 			saveJDOrders(result.getOrderList());
 	}
@@ -75,8 +76,8 @@
 	 */
 	@Scheduled(cron = "0 0/10 * * * ? ")
 	public void updateUpdateOrder() {
-		// if (!Constant.IS_TASK)
-		// return;
+		if (!Constant.IS_TASK)
+			return;
 		List<JDOrder> jdOrderList = new ArrayList<>();
 		int pageSize = 200;
 		int page = 1;

--
Gitblit v1.8.0