| | |
| | | |
| | | import cn.gistack.job.executor.thread.MyThread; |
| | | import cn.gistack.nky.fegin.INkyClient; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | | import com.xxl.job.core.handler.annotation.XxlJob; |
| | | import com.xxl.job.core.log.XxlJobLogger; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 南科院预测数据定时器 |
| | |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @XxlJob("initAlgorithmHandler") |
| | | public ReturnT<String> initAlgorithmHandler(String param) { |
| | | XxlJobLogger.log("定时器执行时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(DateUtil.now())); |
| | | |
| | | JSONObject jsonParam = JSON.parseObject(param); |
| | | List<String> resList = new ArrayList<>(); |
| | | if (jsonParam != null){ |
| | | String resGuids = jsonParam.getString("resGuids"); |
| | | resList = Arrays.asList(resGuids.split(",")); |
| | | } |
| | | |
| | | nkyClient.initAlgorithm(resList); |
| | | |
| | | |
| | | XxlJobLogger.log("定时器执行结束时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(DateUtil.now())); |
| | | |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | |
| | | } |