forked from luyan/epmet-cloud-lingshan
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()); |
|||
} |
|||
} |
|||
} |
@ -1,4 +1,8 @@ |
|||
#访问openApi 需要向redis中 添加白名单 |
|||
sadd epmet:openapi:scan:whitelist "客户端ip地址" |
|||
#eg: |
|||
sadd epmet:openapi:scan:whitelist "\"192.168.1.1\"" |
|||
sadd epmet:openapi:scan:whitelist "\"192.168.1.1\"" |
|||
|
|||
#于洋家的ip |
|||
27.219.156.47 |
|||
116.179.32.197(可以删除了) |
Loading…
Reference in new issue