From 3824cbcaec6e6c67418d5280a53e9c2fedeef6f9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 11 七月 2019 16:34:13 +0800
Subject: [PATCH] 订单bug,分享爆款自购修改

---
 fanli/src/main/java/com/yeshi/fanli/job/UpdateDaTaoKeJob.java |   95 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 86 insertions(+), 9 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/job/UpdateDaTaoKeJob.java b/fanli/src/main/java/com/yeshi/fanli/job/UpdateDaTaoKeJob.java
index f13b5a0..71546a4 100644
--- a/fanli/src/main/java/com/yeshi/fanli/job/UpdateDaTaoKeJob.java
+++ b/fanli/src/main/java/com/yeshi/fanli/job/UpdateDaTaoKeJob.java
@@ -18,6 +18,7 @@
 import com.yeshi.fanli.log.LogHelper;
 import com.yeshi.fanli.service.inter.lable.QualityFactoryService;
 import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
+import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
 import com.yeshi.fanli.util.taobao.TaoBaoUtil;
@@ -34,7 +35,9 @@
 
 	@Resource
 	private DaTaoKeGoodsDetailService daTaoKeGoodsService;
-	
+
+	@Resource
+	private DaTaoKeGoodsDetailV2Service daTaoKeGoodsDetailV2Service;
 
 	/**
 	 * 闄愭椂绉掓潃 鏁版嵁鏇存柊
@@ -49,20 +52,20 @@
 		if (listTaoKe == null || listTaoKe.size() == 0) {
 			return;
 		}
-		
+
 		List<Long> listDaoKeId = new ArrayList<Long>();
-		for (DaTaoKeDetail daTaoKeDetail: listTaoKe) {
+		for (DaTaoKeDetail daTaoKeDetail : listTaoKe) {
 			listDaoKeId.add(daTaoKeDetail.getId());
 		}
-		
+
 		List<DaTaoKeDetail> listDetail = daTaoKeGoodsService.listByIds(listDaoKeId);
 		if (listDetail == null || listDetail.size() == 0) {
 			return;
 		}
-		
+
 		List<TaoBaoGoodsBrief> listgoods = new ArrayList<TaoBaoGoodsBrief>();
-		for (DaTaoKeDetail daTaoKeDetail: listDetail) {
-			listgoods.add( TaoBaoUtil.convert(daTaoKeDetail));
+		for (DaTaoKeDetail daTaoKeDetail : listDetail) {
+			listgoods.add(TaoBaoUtil.convert(daTaoKeDetail));
 		}
 
 		String formatDate = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date());
@@ -85,8 +88,8 @@
 		}
 	}
 
-	// 20鍒嗛挓鏇存柊涓�娆�
-	@Scheduled(cron = "0 0/20 * * * ? ")
+	// 1涓皬鏃舵洿鏂颁竴娆�
+	@Scheduled(cron = "0 0 0/1 * * ? ")
 	public void doSyncJob() {
 		if (!Constant.IS_TASK)
 			return;
@@ -104,4 +107,78 @@
 		}
 	}
 
+	// 姣忓ぉ鏃╀笂鍚屾涓�娆�
+	@Scheduled(cron = "0 0 6 * * ? ")
+	public void doSyncJobNew() {
+		if (!Constant.IS_TASK)
+			return;
+		try {
+			new Thread(new Runnable() {
+
+				@Override
+				public void run() {
+					daTaoKeGoodsDetailV2Service.startSyncGoods();
+				}
+			}).start();
+
+		} catch (Exception e) {
+			LogHelper.errorDetailInfo(e);
+		}
+	}
+
+	@Scheduled(cron = "0 0/10 * * * ? ")
+	public void doUpdateJobNew() {
+		if (!Constant.IS_TASK)
+			return;
+		try {
+			new Thread(new Runnable() {
+
+				@Override
+				public void run() {
+					daTaoKeGoodsDetailV2Service.updateNewGoods();
+				}
+			}).start();
+
+		} catch (Exception e) {
+			LogHelper.errorDetailInfo(e);
+		}
+	}
+
+	@Scheduled(cron = "0 0/10 * * * ? ")
+	public void doDeleteJobNew() {
+		if (!Constant.IS_TASK)
+			return;
+		try {
+			new Thread(new Runnable() {
+
+				@Override
+				public void run() {
+					daTaoKeGoodsDetailV2Service.deleteInvalid();
+				}
+			}).start();
+
+		} catch (Exception e) {
+			LogHelper.errorDetailInfo(e);
+		}
+	}
+
+	// 姣忓ぉ鐨�8鐐癸紝11鐐癸紝19鐐癸紝23鐐规墽琛屼竴娆�
+	@Scheduled(cron = "0 0 8,11,19,23 * * ? ")
+	public void doUpdateInfoJobNew() {
+		if (!Constant.IS_TASK)
+			return;
+		try {
+			new Thread(new Runnable() {
+
+				@Override
+				public void run() {
+					daTaoKeGoodsDetailV2Service.updateData();
+				}
+			}).start();
+
+		} catch (Exception e) {
+			LogHelper.errorDetailInfo(e);
+		}
+	}
+
 }

--
Gitblit v1.8.0