1 changed files with 32 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.feign.DataStatisticalOpenFeignClient; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Component("evaIndexScreenDimInitTask") |
||||
|
public class EvaIndexScreenDimInitTask implements ITask { |
||||
|
|
||||
|
@Autowired |
||||
|
private DataStatisticalOpenFeignClient feignClient; |
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
log.debug("EvaIndexScreenDimInitTask定时任务正在执行,参数为:{}", params); |
||||
|
Result result = null; |
||||
|
try { |
||||
|
result = feignClient.initAllEIDims(); |
||||
|
} catch (Exception e) { |
||||
|
log.error("EvaIndexScreenDimInitTask定时任务正在执行定时任务执行失败:{}", ExceptionUtils.getErrorStackTrace(e)); |
||||
|
} |
||||
|
if (result.success()){ |
||||
|
log.debug("EvaIndexScreenDimInitTask定时任务正在执行定时任务执行成功"); |
||||
|
}else { |
||||
|
log.debug("EvaIndexScreenDimInitTask定时任务正在执行定时任务执行失败:" + result.getMsg()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue