From db88b87df461820152d68d3d55a28f30c2da83e6 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 20 九月 2019 17:54:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/job/TaoLiJinJob.java |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/job/TaoLiJinJob.java b/fanli/src/main/java/com/yeshi/fanli/job/TaoLiJinJob.java
index 8bd02a6..be0f9ea 100644
--- a/fanli/src/main/java/com/yeshi/fanli/job/TaoLiJinJob.java
+++ b/fanli/src/main/java/com/yeshi/fanli/job/TaoLiJinJob.java
@@ -123,6 +123,7 @@
 		String day = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd");
 		List<TaoBaoUnionConfig> configList = taoBaoUnionConfigService
 				.getConfigByTypeCache(TaoBaoUnionConfig.TYPE_TLJ_BUY);
+		int totalCount = 0;
 		for (TaoBaoUnionConfig app : configList) {
 			List<TLJBuyGoods> list = tljBuyGoodsService.listByDay(app.getAppKey(), day, 15);// 鑾峰彇鏈�澶�15涓晢鍝�
 			int count = 0;
@@ -135,7 +136,9 @@
 					count++;
 				}
 			}
+			totalCount += count;
 		}
+		LogHelper.test("鑷喘绔嬪噺鍟嗗搧楠岃瘉閫氳繃鐨勬暟閲�:" + totalCount);
 	}
 
 	private void addTLJBuyGoods(List<TaoBaoGoodsBrief> list, String day) {
@@ -167,8 +170,26 @@
 	public void autoAddTLJBuyGoods2() {
 		if (!Constant.IS_TASK)
 			return;
+		LogHelper.test("鑷喘绔嬪噺寮�濮嬮�夊搧");
 		String day = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd");
-		List<TaoBaoGoodsBrief> list = tljBuyGoodsService.listPreGoods(1);
+		// 閲嶈瘯3娆�
+		List<TaoBaoGoodsBrief> list = null;
+		try {
+			list = tljBuyGoodsService.listPreGoods(1);
+		} catch (Exception e) {
+		}
+		if (list == null || list.size() == 0)
+			try {
+				list = tljBuyGoodsService.listPreGoods(1);
+			} catch (Exception e) {
+			}
+		if (list == null || list.size() == 0)
+			try {
+				list = tljBuyGoodsService.listPreGoods(1);
+			} catch (Exception e) {
+			}
+
+		LogHelper.test("鑷喘绔嬪噺澶囬�夊晢鍝佹暟閲�:" + list.size());
 		Collections.shuffle(list);
 		List<TaoBaoUnionConfig> configList = taoBaoUnionConfigService
 				.getConfigByTypeCache(TaoBaoUnionConfig.TYPE_TLJ_BUY);

--
Gitblit v1.8.0