Selaa lähdekoodia

web端处理跌倒事件修改接口

hxd 2 kuukautta sitten
vanhempi
commit
9927c25037

+ 1 - 1
portal-service-application/src/main/java/com/hfln/portal/application/controller/wap/EventController.java

@@ -24,7 +24,7 @@ public class EventController {
 
 
     @GetMapping("/handleEvent/{eventListId}")
-    @Operation(summary = "处理设备事件")
+    @Operation(summary = "小程序处理设备跌倒事件")
     public ApiResult<Boolean> handleEvent(@PathVariable("eventListId") Long eventListId){
         return ApiResult.success(deviceGateway.handleEvent(eventListId));
     }

+ 4 - 7
portal-service-application/src/main/java/com/hfln/portal/application/controller/web/WebEventController.java

@@ -8,10 +8,7 @@ import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @RestController
 @CatchAndLog
@@ -22,9 +19,9 @@ public class WebEventController {
 
     @Autowired
     private DeviceGateway deviceGateway;
-    @GetMapping("/handleEvent/{eventListId}")
-    @Operation(summary = "处理设备事件")
-    public ApiResult<Boolean> handleEvent(@PathVariable("eventListId") Long eventListId){
+    @GetMapping("/handleFallEvent")
+    @Operation(summary = "处理设备跌倒事件")
+    public ApiResult<Boolean> handleEvent(@RequestParam("eventListId") Long eventListId){
         return ApiResult.success(deviceGateway.handleEvent(eventListId));
     }
 }