mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 15:01:23 +08:00
temp 2023/5/3
This commit is contained in:
@@ -52,18 +52,23 @@ public class WorkController {
|
||||
|
||||
@PostMapping
|
||||
public ResponseResult addWork(@RequestBody Work work) {
|
||||
System.out.println(work);
|
||||
return ResponseResult.build(ResponseCode.DATABASE_SAVE_OK, "success", workService.addWork(work));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseResult deleteById(@PathVariable long id) {
|
||||
public ResponseResult deleteById(@PathVariable Long id) {
|
||||
System.out.println(id);
|
||||
return ResponseResult.build(ResponseCode.DATABASE_DELETE_OK, "success", workService.deleteByWorkId(id));
|
||||
}
|
||||
|
||||
@PutMapping("/setComplete")
|
||||
public ResponseResult updateWork(@RequestBody UserWork userWork) {
|
||||
return ResponseResult.build(ResponseCode.DATABASE_DELETE_OK, "success", userWorkService.updateById(userWork));
|
||||
@PutMapping("/setStatus")
|
||||
public ResponseResult updateStatus(@RequestBody UserWork userWork) {
|
||||
System.out.println(userWork);
|
||||
return ResponseResult.build(ResponseCode.DATABASE_UPDATE_OK, "success", workService.updateStatus(userWork));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResponseResult updateWork(@RequestBody Work work) {
|
||||
return ResponseResult.build(ResponseCode.DATABASE_UPDATE_OK, "success", workService.updateWork(work));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user