13 changed files with 295 additions and 77 deletions
@ -1,8 +1,8 @@ |
|||||
package com.epmet.feign; |
package feign; |
||||
|
|
||||
import com.epmet.commons.tools.constant.ServiceConstant; |
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
import com.epmet.commons.tools.utils.Result; |
import com.epmet.commons.tools.utils.Result; |
||||
import com.epmet.feign.impl.StatsPublicityFeignClientFallBack; |
import feign.impl.StatsPublicityFeignClientFallBack; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
@ -1,9 +1,9 @@ |
|||||
package com.epmet.feign.impl; |
package feign.impl; |
||||
|
|
||||
import com.epmet.commons.tools.constant.ServiceConstant; |
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
import com.epmet.commons.tools.utils.ModuleUtils; |
import com.epmet.commons.tools.utils.ModuleUtils; |
||||
import com.epmet.commons.tools.utils.Result; |
import com.epmet.commons.tools.utils.Result; |
||||
import com.epmet.feign.StatsPublicityFeignClient; |
import feign.StatsPublicityFeignClient; |
||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
||||
|
|
||||
/** |
/** |
@ -0,0 +1,56 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
|
||||
|
/** |
||||
|
* desc: 数据-宣传能力-数据统计 |
||||
|
* |
||||
|
* @return: |
||||
|
* @date: 2020/6/22 10:24 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
public interface StatsPublicityTaskService { |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
Result articleSummaryDailyStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @return: |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
Result tagUsedDailyStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计发表文章最多的分类 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
Result tagUsedMonthlyStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
Result tagViewedDailyStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
Result tagViewedMonthlyStatsjob(); |
||||
|
|
||||
|
} |
@ -1,15 +0,0 @@ |
|||||
package com.epmet.service; |
|
||||
|
|
||||
|
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
|
|
||||
/** |
|
||||
* @Description 生成议题表决日统计数定时任务 |
|
||||
* @Author wangc |
|
||||
* @Date 2020/5/20 17:39 |
|
||||
*/ |
|
||||
public interface TagUsedDailyStatisticalTaskService { |
|
||||
|
|
||||
Result issueVotingDailyStatistical(); |
|
||||
|
|
||||
} |
|
@ -0,0 +1,75 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.service.StatsPublicityTaskService; |
||||
|
import feign.StatsPublicityFeignClient; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @ClassName IssueVotingDailyStatisticalTaskServiceImpl |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-05-25 09:24 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class StatsPublicityTaskServiceImpl implements StatsPublicityTaskService { |
||||
|
@Autowired |
||||
|
private StatsPublicityFeignClient statsPublicityFeignClient; |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result articleSummaryDailyStatsjob() { |
||||
|
return statsPublicityFeignClient.articleSummaryDailyStatsjob(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @return: |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagUsedDailyStatsjob() { |
||||
|
return statsPublicityFeignClient.tagUsedDailyStatsjob(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计发表文章最多的分类 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagUsedMonthlyStatsjob() { |
||||
|
return statsPublicityFeignClient.tagUsedMonthStatsjob(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagViewedDailyStatsjob() { |
||||
|
return statsPublicityFeignClient.tagViewedDayStatsjob(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagViewedMonthlyStatsjob() { |
||||
|
return statsPublicityFeignClient.tagViewedMonthStatsjob(); |
||||
|
} |
||||
|
} |
@ -1,24 +0,0 @@ |
|||||
package com.epmet.service.impl; |
|
||||
|
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
import com.epmet.feign.GovIssueFeignClient; |
|
||||
import com.epmet.service.IssueVotingDailyStatisticalTaskService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
/** |
|
||||
* @Description |
|
||||
* @ClassName IssueVotingDailyStatisticalTaskServiceImpl |
|
||||
* @Auth wangc |
|
||||
* @Date 2020-05-25 09:24 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class TagUsedDailyStatisticalTaskServiceImpl implements IssueVotingDailyStatisticalTaskService { |
|
||||
@Autowired |
|
||||
private GovIssueFeignClient govIssueFeignClient; |
|
||||
|
|
||||
@Override |
|
||||
public Result issueVotingDailyStatistical() { |
|
||||
return govIssueFeignClient.dailyStatisticalVoteJob(); |
|
||||
} |
|
||||
} |
|
@ -1,34 +0,0 @@ |
|||||
package com.epmet.task; |
|
||||
|
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
import com.epmet.service.IssueVotingDailyStatisticalTaskService; |
|
||||
import org.slf4j.Logger; |
|
||||
import org.slf4j.LoggerFactory; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
/** |
|
||||
* @Description |
|
||||
* @ClassName dailyStatisticalVoteTask |
|
||||
* @Auth wangc |
|
||||
* @Date 2020-05-25 09:22 |
|
||||
*/ |
|
||||
@Component("dailyStatisticalVoteTask") |
|
||||
public class DailyStatisticalTagUsedTask implements ITask { |
|
||||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
||||
|
|
||||
@Autowired |
|
||||
private IssueVotingDailyStatisticalTaskService issueVotingDailyStatisticalTaskService; |
|
||||
|
|
||||
|
|
||||
@Override |
|
||||
public void run(String params) { |
|
||||
logger.debug("dailyStatisticalVoteTask定时任务正在执行,参数为:{}", params); |
|
||||
Result result = issueVotingDailyStatisticalTaskService.issueVotingDailyStatistical(); |
|
||||
if (result.success()) { |
|
||||
logger.debug("dailyStatisticalVoteTask定时任务正在执行定时任务执行成功"); |
|
||||
} else { |
|
||||
logger.debug("dailyStatisticalVoteTask定时任务正在执行定时任务执行失败:" + 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("publicityArticleSummaryDailyStatsTask") |
||||
|
public class PublicityArticleSummaryDailyStatsTask implements ITask { |
||||
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
@Autowired |
||||
|
private StatsPublicityTaskService statsPublicityTaskService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行,参数为:{}", params); |
||||
|
Result result = statsPublicityTaskService.articleSummaryDailyStatsjob(); |
||||
|
if (result.success()) { |
||||
|
logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行定时任务执行成功"); |
||||
|
} else { |
||||
|
logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行定时任务执行失败:" + 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("publicityTagUsedDailyStatsjob") |
||||
|
public class PublicityTagUsedDailyStatsTask implements ITask { |
||||
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
@Autowired |
||||
|
private StatsPublicityTaskService statsPublicityTaskService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
logger.debug("publicityTagUsedDailyStatsjob定时任务正在执行,参数为:{}", params); |
||||
|
Result result = statsPublicityTaskService.tagUsedDailyStatsjob(); |
||||
|
if (result.success()) { |
||||
|
logger.debug("publicityTagUsedDailyStatsjob定时任务正在执行定时任务执行成功"); |
||||
|
} else { |
||||
|
logger.debug("publicityTagUsedDailyStatsjob定时任务正在执行定时任务执行失败:" + 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("publicityTagUsedMonthlyStatsjob") |
||||
|
public class PublicityTagUsedMonthlyStatsTask 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.tagUsedMonthlyStatsjob(); |
||||
|
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("publicityTagViewedDailyStatsTask") |
||||
|
public class PublicityTagViewedDailyStatsTask implements ITask { |
||||
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
@Autowired |
||||
|
private StatsPublicityTaskService statsPublicityTaskService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
logger.debug("publicityTagViewedDailyStatsTask定时任务正在执行,参数为:{}", params); |
||||
|
Result result = statsPublicityTaskService.tagViewedDailyStatsjob(); |
||||
|
if (result.success()) { |
||||
|
logger.debug("publicityTagViewedDailyStatsTask定时任务正在执行定时任务执行成功"); |
||||
|
} else { |
||||
|
logger.debug("publicityTagViewedDailyStatsTask定时任务正在执行定时任务执行失败:" + 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("publicityTagViewedMonthlyStatsTask") |
||||
|
public class PublicityTagViewedMonthlyStatsTask 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