5 changed files with 69 additions and 3 deletions
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.service.StatsPublicityTaskService; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* desc:标签被使用次数 【月、季、年】统计定时任务 |
||||
|
*/ |
||||
|
@Component("publicityTagUsedQuarterlyAndYearlyStatsTask") |
||||
|
public class PublicityTagUsedQuarterlyAndYearlyStatsTask implements ITask { |
||||
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
@Autowired |
||||
|
private StatsPublicityTaskService statsPublicityTaskService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行,参数为:{}", params); |
||||
|
Result result = statsPublicityTaskService.tagUsedQuarterlyStatsjob(); |
||||
|
if (result.success()) { |
||||
|
logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行定时任务执行成功"); |
||||
|
} else { |
||||
|
logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行定时任务执行失败:" + result.getMsg()); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.service.StatsPublicityTaskService; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* desc:标签被阅读次数 【月、季、年】统计定时任务 |
||||
|
*/ |
||||
|
@Component("publicityTagViewedQuarterlyAndYearlyhlyStatsTask") |
||||
|
public class PublicityTagViewedQuarterlyAndYearlyhlyStatsTask implements ITask { |
||||
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
@Autowired |
||||
|
private StatsPublicityTaskService statsPublicityTaskService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行,参数为:{}", params); |
||||
|
Result result = statsPublicityTaskService.tagViewedMonthlyStatsjob(); |
||||
|
if (result.success()) { |
||||
|
logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行定时任务执行成功"); |
||||
|
} else { |
||||
|
logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行定时任务执行失败:" + result.getMsg()); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue