修改目录架构

This commit is contained in:
guo
2024-07-09 22:45:29 +08:00
parent e3f27cf975
commit c83dd750e6
50 changed files with 83 additions and 51 deletions
@@ -0,0 +1,26 @@
package com.guo.learningprogresstracker.controller;
import com.guo.learningprogresstracker.entity.CommonResult;
import com.guo.learningprogresstracker.service.TasksService;
import com.guo.learningprogresstracker.service.impl.TasksServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/**
* 任务控制层
*/
@Controller
public class TaskController {
private final TasksService tasksService;
public TaskController(TasksServiceImpl tasksService) {
this.tasksService = tasksService;
}
@GetMapping("/tasks/{taskId}")
public CommonResult<TaskInfoResult> showTask(@PathVariable("taskId") String taskId) {
return CommonResult.success(tasksService.showTask(taskId));
}
}