From 72f99531c8575c5621bb6067939b8b73807ab22f Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期三, 15 五月 2019 14:51:38 +0800 Subject: [PATCH] 动态时间随机8分钟以内 + 分享优化 --- fanli/src/main/java/com/yeshi/fanli/job/DynamicInfoJob.java | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/job/DynamicInfoJob.java b/fanli/src/main/java/com/yeshi/fanli/job/DynamicInfoJob.java index 0d316a9..4bd3795 100644 --- a/fanli/src/main/java/com/yeshi/fanli/job/DynamicInfoJob.java +++ b/fanli/src/main/java/com/yeshi/fanli/job/DynamicInfoJob.java @@ -31,9 +31,9 @@ @Scheduled(cron = "0 0/10 6-23 * * ?") public void insetDynamicInfo() { - if (!Constant.IS_TASK) { - return; - } +// if (!Constant.IS_TASK) { +// return; +// } try { dynamicInfoService.insertTimeHotSale(); @@ -64,9 +64,9 @@ @Scheduled(cron = "0 0 6,7,15,16,21,22,23 * * ? ") public void insetShopInfo1() { - if (!Constant.IS_TASK) { - return; - } +// if (!Constant.IS_TASK) { +// return; +// } try { dynamicInfoService.insertShopInfo(); @@ -85,9 +85,9 @@ @Scheduled(cron = "0 0/30 8,9,10 * * ?") public void insetShopInfo2() { - if (!Constant.IS_TASK) { - return; - } +// if (!Constant.IS_TASK) { +// return; +// } try { dynamicInfoService.insertShopInfo(); @@ -107,9 +107,9 @@ @Scheduled(cron = "0 0/30 11,12,13,14 * * ?") public void insetShopInfo3() { - if (!Constant.IS_TASK) { - return; - } +// if (!Constant.IS_TASK) { +// return; +// } try { dynamicInfoService.insertShopInfo(); @@ -151,9 +151,9 @@ @Scheduled(cron = "0 0 0 * * ?") public void remove() { - if (!Constant.IS_TASK) { - return; - } +// if (!Constant.IS_TASK) { +// return; +// } try { dynamicInfoService.removeByDate(DateUtil.reduceDay(3, new Date())); @@ -173,9 +173,9 @@ @Scheduled(cron = "0 0/3 * * * ?") public void activityNeedPublish() { - if (!Constant.IS_TASK) { - return; - } +// if (!Constant.IS_TASK) { +// return; +// } try { List<RecommendActivity> list = activityService.getNeedPublish(); -- Gitblit v1.8.0