14 changed files with 567 additions and 1 deletions
@ -0,0 +1,46 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
||||
|
import com.epmet.feign.GovOrgOpenFeignClient; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 房屋统计 定时任务 每天凌晨运行一遍 |
||||
|
* @Return |
||||
|
* @Author: lichao |
||||
|
* @Date: 2023/11/01 13:47 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component("houseStatisticsTask") |
||||
|
public class HouseStatisticsTask implements ITask { |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
|
||||
|
|
||||
|
// houseChartRedis
|
||||
|
Result houseChartRedis = govOrgOpenFeignClient.houseChartRedis(); |
||||
|
if (houseChartRedis.success()) { |
||||
|
log.info("houseChartRedis定时任务执行成功"); |
||||
|
} else { |
||||
|
log.error("houseChartRedis定时任务执行失败:" + houseChartRedis.getMsg()); |
||||
|
} |
||||
|
|
||||
|
// houseChartRedis
|
||||
|
Result subUserHouseListRedis = govOrgOpenFeignClient.subUserHouseListRedis(); |
||||
|
if (subUserHouseListRedis.success()) { |
||||
|
log.info("subUserHouseListRedis定时任务执行成功"); |
||||
|
} else { |
||||
|
log.error("subUserHouseListRedis定时任务执行失败:" + subUserHouseListRedis.getMsg()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
|
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.form.DataSyncTaskParam; |
||||
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
||||
|
import com.epmet.feign.GovOrgOpenFeignClient; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 居民房屋统计 定时任务 每天凌晨运行一遍 |
||||
|
* @Return |
||||
|
* @Author: lichao |
||||
|
* @Date: 2023/11/01 13:47 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component("resiHouseStatisticsTask") |
||||
|
public class ResiHouseStatisticsTask implements ITask { |
||||
|
|
||||
|
@Autowired |
||||
|
private EpmetUserOpenFeignClient userOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
|
||||
|
// userChartRedis
|
||||
|
Result userChartRedis = userOpenFeignClient.userChartRedis(); |
||||
|
if (userChartRedis.success()) { |
||||
|
log.info("userChartRedis定时任务执行成功"); |
||||
|
} else { |
||||
|
log.error("userChartRedis定时任务执行失败:" + userChartRedis.getMsg()); |
||||
|
} |
||||
|
|
||||
|
// houseChartRedis
|
||||
|
Result houseChartRedis = govOrgOpenFeignClient.houseChartRedis(); |
||||
|
if (houseChartRedis.success()) { |
||||
|
log.info("houseChartRedis定时任务执行成功"); |
||||
|
} else { |
||||
|
log.error("houseChartRedis定时任务执行失败:" + houseChartRedis.getMsg()); |
||||
|
} |
||||
|
|
||||
|
// houseChartRedis
|
||||
|
Result subUserHouseListRedis = govOrgOpenFeignClient.subUserHouseListRedis(); |
||||
|
if (subUserHouseListRedis.success()) { |
||||
|
log.info("subUserHouseListRedis定时任务执行成功"); |
||||
|
} else { |
||||
|
log.error("subUserHouseListRedis定时任务执行失败:" + subUserHouseListRedis.getMsg()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
||||
|
import com.epmet.feign.GovOrgOpenFeignClient; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 居民统计 定时任务 每天凌晨运行一遍 |
||||
|
* @Return |
||||
|
* @Author: lichao |
||||
|
* @Date: 2023/11/01 13:47 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component("resiStatisticsTask") |
||||
|
public class ResiStatisticsTask implements ITask { |
||||
|
|
||||
|
@Autowired |
||||
|
private EpmetUserOpenFeignClient userOpenFeignClient; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
|
||||
|
// userChartRedis
|
||||
|
Result userChartRedis = userOpenFeignClient.userChartRedis(); |
||||
|
if (userChartRedis.success()) { |
||||
|
log.info("userChartRedis定时任务执行成功"); |
||||
|
} else { |
||||
|
log.error("userChartRedis定时任务执行失败:" + userChartRedis.getMsg()); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
Loading…
Reference in new issue