9 changed files with 71 additions and 16 deletions
@ -0,0 +1,9 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
|
||||
|
public interface DataStatsProcessPenddingCalService { |
||||
|
|
||||
|
Result processPenddingCal(); |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.feign.DataStatisticalOpenFeignClient; |
||||
|
import com.epmet.service.DataStatsProcessPenddingCalService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service |
||||
|
public class DataStatsProcessPenddingCalServiceImpl implements DataStatsProcessPenddingCalService { |
||||
|
|
||||
|
@Autowired |
||||
|
private DataStatisticalOpenFeignClient feignClient; |
||||
|
|
||||
|
@Override |
||||
|
public Result processPenddingCal() { |
||||
|
return feignClient.processPenddingCalculate(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.service.DataStatsProcessPenddingCalService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Component("dataStatsProcessPenddingCalTask") |
||||
|
public class DataStatsProcessPenddingCalTask implements ITask { |
||||
|
|
||||
|
@Autowired |
||||
|
private DataStatsProcessPenddingCalService dataStatsProcessPenddingCalService; |
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
log.debug("DataStatsProcessPenddingCalTask定时任务正在执行,参数为:{}", params); |
||||
|
Result result = dataStatsProcessPenddingCalService.processPenddingCal(); |
||||
|
if (result.success()){ |
||||
|
log.debug("DataStatsProcessPenddingCalTask定时任务正在执行定时任务执行成功"); |
||||
|
}else { |
||||
|
log.debug("DataStatsProcessPenddingCalTask定时任务正在执行定时任务执行失败:" + result.getMsg()); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue