|
@@ -8,10 +8,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
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
|
|
@RestController
|
|
|
@CatchAndLog
|
|
@CatchAndLog
|
|
@@ -22,9 +19,9 @@ public class WebEventController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private DeviceGateway deviceGateway;
|
|
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));
|
|
return ApiResult.success(deviceGateway.handleEvent(eventListId));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|