From a2e287f9bfec6f64bcd1dce4155b0139d1474cb7 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 10 六月 2019 12:15:57 +0800 Subject: [PATCH] 设备消息,用户消息总未读消息修改 --- fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java | 50 +++++++++++++++++++++++++++++--------------------- 1 files changed, 29 insertions(+), 21 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 5401b25..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 * * ?") @@ -83,10 +87,7 @@ } try { - LogHelper.test("---鎵ц--updateQualityFactoryWeightJob--"); - - qualityFactoryService.updateWeight(10, 3); - + qualityFactoryService.updateWeight(1, 4); } catch (Exception e) { LogHelper.errorDetailInfo(e); } @@ -102,23 +103,25 @@ taoBaoGoodsUpdateService.deleteOutOfDate(); } - // 娣诲姞绮鹃�夊簱涓渶瑕佹洿鏂扮殑娣樺疂鍟嗗搧ID(2涓皬鏃舵墽琛屼竴娆�) - @Scheduled(cron = "0 0 1/2 * * ? ") - public void addNeddUpdateTaoBaoGoods() { - if (!Constant.IS_TASK) { + /** + * 鏇存柊瓒呰繃4涓皬鏃舵湭鏇存柊鐨勫晢鍝� + */ + // 1涓皬鏃舵洿鏂� + @Scheduled(cron = "0 0 1/1 * * ? ") + public void addNeedUpdateTaoBaoGoods() { + if (!Constant.IS_TASK) + return; + + List<Long> list = taoBaoGoodsUpdateService.listNeedUpdateGoodsId(0, 2000, 4); + if (list == null || list.size() == 0) { return; } - LogHelper.test("---addNeddUpdateTaoBaoGoods----execute "); - - List<Long> list = qualityFactoryService.queryNeedUpdate(0, 3000, 4); - if (list != null) { - for (Long id : list) { - try { - CMQManager.getInstance().addNeedUpdateTaoBaoGoodsId(id); - } catch (Exception e) { - LogHelper.errorDetailInfo(e); - } + for (Long id : list) { + try { + CMQManager.getInstance().addNeedUpdateTaoBaoGoodsId(id); + } catch (Exception e) { + LogHelper.errorDetailInfo(e); } } } @@ -135,8 +138,7 @@ try { while (true) { - List<Long> list = qualityFlashSaleService.queryNeedRemove(0, 100, 6); - + List<Long> list = qualityFlashSaleService.queryNeedRemove(0, 200, 6); if (list == null || list.size() == 0) { break; } @@ -144,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