From 50e074067ab1406a52023300239189165d9cdca7 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期三, 05 六月 2019 15:00:03 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 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 627af6e..2ab2f95 100644 --- a/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java +++ b/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java @@ -11,6 +11,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.BrandClassShopService; import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService; import com.yeshi.fanli.service.inter.lable.LabelService; import com.yeshi.fanli.service.inter.lable.QualityFactoryService; @@ -46,6 +47,9 @@ @Resource private QualityFlashSaleService qualityFlashSaleService; + + @Resource + private BrandClassShopService brandClassShopService; // 鍔ㄦ�佸晢鍝佹洿鏂� 锛�1涓皬鏃舵洿鏂� @Scheduled(cron = "0 0 */1 * * ?") @@ -99,20 +103,20 @@ taoBaoGoodsUpdateService.deleteOutOfDate(); } - /** * 鏇存柊瓒呰繃4涓皬鏃舵湭鏇存柊鐨勫晢鍝� */ - @Scheduled(cron = "0 0 1/2 * * ? ") - public void addNeddUpdateTaoBaoGoods() { - if (!Constant.IS_TASK) + // 1涓皬鏃舵洿鏂� + @Scheduled(cron = "0 0 1/1 * * ? ") + public void addNeedUpdateTaoBaoGoods() { + if (!Constant.IS_TASK) return; - - List<Long> list = taoBaoGoodsUpdateService.listNeedUpdateGoodsId(0, 4000, 4); + + List<Long> list = taoBaoGoodsUpdateService.listNeedUpdateGoodsId(0, 2000, 4); if (list == null || list.size() == 0) { return; } - + for (Long id : list) { try { CMQManager.getInstance().addNeedUpdateTaoBaoGoodsId(id); @@ -142,8 +146,14 @@ } } catch (Exception e) { - LogHelper.errorDetailInfo(e); + LogHelper.errorDetailInfo(e); } } + // 鏇存柊鍝佺墝鍟嗗搧锛屾瘡澶╂棭涓�6鐐规墽琛屼竴娆� + @Scheduled(cron = "0 0 6 * * ? ") + public void updateBrandGoods() { + brandClassShopService.updateShopGoods(); + } + } -- Gitblit v1.8.0