修改, 监控查询权限

This commit is contained in:
furongxin 2024-08-12 14:50:47 +08:00
parent b5047b30f1
commit 876cb24927

View File

@ -7,12 +7,12 @@ import cn.iocoder.yudao.module.smartfactory.controller.admin.hik.vo.CameraReplay
import cn.iocoder.yudao.module.smartfactory.service.hik.HikService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
/**
* 工厂管理-工厂列表
@ -29,7 +29,8 @@ public class HikController {
@GetMapping("/getCameraUrl")
@Operation(summary = "视频播放->查询播放地址")
@PermitAll
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
// @PermitAll
public CommonResult<String> getCameraUrl(String cameraCode) {
String url = hikService.getPreviewUrlsApi(cameraCode, 0);
return CommonResult.success(url);
@ -37,6 +38,7 @@ public class HikController {
@GetMapping("/m-getCameraUrl")
@Operation(summary = "视频播放->查询播放地址(微信用)")
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
public CommonResult<String> getMCameraUrl(String cameraCode) {
String url = hikService.getPreviewUrlsApiHttps(cameraCode);
@ -46,7 +48,8 @@ public class HikController {
@GetMapping("/replayUrl")
@Operation(summary = "视频播放->回放流")
@PermitAll
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
// @PermitAll
public CommonResult<JSONObject> getReplayUrl(CameraReplayDTO cameraReplayDTO) {
JSONObject replayUrl = hikService.getReplayUrl(cameraReplayDTO);
return CommonResult.success(replayUrl);
@ -54,7 +57,8 @@ public class HikController {
@GetMapping("/operate")
@Operation(summary = "视频->云台操作")
@PermitAll
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
// @PermitAll
public CommonResult<String> operate(CameraOperateDTO dto) {
String msg = hikService.operateCamera(dto);