修改, 监控查询权限
This commit is contained in:
parent
b5047b30f1
commit
876cb24927
@ -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 cn.iocoder.yudao.module.smartfactory.service.hik.HikService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.annotation.security.PermitAll;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工厂管理-工厂列表
|
* 工厂管理-工厂列表
|
||||||
@ -29,7 +29,8 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/getCameraUrl")
|
@GetMapping("/getCameraUrl")
|
||||||
@Operation(summary = "视频播放->查询播放地址")
|
@Operation(summary = "视频播放->查询播放地址")
|
||||||
@PermitAll
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
|
// @PermitAll
|
||||||
public CommonResult<String> getCameraUrl(String cameraCode) {
|
public CommonResult<String> getCameraUrl(String cameraCode) {
|
||||||
String url = hikService.getPreviewUrlsApi(cameraCode, 0);
|
String url = hikService.getPreviewUrlsApi(cameraCode, 0);
|
||||||
return CommonResult.success(url);
|
return CommonResult.success(url);
|
||||||
@ -37,6 +38,7 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/m-getCameraUrl")
|
@GetMapping("/m-getCameraUrl")
|
||||||
@Operation(summary = "视频播放->查询播放地址(微信用)")
|
@Operation(summary = "视频播放->查询播放地址(微信用)")
|
||||||
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
public CommonResult<String> getMCameraUrl(String cameraCode) {
|
public CommonResult<String> getMCameraUrl(String cameraCode) {
|
||||||
|
|
||||||
String url = hikService.getPreviewUrlsApiHttps(cameraCode);
|
String url = hikService.getPreviewUrlsApiHttps(cameraCode);
|
||||||
@ -46,7 +48,8 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/replayUrl")
|
@GetMapping("/replayUrl")
|
||||||
@Operation(summary = "视频播放->回放流")
|
@Operation(summary = "视频播放->回放流")
|
||||||
@PermitAll
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
|
// @PermitAll
|
||||||
public CommonResult<JSONObject> getReplayUrl(CameraReplayDTO cameraReplayDTO) {
|
public CommonResult<JSONObject> getReplayUrl(CameraReplayDTO cameraReplayDTO) {
|
||||||
JSONObject replayUrl = hikService.getReplayUrl(cameraReplayDTO);
|
JSONObject replayUrl = hikService.getReplayUrl(cameraReplayDTO);
|
||||||
return CommonResult.success(replayUrl);
|
return CommonResult.success(replayUrl);
|
||||||
@ -54,7 +57,8 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/operate")
|
@GetMapping("/operate")
|
||||||
@Operation(summary = "视频->云台操作")
|
@Operation(summary = "视频->云台操作")
|
||||||
@PermitAll
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
|
// @PermitAll
|
||||||
public CommonResult<String> operate(CameraOperateDTO dto) {
|
public CommonResult<String> operate(CameraOperateDTO dto) {
|
||||||
|
|
||||||
String msg = hikService.operateCamera(dto);
|
String msg = hikService.operateCamera(dto);
|
||||||
|
Loading…
Reference in New Issue
Block a user