1. 配置数据库日志输出 2. 任务更新API与测试类 3. 任务删除API与测试类

This commit is contained in:
guo
2024-07-16 21:34:00 +08:00
parent ab252d547f
commit 9e7128a7be
5 changed files with 40 additions and 11 deletions
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.rmi.ServerException;
/**
* 任务控制层
* @author guo
@@ -49,9 +51,9 @@ public class TaskController {
@DeleteMapping("/tasks/{taskId}")
@Operation(summary = "删除指定任务")
public CommonResult deleteTask(@PathVariable("taskId") String taskId) {
// return CommonResult.success(tasksService.deleteTask(taskId));
return null;
public CommonResult deleteTask(@PathVariable("taskId") String taskId) throws ServerException {
tasksService.deleteTask(taskId);
return CommonResult.success();
}
@GetMapping("/tasks")