Quellcode durchsuchen

添加 MapController#addTrail 方法

reghao vor 6 Monaten
Ursprung
Commit
32a9403e02

+ 9 - 2
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/controller/MapController.java

@@ -47,10 +47,17 @@ public class MapController {
         return WebResult.success();
     }
 
+    @AuthUser
+    @Operation(summary = "添加地图上的路径", description = "N")
+    @PostMapping(value = "/trail", produces = MediaType.APPLICATION_JSON_VALUE)
+    public String addTrail(@RequestBody @Validated List<MapPoint> list) {
+        return WebResult.success();
+    }
+
     @AuthUser
     @Operation(summary = "获取坐标列表构成的路径", description = "N")
-    @GetMapping(value = "/trail", produces = MediaType.APPLICATION_JSON_VALUE)
-    public String getTrailPath() {
+    @GetMapping(value = "/trail/{trailId}", produces = MediaType.APPLICATION_JSON_VALUE)
+    public String getTrail(@PathVariable("trailId") long trailId) {
         List list = mapService.getTrailPath();
         return WebResult.success(list);
     }