From 6c224068b1ea8c3f92453bef5175e629deaf780f Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期三, 29 五月 2019 09:02:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java | 37 +++++++++++-------------------------- 1 files changed, 11 insertions(+), 26 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 05bfa81..5401b25 100644 --- a/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java +++ b/fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java @@ -43,10 +43,9 @@ @Resource private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService; - + @Resource private QualityFlashSaleService qualityFlashSaleService; - // 鍔ㄦ�佸晢鍝佹洿鏂� 锛�1涓皬鏃舵洿鏂� @Scheduled(cron = "0 0 */1 * * ?") @@ -89,11 +88,7 @@ qualityFactoryService.updateWeight(10, 3); } catch (Exception e) { - try { - LogHelper.errorDetailInfo(e); - } catch (Exception e1) { - e1.printStackTrace(); - } + LogHelper.errorDetailInfo(e); } } @@ -113,53 +108,43 @@ if (!Constant.IS_TASK) { 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) { - try { - LogHelper.errorDetailInfo(e); - } catch (Exception e1) { - e1.printStackTrace(); - } + LogHelper.errorDetailInfo(e); } } } } - - + /** * 瀹氭椂娓呯悊瓒呰繃6涓皬鏃舵湭鏇存柊鐨勯檺鏃舵姠璐晢鍝� */ @Scheduled(cron = "0 15 0/6 * * ? ") public void removeFlashSaleGoods() { - + if (!Constant.IS_TASK) { return; } - + try { while (true) { List<Long> list = qualityFlashSaleService.queryNeedRemove(0, 100, 6); - + if (list == null || list.size() == 0) { break; - } - + } qualityFlashSaleService.deleteBatchByPrimaryKey(list); } - + } catch (Exception e) { - try { LogHelper.errorDetailInfo(e); - } catch (Exception e1) { - e1.printStackTrace(); - } } } -- Gitblit v1.8.0