From 03360e5d6c0a31f957ec06956309fc834600fe63 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 27 五月 2019 17:28:14 +0800 Subject: [PATCH] 添加淘宝APPKey使用次数警告,环境配置彻底properties文件化 --- 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