添加字段和表

master
Cui YongXing 2024-08-28 19:45:56 +08:00
parent 45cce49f3d
commit 4126b4899c
1 changed files with 2 additions and 2 deletions

View File

@ -15,12 +15,12 @@ public class NodeTableController {
private NodeTableService nodeTableService; private NodeTableService nodeTableService;
@PostMapping @PostMapping
private Result addNodeTable(NodeTable nodeTable) { private Result addNodeTable(@RequestBody NodeTable nodeTable) {
boolean save = nodeTableService.save(nodeTable); boolean save = nodeTableService.save(nodeTable);
return Result.success(save); return Result.success(save);
} }
@GetMapping("/{id}") @GetMapping("/{id}")
private Result getNodeTable(@PathVariable Long id) { private Result getNodeTable(@PathVariable("id") Long id) {
NodeTable byId = nodeTableService.getById(id); NodeTable byId = nodeTableService.getById(id);
return Result.success(byId); return Result.success(byId);
} }