|
|
@@ -2,15 +2,29 @@ package com.hfln.portal.application.controller.web;
|
|
|
|
|
|
|
|
|
import cn.hfln.framework.catchlog.CatchAndLog;
|
|
|
+import cn.hfln.framework.dto.ApiResult;
|
|
|
+import com.hfln.portal.domain.gateway.DeviceGateway;
|
|
|
+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;
|
|
|
|
|
|
@RestController
|
|
|
@CatchAndLog
|
|
|
-@Tag(name = "web端后事件相关")
|
|
|
+@Tag(name = "web端事件相关")
|
|
|
@Slf4j
|
|
|
-@RequestMapping("/web/admin")
|
|
|
+@RequestMapping("/web/event")
|
|
|
public class WebEventController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private DeviceGateway deviceGateway;
|
|
|
+ @GetMapping("/handleEvent/{eventListId}")
|
|
|
+ @Operation(summary = "处理设备事件")
|
|
|
+ public ApiResult<Boolean> handleEvent(@PathVariable("eventListId") Long eventListId){
|
|
|
+ return ApiResult.success(deviceGateway.handleEvent(eventListId));
|
|
|
+ }
|
|
|
}
|