Commit 9e3bad5b by huangfusuper

批量接口查询

parent 290d6d72
...@@ -3,17 +3,16 @@ package com.byit.utils; ...@@ -3,17 +3,16 @@ package com.byit.utils;
import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.byit.dto.executor.PluginBeanJobInfo; import com.byit.dto.executor.PluginBeanJobInfo;
import com.byit.dto.plugin.JavaTask; import com.byit.dto.plugin.*;
import com.byit.dto.plugin.PluginPackage;
import com.byit.dto.plugin.RunInfo;
import com.byit.dto.plugin.RunNode;
import com.byit.dto.web.ResponseResult; import com.byit.dto.web.ResponseResult;
import com.byit.executor.handler.interfaces.IJobHandler; import com.byit.executor.handler.interfaces.IJobHandler;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
...@@ -33,6 +32,8 @@ public class JobUtils { ...@@ -33,6 +32,8 @@ public class JobUtils {
private static final String KILL_NODE_RUN_ING = "/api/node/killNode"; private static final String KILL_NODE_RUN_ING = "/api/node/killNode";
private static final String FIND_FLOW_RESULT = "/api/flow/status/findFlowResult";
/** /**
* 发布工作流 * 发布工作流
*/ */
...@@ -190,6 +191,22 @@ public class JobUtils { ...@@ -190,6 +191,22 @@ public class JobUtils {
return response; return response;
} }
public static ResponseResult findFlowResult(List<JobStatusDto> jobStatusDtos){
log.debug("-------------查询对应工作流的运行状态----------------------");
String response = createHttpRequest(FIND_FLOW_RESULT, "param=" + JSON.toJSONString(jobStatusDtos, WriteClassName));
log.debug("--------------------查询对应工作流的运行状态,结果为:{}------------------------",response);
return JSON.parseObject(response, ResponseResult.class);
}
public static void main(String[] args) {
JobUtils.setTOKEN("qqq");
JobUtils.setRequestUrl("http://127.0.0.1:8998/myth-job-admin");
JobStatusDto jobStatusDto = new JobStatusDto();
jobStatusDto.setJobName("sadsasdsa");
JobUtils.findFlowResult(Arrays.asList(jobStatusDto));
}
/** /**
* 暂停指定的工作流 * 暂停指定的工作流
* @param runId * @param runId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment