修改git

master
Cui YongXing 2024-08-22 21:47:40 +08:00
parent f5d6e28aac
commit bf6773379b
1 changed files with 3 additions and 0 deletions

View File

@ -46,18 +46,21 @@ public class TaskInfoController {
} }
@GetMapping("/{id}") @GetMapping("/{id}")
@Operation(summary = "任务信息查询",description = "通过任务id查询任务信息")
public Result<TaskInfoResp> selectById(@PathVariable("id") Long id) { public Result<TaskInfoResp> selectById(@PathVariable("id") Long id) {
TaskInfo byId = taskInfoService.getById(id); TaskInfo byId = taskInfoService.getById(id);
return Result.success(TaskInfo.build(byId)); return Result.success(TaskInfo.build(byId));
} }
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@Operation(summary = "删除任务",description = "通过任务id删除任务信息")
public Result delete(@PathVariable("id") Long id) { public Result delete(@PathVariable("id") Long id) {
taskInfoService.removeById(id); taskInfoService.removeById(id);
return Result.success(null,"操作成功"); return Result.success(null,"操作成功");
} }
@PutMapping("/{id}") @PutMapping("/{id}")
@Operation(summary = "任务信息修改",description = "通过任务id修改任务信息")
public Result update(@PathVariable("id") Long id , @RequestBody TaskInfoUpdReq req){ public Result update(@PathVariable("id") Long id , @RequestBody TaskInfoUpdReq req){
taskInfoService.updateById(TaskInfo.updBuild(req,()->id)); taskInfoService.updateById(TaskInfo.updBuild(req,()->id));
return Result.success(null,"操作成功"); return Result.success(null,"操作成功");