|
|
@@ -50,13 +50,17 @@ public class PoiController {
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
- @PutMapping("/edit")
|
|
|
- public Result edit(@RequestBody Poi info){
|
|
|
+ @PutMapping("/edit/{id}")
|
|
|
+ public Result edit(@PathVariable int id, @RequestBody Poi info){
|
|
|
+
|
|
|
+ info.setId(id);
|
|
|
+ poiService.updateById(info);
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
@DeleteMapping("/del/{id}")
|
|
|
- public Result del(){
|
|
|
+ public Result del(@PathVariable int id){
|
|
|
+ poiService.removeById(id);
|
|
|
return Result.success();
|
|
|
}
|
|
|
}
|