|
@ -69,6 +69,9 @@ public class TasksController { |
|
|
@Operation(summary = "停止实验") |
|
|
@Operation(summary = "停止实验") |
|
|
@PostMapping("/stop") |
|
|
@PostMapping("/stop") |
|
|
public Result<Integer> stopTask(@RequestBody StopTaskDTO dto) { |
|
|
public Result<Integer> stopTask(@RequestBody StopTaskDTO dto) { |
|
|
return Result.success(tasksService.stopTask(dto.getTaskId())); |
|
|
|
|
|
|
|
|
if(dto.getTaskId() != null) { |
|
|
|
|
|
return Result.success(tasksService.stopTask(dto.getTaskId())); |
|
|
|
|
|
} |
|
|
|
|
|
return Result.failed("停止实验失败"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |