Compare commits
2 Commits
e72abd3d28
...
afc1d8d996
| Author | SHA1 | Date | |
|---|---|---|---|
| afc1d8d996 | |||
| 76399d13ce |
@@ -0,0 +1,41 @@
|
||||
package com.genersoft.iot.vmp.aiot.controller;
|
||||
|
||||
import com.genersoft.iot.vmp.streamProxy.bean.StreamProxy;
|
||||
import com.genersoft.iot.vmp.streamProxy.dao.StreamProxyMapper;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* AI摄像头管理接口
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/ai/camera")
|
||||
@Tag(name = "AI-摄像头管理")
|
||||
public class AiCameraController {
|
||||
|
||||
@Autowired
|
||||
private StreamProxyMapper streamProxyMapper;
|
||||
|
||||
@Operation(summary = "根据camera_code查询摄像头信息")
|
||||
@GetMapping("/get")
|
||||
public WVPResult<StreamProxy> getByCameraCode(
|
||||
@Parameter(description = "摄像头编码") @RequestParam String cameraCode
|
||||
) {
|
||||
log.info("[AI-摄像头] 查询摄像头信息: cameraCode={}", cameraCode);
|
||||
|
||||
StreamProxy proxy = streamProxyMapper.selectByCameraCode(cameraCode);
|
||||
|
||||
if (proxy == null) {
|
||||
log.warn("[AI-摄像头] 摄像头不存在: cameraCode={}", cameraCode);
|
||||
return WVPResult.fail(404, "摄像头不存在");
|
||||
}
|
||||
|
||||
return WVPResult.success(proxy);
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,7 @@ public class WebSecurityConfig {
|
||||
defaultExcludes.add("/api/jt1078/playback/download");
|
||||
defaultExcludes.add("/api/jt1078/snap");
|
||||
defaultExcludes.add("/api/ai/roi/snap");
|
||||
defaultExcludes.add("/api/ai/camera/get");
|
||||
|
||||
if (userSetting.getInterfaceAuthentication() && !userSetting.getInterfaceAuthenticationExcludes().isEmpty()) {
|
||||
defaultExcludes.addAll(userSetting.getInterfaceAuthenticationExcludes());
|
||||
|
||||
Reference in New Issue
Block a user