7 changed files with 227 additions and 10 deletions
@ -0,0 +1,64 @@ |
|||||
|
package com.epmet.feign; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.feign.impl.StatsPublicityFeignClientFallBack; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
||||
|
/** |
||||
|
* @Description 数据-宣传能力 -定时任务 |
||||
|
* @Author wangc |
||||
|
* @Date 2020/5/23 13:42 |
||||
|
*/ |
||||
|
@FeignClient(name = ServiceConstant.DATA_STATISTICAL, fallback = StatsPublicityFeignClientFallBack.class) |
||||
|
public interface StatsPublicityFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@PostMapping(value = "data/stats/statspublicity/articleSummaryDailyStatsjob") |
||||
|
Result articleSummaryDailyStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @return: |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@PostMapping(value = "data/stats/statspublicity/tagUsedDailyStatsjob") |
||||
|
Result tagUsedDailyStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计发表文章最多的分类 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@PostMapping(value = "data/stats/statspublicity/tagUsedMonthStatsjob") |
||||
|
Result tagUsedMonthStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@PostMapping(value = "data/stats/statspublicity/tagViewedDailyStatsjob") |
||||
|
Result tagViewedDayStatsjob(); |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@PostMapping(value = "data/stats/statspublicity/tagViewedMonthStatsjob") |
||||
|
Result tagViewedMonthStatsjob(); |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,75 @@ |
|||||
|
package com.epmet.feign.impl; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.ModuleUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.feign.StatsPublicityFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* desc: |
||||
|
* |
||||
|
* @return: |
||||
|
* @date: 2020/6/22 9:38 |
||||
|
* @author: jianjun liu |
||||
|
* email:liujianjun@git.elinkit.com.cn |
||||
|
*/ |
||||
|
@Component |
||||
|
public class StatsPublicityFeignClientFallBack implements StatsPublicityFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result articleSummaryDailyStatsjob() { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "articleSummaryDailyStatsjob"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 定时任务 【日】统计文章总数及在线文章总数 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @return: |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagUsedDailyStatsjob() { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "tagUsedDailyStatsjob"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计发表文章最多的分类 包含 机关 部门 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagUsedMonthStatsjob() { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "tagUsedMonthStatsjob"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 【日】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagViewedDayStatsjob() { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "tagViewedDayStatsjob"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 【月,季,年】 统计阅读最多的标签 包含 机关 网格 |
||||
|
* |
||||
|
* @date: 2020/6/22 9:09 |
||||
|
* @author: jianjun liu |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result tagViewedMonthStatsjob() { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "tagViewedMonthStatsjob"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
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,24 @@ |
|||||
|
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(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
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()); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue