From dd5b15229cb15459fa7c31ccea77dac28cbfafbd Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 13 四月 2020 10:04:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div
---
fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java b/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java
index d1968f4..3f4252f 100644
--- a/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java
+++ b/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java
@@ -12,6 +12,7 @@
import com.yeshi.fanli.exception.ActivityException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.activity.ActivityService;
+import com.yeshi.fanli.service.inter.brand.BrandClassShopGoodsService;
import com.yeshi.fanli.service.inter.brand.BrandClassShopService;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
import com.yeshi.fanli.service.inter.lable.LabelService;
@@ -23,6 +24,7 @@
import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
import com.yeshi.fanli.util.CMQManager;
import com.yeshi.fanli.util.Constant;
+import com.yeshi.fanli.util.cache.HttpGoodsCacheManager;
/**
* 娣樺疂鍟嗗搧鏇寸粏
@@ -63,6 +65,12 @@
@Resource
private TLJBuyGoodsService tljBuyGoodsService;
+
+ @Resource
+ private BrandClassShopGoodsService brandClassShopGoodsService;
+
+ @Resource
+ private HttpGoodsCacheManager httpGoodsCacheManager;
// 鍔ㄦ�佸晢鍝佹洿鏂� 锛�1涓皬鏃舵洿鏂�
@Scheduled(cron = "0 0 */1 * * ?")
@@ -162,11 +170,29 @@
}
}
- // 鏇存柊鍝佺墝鍟嗗搧锛屾瘡澶╂棭涓�6鐐规墽琛屼竴娆�
+ // 鏇存柊澧炲姞鍝佺墝鍟嗗搧锛屾瘡澶╂棭涓�6鐐规墽琛屼竴娆�
@Scheduled(cron = "0 0 6 * * ? ")
- public void updateBrandGoods() {
+ public void updateAddBrandGoods() {
if (!Constant.IS_TASK)
return;
brandClassShopService.updateShopGoods();
}
+
+ // 鏇存柊鍘熸湁绮惧搧搴撶殑鍝佺墝鍟嗗搧锛屾瘡澶╁噷鏅�3鐐规墽琛屼竴娆�
+ @Scheduled(cron = "0 0 3 * * ? ")
+ public void updateBrandGoods() {
+ if (!Constant.IS_TASK)
+ return;
+ brandClassShopGoodsService.startUpdateGoods();
+ }
+
+ // 姣忓ぉ鍑屾櫒4鐐规ā鎷熻姹�
+ @Scheduled(cron = "0 0 4 * * ? ")
+ public void simulateRequest() {
+ httpGoodsCacheManager.requestHomeRecommend();
+ httpGoodsCacheManager.requestClassGoods();
+ httpGoodsCacheManager.requestBrandGoods();
+ httpGoodsCacheManager.requestDynamic();
+ httpGoodsCacheManager.requestCommonTemplate();
+ }
}
--
Gitblit v1.8.0