Commit 2fe27ea4 by guo_minglei@163.com

修改返回参数

parent 43b2890d
...@@ -40,72 +40,72 @@ public class ApiFlowController { ...@@ -40,72 +40,72 @@ public class ApiFlowController {
@PostMapping("delete") @PostMapping("delete")
@ApiOperation("删除工作流,若当前工作流被依赖则删除失败,只允许删除不被依赖的工作流,当前工作流依赖其他工作流不影响") @ApiOperation("删除工作流,若当前工作流被依赖则删除失败,只允许删除不被依赖的工作流,当前工作流依赖其他工作流不影响")
public String deleteFlow(String param){ public ResponseResult deleteFlow(String param){
apiFlowService.deleteFlow(param); apiFlowService.deleteFlow(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
@PostMapping("start") @PostMapping("start")
@ApiOperation("开始工作流的调度,将工作流启用调度") @ApiOperation("开始工作流的调度,将工作流启用调度")
public String start(String param) throws ParseException { public ResponseResult start(String param) throws ParseException {
apiFlowService.start(param); apiFlowService.start(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
@PostMapping("repealSchedule") @PostMapping("repealSchedule")
@ApiOperation("撤销工作流调度,只可以撤销总工作流,若为内嵌工作流不允许撤销") @ApiOperation("撤销工作流调度,只可以撤销总工作流,若为内嵌工作流不允许撤销")
public String repealSchedule(String param) throws ParseException { public ResponseResult repealSchedule(String param) throws ParseException {
apiFlowService.repealSchedule(param); apiFlowService.repealSchedule(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
@PostMapping("killJob") @PostMapping("killJob")
@ApiOperation("杀死节点") @ApiOperation("杀死节点")
public Boolean killJob(String param) throws InterruptedException { public ResponseResult killJob(String param) throws InterruptedException {
Boolean result = flowService.killJob(param); Boolean result = flowService.killJob(param);
return result; return ResponseResult.ok(result);
} }
@PostMapping("killFlow") @PostMapping("killFlow")
@ApiOperation("杀死工作流") @ApiOperation("杀死工作流")
public Boolean killFlow(String runId) throws InterruptedException { public ResponseResult killFlow(String runId) throws InterruptedException {
Boolean result = flowService.killFlow(runId); Boolean result = flowService.killFlow(runId);
return result; return ResponseResult.ok(result);
} }
@PostMapping("stopSchedule") @PostMapping("stopSchedule")
@ApiOperation("暂停本次调度") @ApiOperation("暂停本次调度")
public String stopSchedule(String param){ public ResponseResult stopSchedule(String param){
return apiFlowService.stopSchedule(param); return ResponseResult.ok(apiFlowService.stopSchedule(param));
} }
@PostMapping("reStartSchedule") @PostMapping("reStartSchedule")
@ApiOperation("重新开始某次调度") @ApiOperation("重新开始某次调度")
public String reStartSchedule(String runIds){ public ResponseResult reStartSchedule(String runIds){
apiFlowService.reStartSchedule(runIds); apiFlowService.reStartSchedule(runIds);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
@PostMapping("reRunJob") @PostMapping("reRunJob")
@ApiOperation("重跑节点") @ApiOperation("重跑节点")
public String reRunJob(String param){ public ResponseResult reRunJob(String param){
apiFlowService.reRunJob(param); apiFlowService.reRunJob(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
@PostMapping("reRunFlow") @PostMapping("reRunFlow")
@ApiOperation("重跑工作流") @ApiOperation("重跑工作流")
public String reRunFlow(String param){ public ResponseResult reRunFlow(String param){
apiFlowService.reRunFlow(param); apiFlowService.reRunFlow(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
@PostMapping("madeSuccess") @PostMapping("madeSuccess")
@ApiOperation("手动置为成功") @ApiOperation("手动置为成功")
public String madeSuccess(String param){ public ResponseResult madeSuccess(String param){
apiFlowService.madeSuccess(param); apiFlowService.madeSuccess(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
/** /**
...@@ -118,9 +118,9 @@ public class ApiFlowController { ...@@ -118,9 +118,9 @@ public class ApiFlowController {
*/ */
@PostMapping("loadScheduleResult") @PostMapping("loadScheduleResult")
@ApiOperation("加载运行记录") @ApiOperation("加载运行记录")
public List<RunRecording> loadScheduleResult(String param){ public ResponseResult loadScheduleResult(String param){
List<RunRecording> result = apiFlowService.loadScheduleResult(param); List<RunRecording> result = apiFlowService.loadScheduleResult(param);
return result; return ResponseResult.ok(result);
} }
/** /**
...@@ -130,9 +130,9 @@ public class ApiFlowController { ...@@ -130,9 +130,9 @@ public class ApiFlowController {
*/ */
@PostMapping("loadScheduleLog") @PostMapping("loadScheduleLog")
@ApiOperation("加载运行日志") @ApiOperation("加载运行日志")
public RunRecordingVo loadScheduleLog(String param){ public ResponseResult loadScheduleLog(String param){
RunRecordingVo result = apiFlowService.loadScheduleLog(param); RunRecordingVo result = apiFlowService.loadScheduleLog(param);
return result; return ResponseResult.ok(result);
} }
...@@ -143,9 +143,9 @@ public class ApiFlowController { ...@@ -143,9 +143,9 @@ public class ApiFlowController {
*/ */
@PostMapping("/repairJob") @PostMapping("/repairJob")
@ApiOperation("补批") @ApiOperation("补批")
public String repairJob(String param){ public ResponseResult repairJob(String param){
apiFlowService.repairJob(param); apiFlowService.repairJob(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
/** /**
...@@ -155,9 +155,9 @@ public class ApiFlowController { ...@@ -155,9 +155,9 @@ public class ApiFlowController {
*/ */
@PostMapping("/repairFlow") @PostMapping("/repairFlow")
@ApiOperation("补批工作流") @ApiOperation("补批工作流")
public String repairFlow(String param){ public ResponseResult repairFlow(String param){
apiFlowService.repairFlow(param); apiFlowService.repairFlow(param);
return "SUCCESS"; return ResponseResult.ok("SUCCESS");
} }
} }
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