修改目录架构
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user