Commit 4e00659f by guominglei

重新开始调度修改runid为空问题

parent 40921380
......@@ -85,8 +85,8 @@ public class ApiFlowController {
@PostMapping("reStartSchedule")
@ApiOperation("重新开始某次调度")
public ResponseResult reStartSchedule(String param){
apiFlowService.reStartSchedule(param);
public ResponseResult reStartSchedule(String runIds){
apiFlowService.reStartSchedule(runIds);
return ResponseResult.ok("SUCCESS");
}
......
......@@ -1484,13 +1484,11 @@ public class ApiFlowServiceImpl implements ApiFlowService {
@Transactional(rollbackFor = Exception.class)
public void reStartSchedule(String runIds) {
ValidationUtil.dataNotBank(runIds, "运行id不允许为空!");
JSONObject jsonObject = JSON.parseObject(runIds);
String runIdStr = jsonObject.getString("runId");
List<String> runIdList = Arrays.asList(runIdStr.split(","));
List<String> runIdList = Arrays.asList(runIds.split(","));
runIdList.forEach(runId -> {
List<RunRecording> runRecordList = runRecordingMapper.findStopRunCordByRunId(runId);
ValidationUtil.dataNotNull(runRecordList, "运行记录" + runId + "不存在暂停中运行记录!");
ValidationUtil.isTrueValidation(null == runRecordList || runRecordList.size() == 0, "运行记录" + runId + "不存在暂停中运行记录!");
runRecordingMapper.startByRunId(runId);
jobTaskMapper.startByRunId(runId);
});
......
......@@ -278,14 +278,12 @@ public class JobUtils {
}
/**
* 重新开始某次调度
* @param runId
* @param runIds
* @return
*/
public static ResponseResult startSchedule(String runId){
Map<String,Object> map = new HashMap<>(5);
map.put("runId", runId);
public static ResponseResult startSchedule(String runIds){
//发送请求 添加任务
String response = createHttpRequest(REQUEST_FLOW_REREPEAL, "param="+JSON.toJSONString(map,WriteClassName));
String response = createHttpRequest(REQUEST_FLOW_REREPEAL, "runIds=" + runIds);
log.info("--------------------重新开始调度接口调用成功,结果为:{}------------------------", response);
return JSON.parseObject(response, ResponseResult.class);
}
......
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