为每个接口添加调试接口需要的描述

pull/1234/head
648540858 2023-12-26 15:30:24 +08:00
parent 7c07ae9421
commit f8d2b933b1
21 changed files with 157 additions and 117 deletions

View File

@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.vmanager.cloudRecord;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager; import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
@ -13,6 +14,7 @@ import com.genersoft.iot.vmp.vmanager.bean.PageInfo;
import com.genersoft.iot.vmp.vmanager.bean.RecordFile; import com.genersoft.iot.vmp.vmanager.bean.RecordFile;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -57,7 +59,7 @@ public class CloudRecordController {
@ResponseBody @ResponseBody
@GetMapping("/date/list") @GetMapping("/date/list")
@Operation(summary = "查询存在云端录像的日期") @Operation(summary = "查询存在云端录像的日期", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流ID", required = true) @Parameter(name = "stream", description = "流ID", required = true)
@Parameter(name = "year", description = "年,置空则查询当年", required = false) @Parameter(name = "year", description = "年,置空则查询当年", required = false)
@ -100,7 +102,7 @@ public class CloudRecordController {
@ResponseBody @ResponseBody
@GetMapping("/list") @GetMapping("/list")
@Operation(summary = "分页查询云端录像") @Operation(summary = "分页查询云端录像", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流ID", required = true) @Parameter(name = "stream", description = "流ID", required = true)
@Parameter(name = "page", description = "当前页", required = false) @Parameter(name = "page", description = "当前页", required = false)

View File

@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.vmanager.gb28181.MobilePosition; package com.genersoft.iot.vmp.vmanager.gb28181.MobilePosition;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.MobilePosition; import com.genersoft.iot.vmp.gb28181.bean.MobilePosition;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
@ -13,6 +14,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -59,7 +61,7 @@ public class MobilePositionController {
* @param end * @param end
* @return * @return
*/ */
@Operation(summary = "查询历史轨迹") @Operation(summary = "查询历史轨迹", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号") @Parameter(name = "channelId", description = "通道国标编号")
@Parameter(name = "start", description = "开始时间") @Parameter(name = "start", description = "开始时间")
@ -84,7 +86,7 @@ public class MobilePositionController {
* @param deviceId ID * @param deviceId ID
* @return * @return
*/ */
@Operation(summary = "查询设备最新位置") @Operation(summary = "查询设备最新位置", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/latest/{deviceId}") @GetMapping("/latest/{deviceId}")
public MobilePosition latestPosition(@PathVariable String deviceId) { public MobilePosition latestPosition(@PathVariable String deviceId) {
@ -96,7 +98,7 @@ public class MobilePositionController {
* @param deviceId ID * @param deviceId ID
* @return * @return
*/ */
@Operation(summary = "获取移动位置信息") @Operation(summary = "获取移动位置信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/realtime/{deviceId}") @GetMapping("/realtime/{deviceId}")
public DeferredResult<MobilePosition> realTimePosition(@PathVariable String deviceId) { public DeferredResult<MobilePosition> realTimePosition(@PathVariable String deviceId) {
@ -136,7 +138,7 @@ public class MobilePositionController {
* @param interval * @param interval
* @return true = * @return true =
*/ */
@Operation(summary = "订阅位置信息") @Operation(summary = "订阅位置信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "expires", description = "订阅超时时间", required = true) @Parameter(name = "expires", description = "订阅超时时间", required = true)
@Parameter(name = "interval", description = "上报时间间隔", required = true) @Parameter(name = "interval", description = "上报时间间隔", required = true)
@ -162,7 +164,7 @@ public class MobilePositionController {
* @param deviceId ID * @param deviceId ID
* @return true = * @return true =
*/ */
@Operation(summary = "数据位置信息格式处理") @Operation(summary = "数据位置信息格式处理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/transform/{deviceId}") @GetMapping("/transform/{deviceId}")
public void positionTransform(@PathVariable String deviceId) { public void positionTransform(@PathVariable String deviceId) {

View File

@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.vmanager.gb28181.alarm; package com.genersoft.iot.vmp.vmanager.gb28181.alarm;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm; import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
@ -13,6 +14,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -56,7 +58,7 @@ public class AlarmController {
* @return * @return
*/ */
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除报警") @Operation(summary = "删除报警", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "ID") @Parameter(name = "id", description = "ID")
@Parameter(name = "deviceIds", description = "多个设备id,逗号分隔") @Parameter(name = "deviceIds", description = "多个设备id,逗号分隔")
@Parameter(name = "time", description = "结束时间") @Parameter(name = "time", description = "结束时间")
@ -93,7 +95,7 @@ public class AlarmController {
* @return * @return
*/ */
@GetMapping("/test/notify/alarm") @GetMapping("/test/notify/alarm")
@Operation(summary = "测试向上级/设备发送模拟报警通知") @Operation(summary = "测试向上级/设备发送模拟报警通知", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号") @Parameter(name = "deviceId", description = "设备国标编号")
public void delete(@RequestParam String deviceId) { public void delete(@RequestParam String deviceId) {
Device device = storage.queryVideoDevice(deviceId); Device device = storage.queryVideoDevice(deviceId);
@ -141,7 +143,7 @@ public class AlarmController {
* @param endTime * @param endTime
* @return * @return
*/ */
@Operation(summary = "分页查询报警") @Operation(summary = "分页查询报警", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page",description = "当前页",required = true) @Parameter(name = "page",description = "当前页",required = true)
@Parameter(name = "count",description = "每页查询数量",required = true) @Parameter(name = "count",description = "每页查询数量",required = true)
@Parameter(name = "deviceId",description = "设备id") @Parameter(name = "deviceId",description = "设备id")

View File

@ -9,6 +9,7 @@ package com.genersoft.iot.vmp.vmanager.gb28181.device;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
@ -17,6 +18,7 @@ import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -57,7 +59,7 @@ public class DeviceConfig {
* @return * @return
*/ */
@GetMapping("/basicParam/{deviceId}") @GetMapping("/basicParam/{deviceId}")
@Operation(summary = "基本配置设置命令") @Operation(summary = "基本配置设置命令", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "name", description = "名称") @Parameter(name = "name", description = "名称")
@ -113,7 +115,7 @@ public class DeviceConfig {
* @param channelId ID * @param channelId ID
* @return * @return
*/ */
@Operation(summary = "设备配置查询请求") @Operation(summary = "设备配置查询请求", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "configType", description = "配置类型") @Parameter(name = "configType", description = "配置类型")

View File

@ -9,6 +9,7 @@ package com.genersoft.iot.vmp.vmanager.gb28181.device;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
@ -17,6 +18,7 @@ import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -53,7 +55,7 @@ public class DeviceControl {
* *
* @param deviceId ID * @param deviceId ID
*/ */
@Operation(summary = "远程启动控制命令") @Operation(summary = "远程启动控制命令", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/teleboot/{deviceId}") @GetMapping("/teleboot/{deviceId}")
public void teleBootApi(@PathVariable String deviceId) { public void teleBootApi(@PathVariable String deviceId) {
@ -76,7 +78,7 @@ public class DeviceControl {
* @param recordCmdStr RecordStopRecord * @param recordCmdStr RecordStopRecord
* @param channelId * @param channelId
*/ */
@Operation(summary = "录像控制") @Operation(summary = "录像控制", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "recordCmdStr", description = "命令, 可选值Record手动录像StopRecord停止手动录像", required = true) @Parameter(name = "recordCmdStr", description = "命令, 可选值Record手动录像StopRecord停止手动录像", required = true)
@ -125,7 +127,7 @@ public class DeviceControl {
* @param deviceId ID * @param deviceId ID
* @param guardCmdStr SetGuardResetGuard * @param guardCmdStr SetGuardResetGuard
*/ */
@Operation(summary = "布防/撤防命令") @Operation(summary = "布防/撤防命令", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "guardCmdStr", description = "命令, 可选值SetGuard布防ResetGuard撤防", required = true) @Parameter(name = "guardCmdStr", description = "命令, 可选值SetGuard布防ResetGuard撤防", required = true)
@GetMapping("/guard/{deviceId}/{guardCmdStr}") @GetMapping("/guard/{deviceId}/{guardCmdStr}")
@ -170,7 +172,7 @@ public class DeviceControl {
* @param alarmMethod * @param alarmMethod
* @param alarmType * @param alarmType
*/ */
@Operation(summary = "报警复位") @Operation(summary = "报警复位", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "alarmMethod", description = "报警方式") @Parameter(name = "alarmMethod", description = "报警方式")
@ -217,7 +219,7 @@ public class DeviceControl {
* @param deviceId ID * @param deviceId ID
* @param channelId ID * @param channelId ID
*/ */
@Operation(summary = "强制关键帧") @Operation(summary = "强制关键帧", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号") @Parameter(name = "channelId", description = "通道国标编号")
@GetMapping("/i_frame/{deviceId}") @GetMapping("/i_frame/{deviceId}")
@ -249,7 +251,7 @@ public class DeviceControl {
* @param presetIndex * @param presetIndex
* @param channelId * @param channelId
*/ */
@Operation(summary = "看守位控制") @Operation(summary = "看守位控制", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "enabled", description = "是否开启看守位 1:开启,0:关闭", required = true) @Parameter(name = "enabled", description = "是否开启看守位 1:开启,0:关闭", required = true)
@ -309,7 +311,7 @@ public class DeviceControl {
* @param lengthy * @param lengthy
* @return * @return
*/ */
@Operation(summary = "拉框放大") @Operation(summary = "拉框放大", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "length", description = "播放窗口长度像素值", required = true) @Parameter(name = "length", description = "播放窗口长度像素值", required = true)
@ -359,7 +361,7 @@ public class DeviceControl {
* @param lengthy * @param lengthy
* @return * @return
*/ */
@Operation(summary = "拉框放大") @Operation(summary = "拉框缩小", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号") @Parameter(name = "channelId", description = "通道国标编号")
@Parameter(name = "length", description = "播放窗口长度像素值", required = true) @Parameter(name = "length", description = "播放窗口长度像素值", required = true)

View File

@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.vmanager.gb28181.device;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
import com.genersoft.iot.vmp.gb28181.bean.SyncStatus; import com.genersoft.iot.vmp.gb28181.bean.SyncStatus;
@ -23,6 +24,7 @@ import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.compress.utils.IOUtils;
import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Options;
@ -85,7 +87,7 @@ public class DeviceQuery {
* @param deviceId ID * @param deviceId ID
* @return * @return
*/ */
@Operation(summary = "查询国标设备") @Operation(summary = "查询国标设备", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/devices/{deviceId}") @GetMapping("/devices/{deviceId}")
public Device devices(@PathVariable String deviceId){ public Device devices(@PathVariable String deviceId){
@ -99,7 +101,7 @@ public class DeviceQuery {
* @param count * @param count
* @return * @return
*/ */
@Operation(summary = "分页查询国标设备") @Operation(summary = "分页查询国标设备", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true) @Parameter(name = "count", description = "每页查询数量", required = true)
@GetMapping("/devices") @GetMapping("/devices")
@ -123,7 +125,7 @@ public class DeviceQuery {
* @return * @return
*/ */
@GetMapping("/devices/{deviceId}/channels") @GetMapping("/devices/{deviceId}/channels")
@Operation(summary = "分页查询通道") @Operation(summary = "分页查询通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true) @Parameter(name = "count", description = "每页查询数量", required = true)
@ -149,7 +151,7 @@ public class DeviceQuery {
* @param deviceId id * @param deviceId id
* @return * @return
*/ */
@Operation(summary = "同步设备通道") @Operation(summary = "同步设备通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/devices/{deviceId}/sync") @GetMapping("/devices/{deviceId}/sync")
public WVPResult<SyncStatus> devicesSync(@PathVariable String deviceId){ public WVPResult<SyncStatus> devicesSync(@PathVariable String deviceId){
@ -177,7 +179,7 @@ public class DeviceQuery {
* @param deviceId id * @param deviceId id
* @return * @return
*/ */
@Operation(summary = "移除设备") @Operation(summary = "移除设备", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@DeleteMapping("/devices/{deviceId}/delete") @DeleteMapping("/devices/{deviceId}/delete")
public String delete(@PathVariable String deviceId){ public String delete(@PathVariable String deviceId){
@ -222,7 +224,7 @@ public class DeviceQuery {
* @param channelType * @param channelType
* @return * @return
*/ */
@Operation(summary = "分页查询子目录通道") @Operation(summary = "分页查询子目录通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@ -254,7 +256,7 @@ public class DeviceQuery {
* @param channel * @param channel
* @return * @return
*/ */
@Operation(summary = "更新通道信息") @Operation(summary = "更新通道信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channel", description = "通道信息", required = true) @Parameter(name = "channel", description = "通道信息", required = true)
@PostMapping("/channel/update/{deviceId}") @PostMapping("/channel/update/{deviceId}")
@ -268,7 +270,7 @@ public class DeviceQuery {
* @param streamMode * @param streamMode
* @return * @return
*/ */
@Operation(summary = "修改数据流传输模式") @Operation(summary = "修改数据流传输模式", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "streamMode", description = "数据流传输模式, 取值:" + @Parameter(name = "streamMode", description = "数据流传输模式, 取值:" +
"UDPudp传输TCP-ACTIVEtcp主动模式,暂不支持TCP-PASSIVEtcp被动模式", required = true) "UDPudp传输TCP-ACTIVEtcp主动模式,暂不支持TCP-PASSIVEtcp被动模式", required = true)
@ -284,7 +286,7 @@ public class DeviceQuery {
* @param device * @param device
* @return * @return
*/ */
@Operation(summary = "添加设备信息") @Operation(summary = "添加设备信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "device", description = "设备", required = true) @Parameter(name = "device", description = "设备", required = true)
@PostMapping("/device/add/") @PostMapping("/device/add/")
public void addDevice(Device device){ public void addDevice(Device device){
@ -306,7 +308,7 @@ public class DeviceQuery {
* @param device * @param device
* @return * @return
*/ */
@Operation(summary = "更新设备信息") @Operation(summary = "更新设备信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "device", description = "设备", required = true) @Parameter(name = "device", description = "设备", required = true)
@PostMapping("/device/update/") @PostMapping("/device/update/")
public void updateDevice(Device device){ public void updateDevice(Device device){
@ -321,7 +323,7 @@ public class DeviceQuery {
* *
* @param deviceId id * @param deviceId id
*/ */
@Operation(summary = "设备状态查询") @Operation(summary = "设备状态查询", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/devices/{deviceId}/status") @GetMapping("/devices/{deviceId}/status")
public DeferredResult<ResponseEntity<String>> deviceStatusApi(@PathVariable String deviceId) { public DeferredResult<ResponseEntity<String>> deviceStatusApi(@PathVariable String deviceId) {
@ -372,7 +374,7 @@ public class DeviceQuery {
* @param endTime * @param endTime
* @return true = * @return true =
*/ */
@Operation(summary = "设备状态查询") @Operation(summary = "设备报警查询", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "startPriority", description = "报警起始级别") @Parameter(name = "startPriority", description = "报警起始级别")
@Parameter(name = "endPriority", description = "报警终止级别") @Parameter(name = "endPriority", description = "报警终止级别")
@ -422,7 +424,7 @@ public class DeviceQuery {
@GetMapping("/{deviceId}/sync_status") @GetMapping("/{deviceId}/sync_status")
@Operation(summary = "获取通道同步进度") @Operation(summary = "获取通道同步进度", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
public WVPResult<SyncStatus> getSyncStatus(@PathVariable String deviceId) { public WVPResult<SyncStatus> getSyncStatus(@PathVariable String deviceId) {
SyncStatus channelSyncStatus = deviceService.getChannelSyncStatus(deviceId); SyncStatus channelSyncStatus = deviceService.getChannelSyncStatus(deviceId);
@ -442,7 +444,7 @@ public class DeviceQuery {
} }
@GetMapping("/{deviceId}/subscribe_info") @GetMapping("/{deviceId}/subscribe_info")
@Operation(summary = "获取设备的订阅状态") @Operation(summary = "获取设备的订阅状态", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
public WVPResult<Map<String, Integer>> getSubscribeInfo(@PathVariable String deviceId) { public WVPResult<Map<String, Integer>> getSubscribeInfo(@PathVariable String deviceId) {
Set<String> allKeys = dynamicTask.getAllKeys(); Set<String> allKeys = dynamicTask.getAllKeys();

View File

@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.vmanager.gb28181.gbStream; package com.genersoft.iot.vmp.vmanager.gb28181.gbStream;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.GbStream; import com.genersoft.iot.vmp.gb28181.bean.GbStream;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.service.IGbStreamService; import com.genersoft.iot.vmp.service.IGbStreamService;
@ -11,6 +12,7 @@ import com.genersoft.iot.vmp.vmanager.gb28181.gbStream.bean.GbStreamParam;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -43,7 +45,7 @@ public class GbStreamController {
* @param platformId ID * @param platformId ID
* @return * @return
*/ */
@Operation(summary = "查询国标通道") @Operation(summary = "查询国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页条数", required = true) @Parameter(name = "count", description = "每页条数", required = true)
@Parameter(name = "platformId", description = "平台ID", required = true) @Parameter(name = "platformId", description = "平台ID", required = true)
@ -79,7 +81,7 @@ public class GbStreamController {
* @param gbStreamParam * @param gbStreamParam
* @return * @return
*/ */
@Operation(summary = "移除国标关联") @Operation(summary = "移除国标关联", security = @SecurityRequirement(name = JwtUtils.HEADER))
@DeleteMapping(value = "/del") @DeleteMapping(value = "/del")
@ResponseBody @ResponseBody
public void del(@RequestBody GbStreamParam gbStreamParam){ public void del(@RequestBody GbStreamParam gbStreamParam){
@ -99,7 +101,7 @@ public class GbStreamController {
* @param gbStreamParam * @param gbStreamParam
* @return * @return
*/ */
@Operation(summary = "保存国标关联") @Operation(summary = "保存国标关联", security = @SecurityRequirement(name = JwtUtils.HEADER))
@PostMapping(value = "/add") @PostMapping(value = "/add")
@ResponseBody @ResponseBody
public void add(@RequestBody GbStreamParam gbStreamParam){ public void add(@RequestBody GbStreamParam gbStreamParam){
@ -118,7 +120,7 @@ public class GbStreamController {
* @param gbId * @param gbId
* @return * @return
*/ */
@Operation(summary = "保存国标关联") @Operation(summary = "保存国标关联", security = @SecurityRequirement(name = JwtUtils.HEADER))
@GetMapping(value = "/addWithGbid") @GetMapping(value = "/addWithGbid")
@ResponseBody @ResponseBody
public void add(String gbId, String platformGbId, @RequestParam(required = false) String catalogGbId){ public void add(String gbId, String platformGbId, @RequestParam(required = false) String catalogGbId){

View File

@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.vmanager.gb28181.media;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.conf.security.SecurityUtils; import com.genersoft.iot.vmp.conf.security.SecurityUtils;
import com.genersoft.iot.vmp.conf.security.dto.LoginUser; import com.genersoft.iot.vmp.conf.security.dto.LoginUser;
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo; import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
@ -12,6 +13,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.genersoft.iot.vmp.vmanager.bean.StreamContent; import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -45,7 +47,7 @@ public class MediaController {
* @param stream id * @param stream id
* @return * @return
*/ */
@Operation(summary = "根据应用名和流id获取播放地址") @Operation(summary = "根据应用名和流id获取播放地址", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流id", required = true) @Parameter(name = "stream", description = "流id", required = true)
@Parameter(name = "mediaServerId", description = "媒体服务器id") @Parameter(name = "mediaServerId", description = "媒体服务器id")

View File

@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch;
import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog; import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog;
@ -21,6 +22,7 @@ import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.UpdateChannelParam;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -83,7 +85,7 @@ public class PlatformController {
* *
* @return * @return
*/ */
@Operation(summary = "获取国标服务的配置") @Operation(summary = "获取国标服务的配置", security = @SecurityRequirement(name = JwtUtils.HEADER))
@GetMapping("/server_config") @GetMapping("/server_config")
public JSONObject serverConfig() { public JSONObject serverConfig() {
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
@ -99,7 +101,7 @@ public class PlatformController {
* *
* @return * @return
*/ */
@Operation(summary = "获取级联服务器信息") @Operation(summary = "获取级联服务器信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "平台国标编号", required = true) @Parameter(name = "id", description = "平台国标编号", required = true)
@GetMapping("/info/{id}") @GetMapping("/info/{id}")
public ParentPlatform getPlatform(@PathVariable String id) { public ParentPlatform getPlatform(@PathVariable String id) {
@ -119,7 +121,7 @@ public class PlatformController {
* @return * @return
*/ */
@GetMapping("/query/{count}/{page}") @GetMapping("/query/{count}/{page}")
@Operation(summary = "分页查询级联平台") @Operation(summary = "分页查询级联平台", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页条数", required = true) @Parameter(name = "count", description = "每页条数", required = true)
public PageInfo<ParentPlatform> platforms(@PathVariable int page, @PathVariable int count) { public PageInfo<ParentPlatform> platforms(@PathVariable int page, @PathVariable int count) {
@ -140,7 +142,7 @@ public class PlatformController {
* @param parentPlatform * @param parentPlatform
* @return * @return
*/ */
@Operation(summary = "添加上级平台信息") @Operation(summary = "添加上级平台信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public void addPlatform(@RequestBody ParentPlatform parentPlatform) { public void addPlatform(@RequestBody ParentPlatform parentPlatform) {
@ -185,7 +187,7 @@ public class PlatformController {
* @param parentPlatform * @param parentPlatform
* @return * @return
*/ */
@Operation(summary = "保存上级平台信息") @Operation(summary = "保存上级平台信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@PostMapping("/save") @PostMapping("/save")
@ResponseBody @ResponseBody
public void savePlatform(@RequestBody ParentPlatform parentPlatform) { public void savePlatform(@RequestBody ParentPlatform parentPlatform) {
@ -216,7 +218,7 @@ public class PlatformController {
* @param serverGBId ID * @param serverGBId ID
* @return * @return
*/ */
@Operation(summary = "删除上级平台") @Operation(summary = "删除上级平台", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "serverGBId", description = "上级平台的国标编号") @Parameter(name = "serverGBId", description = "上级平台的国标编号")
@DeleteMapping("/delete/{serverGBId}") @DeleteMapping("/delete/{serverGBId}")
@ResponseBody @ResponseBody
@ -273,7 +275,7 @@ public class PlatformController {
* @param serverGBId ID * @param serverGBId ID
* @return * @return
*/ */
@Operation(summary = "查询上级平台是否存在") @Operation(summary = "查询上级平台是否存在", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "serverGBId", description = "上级平台的国标编号") @Parameter(name = "serverGBId", description = "上级平台的国标编号")
@GetMapping("/exit/{serverGBId}") @GetMapping("/exit/{serverGBId}")
@ResponseBody @ResponseBody
@ -294,7 +296,7 @@ public class PlatformController {
* @param channelType * @param channelType
* @return * @return
*/ */
@Operation(summary = "查询上级平台是否存在") @Operation(summary = "查询上级平台是否存在", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页条数", required = true) @Parameter(name = "count", description = "每页条数", required = true)
@Parameter(name = "platformId", description = "上级平台的国标编号") @Parameter(name = "platformId", description = "上级平台的国标编号")
@ -331,7 +333,7 @@ public class PlatformController {
* @param param * @param param
* @return * @return
*/ */
@Operation(summary = "向上级平台添加国标通道") @Operation(summary = "向上级平台添加国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@PostMapping("/update_channel_for_gb") @PostMapping("/update_channel_for_gb")
@ResponseBody @ResponseBody
public void updateChannelForGB(@RequestBody UpdateChannelParam param) { public void updateChannelForGB(@RequestBody UpdateChannelParam param) {
@ -360,7 +362,7 @@ public class PlatformController {
* @param param * @param param
* @return * @return
*/ */
@Operation(summary = "从上级平台移除国标通道") @Operation(summary = "从上级平台移除国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@DeleteMapping("/del_channel_for_gb") @DeleteMapping("/del_channel_for_gb")
@ResponseBody @ResponseBody
public void delChannelForGB(@RequestBody UpdateChannelParam param) { public void delChannelForGB(@RequestBody UpdateChannelParam param) {
@ -389,7 +391,7 @@ public class PlatformController {
* @param parentId ID * @param parentId ID
* @return * @return
*/ */
@Operation(summary = "获取目录") @Operation(summary = "获取目录", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "platformId", description = "上级平台的国标编号", required = true) @Parameter(name = "platformId", description = "上级平台的国标编号", required = true)
@Parameter(name = "parentId", description = "父级目录的国标编号", required = true) @Parameter(name = "parentId", description = "父级目录的国标编号", required = true)
@GetMapping("/catalog") @GetMapping("/catalog")
@ -420,7 +422,7 @@ public class PlatformController {
* @param platformCatalog * @param platformCatalog
* @return * @return
*/ */
@Operation(summary = "添加目录") @Operation(summary = "添加目录", security = @SecurityRequirement(name = JwtUtils.HEADER))
@PostMapping("/catalog/add") @PostMapping("/catalog/add")
@ResponseBody @ResponseBody
public void addCatalog(@RequestBody PlatformCatalog platformCatalog) { public void addCatalog(@RequestBody PlatformCatalog platformCatalog) {
@ -445,7 +447,7 @@ public class PlatformController {
* @param platformCatalog * @param platformCatalog
* @return * @return
*/ */
@Operation(summary = "编辑目录") @Operation(summary = "编辑目录", security = @SecurityRequirement(name = JwtUtils.HEADER))
@PostMapping("/catalog/edit") @PostMapping("/catalog/edit")
@ResponseBody @ResponseBody
public void editCatalog(@RequestBody PlatformCatalog platformCatalog) { public void editCatalog(@RequestBody PlatformCatalog platformCatalog) {
@ -471,7 +473,7 @@ public class PlatformController {
* @param platformId Id * @param platformId Id
* @return * @return
*/ */
@Operation(summary = "删除目录") @Operation(summary = "删除目录", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "目录Id", required = true) @Parameter(name = "id", description = "目录Id", required = true)
@Parameter(name = "platformId", description = "平台Id", required = true) @Parameter(name = "platformId", description = "平台Id", required = true)
@DeleteMapping("/catalog/del") @DeleteMapping("/catalog/del")
@ -506,7 +508,7 @@ public class PlatformController {
* @param platformCatalog * @param platformCatalog
* @return * @return
*/ */
@Operation(summary = "删除关联") @Operation(summary = "删除关联", security = @SecurityRequirement(name = JwtUtils.HEADER))
@DeleteMapping("/catalog/relation/del") @DeleteMapping("/catalog/relation/del")
@ResponseBody @ResponseBody
public void delRelation(@RequestBody PlatformCatalog platformCatalog) { public void delRelation(@RequestBody PlatformCatalog platformCatalog) {
@ -529,7 +531,7 @@ public class PlatformController {
* @param catalogId Id * @param catalogId Id
* @return * @return
*/ */
@Operation(summary = "修改默认目录") @Operation(summary = "修改默认目录", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "catalogId", description = "目录Id", required = true) @Parameter(name = "catalogId", description = "目录Id", required = true)
@Parameter(name = "platformId", description = "平台Id", required = true) @Parameter(name = "platformId", description = "平台Id", required = true)
@PostMapping("/catalog/default/update") @PostMapping("/catalog/default/update")

View File

@ -9,6 +9,7 @@ import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException; import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.SsrcTransaction; import com.genersoft.iot.vmp.gb28181.bean.SsrcTransaction;
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager; import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
@ -30,6 +31,7 @@ import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult; import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -87,7 +89,7 @@ public class PlayController {
@Autowired @Autowired
private UserSetting userSetting; private UserSetting userSetting;
@Operation(summary = "开始点播") @Operation(summary = "开始点播", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@GetMapping("/start/{deviceId}/{channelId}") @GetMapping("/start/{deviceId}/{channelId}")
@ -152,7 +154,7 @@ public class PlayController {
return result; return result;
} }
@Operation(summary = "停止点播") @Operation(summary = "停止点播", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "isSubStream", description = "是否子码流true-子码流false-主码流默认为false", required = true) @Parameter(name = "isSubStream", description = "是否子码流true-子码流false-主码流默认为false", required = true)
@ -197,7 +199,7 @@ public class PlayController {
* h264ffmpeg h264 + aac * h264ffmpeg h264 + aac
* @param streamId ID * @param streamId ID
*/ */
@Operation(summary = "将不是h264的视频通过ffmpeg 转码为h264 + aac") @Operation(summary = "将不是h264的视频通过ffmpeg 转码为h264 + aac", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "streamId", description = "视频流ID", required = true) @Parameter(name = "streamId", description = "视频流ID", required = true)
@PostMapping("/convert/{streamId}") @PostMapping("/convert/{streamId}")
public JSONObject playConvert(@PathVariable String streamId) { public JSONObject playConvert(@PathVariable String streamId) {
@ -239,7 +241,7 @@ public class PlayController {
/** /**
* *
*/ */
@Operation(summary = "结束转码") @Operation(summary = "结束转码", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "key", description = "视频流key", required = true) @Parameter(name = "key", description = "视频流key", required = true)
@Parameter(name = "mediaServerId", description = "流媒体服务ID", required = true) @Parameter(name = "mediaServerId", description = "流媒体服务ID", required = true)
@PostMapping("/convertStop/{key}") @PostMapping("/convertStop/{key}")
@ -264,7 +266,7 @@ public class PlayController {
} }
} }
@Operation(summary = "语音广播命令") @Operation(summary = "语音广播命令", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/broadcast/{deviceId}") @GetMapping("/broadcast/{deviceId}")
@PostMapping("/broadcast/{deviceId}") @PostMapping("/broadcast/{deviceId}")
@ -330,7 +332,7 @@ public class PlayController {
return result; return result;
} }
@Operation(summary = "获取所有的ssrc") @Operation(summary = "获取所有的ssrc", security = @SecurityRequirement(name = JwtUtils.HEADER))
@GetMapping("/ssrc") @GetMapping("/ssrc")
public JSONObject getSSRC() { public JSONObject getSSRC() {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
@ -353,7 +355,7 @@ public class PlayController {
return jsonObject; return jsonObject;
} }
@Operation(summary = "获取截图") @Operation(summary = "获取截图", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "isSubStream", description = "是否子码流true-子码流false-主码流默认为false", required = true) @Parameter(name = "isSubStream", description = "是否子码流true-子码流false-主码流默认为false", required = true)

View File

@ -7,6 +7,7 @@ import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.exception.ServiceException; import com.genersoft.iot.vmp.conf.exception.ServiceException;
import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException; import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
@ -20,6 +21,7 @@ import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult; import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -68,7 +70,7 @@ public class PlaybackController {
@Autowired @Autowired
private UserSetting userSetting; private UserSetting userSetting;
@Operation(summary = "开始视频回放") @Operation(summary = "开始视频回放", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "startTime", description = "开始时间", required = true) @Parameter(name = "startTime", description = "开始时间", required = true)
@ -125,7 +127,7 @@ public class PlaybackController {
} }
@Operation(summary = "停止视频回放") @Operation(summary = "停止视频回放", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "stream", description = "流ID", required = true) @Parameter(name = "stream", description = "流ID", required = true)
@ -149,7 +151,7 @@ public class PlaybackController {
} }
@Operation(summary = "回放暂停") @Operation(summary = "回放暂停", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "streamId", description = "回放流ID", required = true) @Parameter(name = "streamId", description = "回放流ID", required = true)
@GetMapping("/pause/{streamId}") @GetMapping("/pause/{streamId}")
public void playPause(@PathVariable String streamId) { public void playPause(@PathVariable String streamId) {
@ -165,7 +167,7 @@ public class PlaybackController {
} }
@Operation(summary = "回放恢复") @Operation(summary = "回放恢复", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "streamId", description = "回放流ID", required = true) @Parameter(name = "streamId", description = "回放流ID", required = true)
@GetMapping("/resume/{streamId}") @GetMapping("/resume/{streamId}")
public void playResume(@PathVariable String streamId) { public void playResume(@PathVariable String streamId) {
@ -180,7 +182,7 @@ public class PlaybackController {
} }
@Operation(summary = "回放拖动播放") @Operation(summary = "回放拖动播放", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "streamId", description = "回放流ID", required = true) @Parameter(name = "streamId", description = "回放流ID", required = true)
@Parameter(name = "seekTime", description = "拖动偏移量单位s", required = true) @Parameter(name = "seekTime", description = "拖动偏移量单位s", required = true)
@GetMapping("/seek/{streamId}/{seekTime}") @GetMapping("/seek/{streamId}/{seekTime}")
@ -200,7 +202,7 @@ public class PlaybackController {
} }
} }
@Operation(summary = "回放倍速播放") @Operation(summary = "回放倍速播放", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "streamId", description = "回放流ID", required = true) @Parameter(name = "streamId", description = "回放流ID", required = true)
@Parameter(name = "speed", description = "倍速0.25 0.5 1、2、4", required = true) @Parameter(name = "speed", description = "倍速0.25 0.5 1、2、4", required = true)
@GetMapping("/speed/{streamId}/{speed}") @GetMapping("/speed/{streamId}/{speed}")

View File

@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.vmanager.gb28181.ptz;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
@ -10,6 +11,7 @@ import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -50,7 +52,7 @@ public class PtzController {
* @param zoomSpeed * @param zoomSpeed
*/ */
@Operation(summary = "云台控制") @Operation(summary = "云台控制", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "command", description = "控制指令,允许值: left, right, up, down, upleft, upright, downleft, downright, zoomin, zoomout, stop", required = true) @Parameter(name = "command", description = "控制指令,允许值: left, right, up, down, upleft, upright, downleft, downright, zoomin, zoomout, stop", required = true)
@ -113,7 +115,7 @@ public class PtzController {
} }
@Operation(summary = "通用前端控制命令") @Operation(summary = "通用前端控制命令", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "cmdCode", description = "指令码", required = true) @Parameter(name = "cmdCode", description = "指令码", required = true)
@ -137,7 +139,7 @@ public class PtzController {
} }
@Operation(summary = "预置位查询") @Operation(summary = "预置位查询", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@GetMapping("/preset/query/{deviceId}/{channelId}") @GetMapping("/preset/query/{deviceId}/{channelId}")

View File

@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException; import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo; import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
@ -19,6 +20,7 @@ import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult; import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -61,7 +63,7 @@ public class GBRecordController {
@Autowired @Autowired
private UserSetting userSetting; private UserSetting userSetting;
@Operation(summary = "录像查询") @Operation(summary = "录像查询", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "startTime", description = "开始时间", required = true) @Parameter(name = "startTime", description = "开始时间", required = true)
@ -115,7 +117,7 @@ public class GBRecordController {
} }
@Operation(summary = "开始历史媒体下载") @Operation(summary = "开始历史媒体下载", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "startTime", description = "开始时间", required = true) @Parameter(name = "startTime", description = "开始时间", required = true)
@ -164,7 +166,7 @@ public class GBRecordController {
return result; return result;
} }
@Operation(summary = "停止历史媒体下载") @Operation(summary = "停止历史媒体下载", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "stream", description = "流ID", required = true) @Parameter(name = "stream", description = "流ID", required = true)
@ -192,7 +194,7 @@ public class GBRecordController {
} }
} }
@Operation(summary = "获取历史媒体下载进度") @Operation(summary = "获取历史媒体下载进度", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "stream", description = "流ID", required = true) @Parameter(name = "stream", description = "流ID", required = true)

View File

@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.vmanager.log;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.service.ILogService; import com.genersoft.iot.vmp.service.ILogService;
import com.genersoft.iot.vmp.storager.dao.dto.LogDto; import com.genersoft.iot.vmp.storager.dao.dto.LogDto;
import com.genersoft.iot.vmp.utils.DateUtil; import com.genersoft.iot.vmp.utils.DateUtil;
@ -9,6 +10,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -42,7 +44,7 @@ public class LogController {
* @return * @return
*/ */
@GetMapping("/all") @GetMapping("/all")
@Operation(summary = "分页查询日志") @Operation(summary = "分页查询日志", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "query", description = "查询内容", required = true) @Parameter(name = "query", description = "查询内容", required = true)
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true) @Parameter(name = "count", description = "每页查询数量", required = true)
@ -84,7 +86,7 @@ public class LogController {
* *
* *
*/ */
@Operation(summary = "清空日志") @Operation(summary = "清空日志", security = @SecurityRequirement(name = JwtUtils.HEADER))
@DeleteMapping("/clear") @DeleteMapping("/clear")
public void clear() { public void clear() {
logService.clear(); logService.clear();

View File

@ -5,6 +5,7 @@ import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager; import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
@ -19,6 +20,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.genersoft.iot.vmp.vmanager.bean.OtherPsSendInfo; import com.genersoft.iot.vmp.vmanager.bean.OtherPsSendInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
@ -69,7 +71,7 @@ public class PsController {
@GetMapping(value = "/receive/open") @GetMapping(value = "/receive/open")
@ResponseBody @ResponseBody
@Operation(summary = "开启收流和获取发流信息") @Operation(summary = "开启收流和获取发流信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "isSend", description = "是否发送false时只开启收流 true同时返回推流信息", required = true) @Parameter(name = "isSend", description = "是否发送false时只开启收流 true同时返回推流信息", required = true)
@Parameter(name = "callId", description = "整个过程的唯一标识,为了与后续接口关联", required = true) @Parameter(name = "callId", description = "整个过程的唯一标识,为了与后续接口关联", required = true)
@Parameter(name = "ssrc", description = "来源流的SSRC不传则不校验来源ssrc", required = false) @Parameter(name = "ssrc", description = "来源流的SSRC不传则不校验来源ssrc", required = false)
@ -152,7 +154,7 @@ public class PsController {
@GetMapping(value = "/receive/close") @GetMapping(value = "/receive/close")
@ResponseBody @ResponseBody
@Operation(summary = "关闭收流") @Operation(summary = "关闭收流", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "stream", description = "流的ID", required = true) @Parameter(name = "stream", description = "流的ID", required = true)
public void closeRtpServer(String stream) { public void closeRtpServer(String stream) {
logger.info("[第三方PS服务对接->关闭收流] stream->{}", stream); logger.info("[第三方PS服务对接->关闭收流] stream->{}", stream);
@ -170,7 +172,7 @@ public class PsController {
@GetMapping(value = "/send/start") @GetMapping(value = "/send/start")
@ResponseBody @ResponseBody
@Operation(summary = "发送流") @Operation(summary = "发送流", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "ssrc", description = "发送流的SSRC", required = true) @Parameter(name = "ssrc", description = "发送流的SSRC", required = true)
@Parameter(name = "dstIp", description = "目标收流IP", required = true) @Parameter(name = "dstIp", description = "目标收流IP", required = true)
@Parameter(name = "dstPort", description = "目标收流端口", required = true) @Parameter(name = "dstPort", description = "目标收流端口", required = true)

View File

@ -5,6 +5,7 @@ import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager; import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
@ -19,6 +20,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.genersoft.iot.vmp.vmanager.bean.OtherRtpSendInfo; import com.genersoft.iot.vmp.vmanager.bean.OtherRtpSendInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
@ -69,7 +71,7 @@ public class RtpController {
@GetMapping(value = "/receive/open") @GetMapping(value = "/receive/open")
@ResponseBody @ResponseBody
@Operation(summary = "开启收流和获取发流信息") @Operation(summary = "开启收流和获取发流信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "isSend", description = "是否发送false时只开启收流 true同时返回推流信息", required = true) @Parameter(name = "isSend", description = "是否发送false时只开启收流 true同时返回推流信息", required = true)
@Parameter(name = "callId", description = "整个过程的唯一标识,为了与后续接口关联", required = true) @Parameter(name = "callId", description = "整个过程的唯一标识,为了与后续接口关联", required = true)
@Parameter(name = "ssrc", description = "来源流的SSRC不传则不校验来源ssrc", required = false) @Parameter(name = "ssrc", description = "来源流的SSRC不传则不校验来源ssrc", required = false)
@ -156,7 +158,7 @@ public class RtpController {
@GetMapping(value = "/receive/close") @GetMapping(value = "/receive/close")
@ResponseBody @ResponseBody
@Operation(summary = "关闭收流") @Operation(summary = "关闭收流", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "stream", description = "流的ID", required = true) @Parameter(name = "stream", description = "流的ID", required = true)
public void closeRtpServer(String stream) { public void closeRtpServer(String stream) {
logger.info("[第三方服务对接->关闭收流] stream->{}", stream); logger.info("[第三方服务对接->关闭收流] stream->{}", stream);
@ -175,7 +177,7 @@ public class RtpController {
@GetMapping(value = "/send/start") @GetMapping(value = "/send/start")
@ResponseBody @ResponseBody
@Operation(summary = "发送流") @Operation(summary = "发送流", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "ssrc", description = "发送流的SSRC", required = true) @Parameter(name = "ssrc", description = "发送流的SSRC", required = true)
@Parameter(name = "dstIpForAudio", description = "目标音频收流IP", required = false) @Parameter(name = "dstIpForAudio", description = "目标音频收流IP", required = false)
@Parameter(name = "dstIpForVideo", description = "目标视频收流IP", required = false) @Parameter(name = "dstIpForVideo", description = "目标视频收流IP", required = false)
@ -351,7 +353,7 @@ public class RtpController {
@GetMapping(value = "/send/stop") @GetMapping(value = "/send/stop")
@ResponseBody @ResponseBody
@Operation(summary = "关闭发送流") @Operation(summary = "关闭发送流", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "callId", description = "整个过程的唯一标识,不传则使用随机端口发流", required = true) @Parameter(name = "callId", description = "整个过程的唯一标识,不传则使用随机端口发流", required = true)
public void closeSendRTP(String callId) { public void closeSendRTP(String callId) {
logger.info("[第三方服务对接->关闭发送流] callId->{}", callId); logger.info("[第三方服务对接->关闭发送流] callId->{}", callId);

View File

@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.conf.SipConfig;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.VersionInfo; import com.genersoft.iot.vmp.conf.VersionInfo;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager; import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
import com.genersoft.iot.vmp.media.zlm.dto.IHookSubscribe; import com.genersoft.iot.vmp.media.zlm.dto.IHookSubscribe;
@ -21,6 +22,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ResourceInfo;
import com.genersoft.iot.vmp.vmanager.bean.SystemConfigInfo; import com.genersoft.iot.vmp.vmanager.bean.SystemConfigInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -79,27 +81,27 @@ public class ServerController {
@GetMapping(value = "/media_server/list") @GetMapping(value = "/media_server/list")
@ResponseBody @ResponseBody
@Operation(summary = "流媒体服务列表") @Operation(summary = "流媒体服务列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
public List<MediaServerItem> getMediaServerList() { public List<MediaServerItem> getMediaServerList() {
return mediaServerService.getAll(); return mediaServerService.getAll();
} }
@GetMapping(value = "/media_server/online/list") @GetMapping(value = "/media_server/online/list")
@ResponseBody @ResponseBody
@Operation(summary = "在线流媒体服务列表") @Operation(summary = "在线流媒体服务列表", security = @SecurityRequirement(name = JwtUtils.HEADER))
public List<MediaServerItem> getOnlineMediaServerList() { public List<MediaServerItem> getOnlineMediaServerList() {
return mediaServerService.getAllOnline(); return mediaServerService.getAllOnline();
} }
@GetMapping(value = "/media_server/one/{id}") @GetMapping(value = "/media_server/one/{id}")
@ResponseBody @ResponseBody
@Operation(summary = "停止视频回放") @Operation(summary = "停止视频回放", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "流媒体服务ID", required = true) @Parameter(name = "id", description = "流媒体服务ID", required = true)
public MediaServerItem getMediaServer(@PathVariable String id) { public MediaServerItem getMediaServer(@PathVariable String id) {
return mediaServerService.getOne(id); return mediaServerService.getOne(id);
} }
@Operation(summary = "测试流媒体服务") @Operation(summary = "测试流媒体服务", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "ip", description = "流媒体服务IP", required = true) @Parameter(name = "ip", description = "流媒体服务IP", required = true)
@Parameter(name = "port", description = "流媒体服务HTT端口", required = true) @Parameter(name = "port", description = "流媒体服务HTT端口", required = true)
@Parameter(name = "secret", description = "流媒体服务secret", required = true) @Parameter(name = "secret", description = "流媒体服务secret", required = true)
@ -109,7 +111,7 @@ public class ServerController {
return mediaServerService.checkMediaServer(ip, port, secret); return mediaServerService.checkMediaServer(ip, port, secret);
} }
@Operation(summary = "测试流媒体录像管理服务") @Operation(summary = "测试流媒体录像管理服务", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "ip", description = "流媒体服务IP", required = true) @Parameter(name = "ip", description = "流媒体服务IP", required = true)
@Parameter(name = "port", description = "流媒体服务HTT端口", required = true) @Parameter(name = "port", description = "流媒体服务HTT端口", required = true)
@GetMapping(value = "/media_server/record/check") @GetMapping(value = "/media_server/record/check")
@ -121,7 +123,7 @@ public class ServerController {
} }
} }
@Operation(summary = "保存流媒体服务") @Operation(summary = "保存流媒体服务", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "mediaServerItem", description = "流媒体信息", required = true) @Parameter(name = "mediaServerItem", description = "流媒体信息", required = true)
@PostMapping(value = "/media_server/save") @PostMapping(value = "/media_server/save")
@ResponseBody @ResponseBody
@ -135,7 +137,7 @@ public class ServerController {
} }
} }
@Operation(summary = "移除流媒体服务") @Operation(summary = "移除流媒体服务", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "流媒体ID", required = true) @Parameter(name = "id", description = "流媒体ID", required = true)
@DeleteMapping(value = "/media_server/delete") @DeleteMapping(value = "/media_server/delete")
@ResponseBody @ResponseBody
@ -148,7 +150,7 @@ public class ServerController {
} }
@Operation(summary = "重启服务") @Operation(summary = "重启服务", security = @SecurityRequirement(name = JwtUtils.HEADER))
@GetMapping(value = "/restart") @GetMapping(value = "/restart")
@ResponseBody @ResponseBody
public void restart() { public void restart() {
@ -173,7 +175,7 @@ public class ServerController {
// }); // });
}; };
@Operation(summary = "获取系统信息信息") @Operation(summary = "获取系统信息信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@GetMapping(value = "/system/configInfo") @GetMapping(value = "/system/configInfo")
@ResponseBody @ResponseBody
public SystemConfigInfo getConfigInfo() { public SystemConfigInfo getConfigInfo() {
@ -185,7 +187,7 @@ public class ServerController {
return systemConfigInfo; return systemConfigInfo;
} }
@Operation(summary = "获取版本信息") @Operation(summary = "获取版本信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
@GetMapping(value = "/version") @GetMapping(value = "/version")
@ResponseBody @ResponseBody
public VersionPo VersionPogetVersion() { public VersionPo VersionPogetVersion() {

View File

@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
@ -16,6 +17,7 @@ import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -52,7 +54,7 @@ public class StreamProxyController {
private UserSetting userSetting; private UserSetting userSetting;
@Operation(summary = "分页查询流代理") @Operation(summary = "分页查询流代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page", description = "当前页") @Parameter(name = "page", description = "当前页")
@Parameter(name = "count", description = "每页查询数量") @Parameter(name = "count", description = "每页查询数量")
@Parameter(name = "query", description = "查询内容") @Parameter(name = "query", description = "查询内容")
@ -67,7 +69,7 @@ public class StreamProxyController {
return streamProxyService.getAll(page, count); return streamProxyService.getAll(page, count);
} }
@Operation(summary = "查询流代理") @Operation(summary = "查询流代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名") @Parameter(name = "app", description = "应用名")
@Parameter(name = "stream", description = "流Id") @Parameter(name = "stream", description = "流Id")
@GetMapping(value = "/one") @GetMapping(value = "/one")
@ -77,7 +79,7 @@ public class StreamProxyController {
return streamProxyService.getStreamProxyByAppAndStream(app, stream); return streamProxyService.getStreamProxyByAppAndStream(app, stream);
} }
@Operation(summary = "保存代理", parameters = { @Operation(summary = "保存代理", security = @SecurityRequirement(name = JwtUtils.HEADER), parameters = {
@Parameter(name = "param", description = "代理参数", required = true), @Parameter(name = "param", description = "代理参数", required = true),
}) })
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ -131,7 +133,7 @@ public class StreamProxyController {
@GetMapping(value = "/ffmpeg_cmd/list") @GetMapping(value = "/ffmpeg_cmd/list")
@ResponseBody @ResponseBody
@Operation(summary = "获取ffmpeg.cmd模板") @Operation(summary = "获取ffmpeg.cmd模板", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "mediaServerId", description = "流媒体ID", required = true) @Parameter(name = "mediaServerId", description = "流媒体ID", required = true)
public JSONObject getFFmpegCMDs(@RequestParam String mediaServerId){ public JSONObject getFFmpegCMDs(@RequestParam String mediaServerId){
logger.debug("获取节点[ {} ]ffmpeg.cmd模板", mediaServerId ); logger.debug("获取节点[ {} ]ffmpeg.cmd模板", mediaServerId );
@ -145,7 +147,7 @@ public class StreamProxyController {
@DeleteMapping(value = "/del") @DeleteMapping(value = "/del")
@ResponseBody @ResponseBody
@Operation(summary = "移除代理") @Operation(summary = "移除代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流id", required = true) @Parameter(name = "stream", description = "流id", required = true)
public void del(@RequestParam String app, @RequestParam String stream){ public void del(@RequestParam String app, @RequestParam String stream){
@ -159,7 +161,7 @@ public class StreamProxyController {
@GetMapping(value = "/start") @GetMapping(value = "/start")
@ResponseBody @ResponseBody
@Operation(summary = "启用代理") @Operation(summary = "启用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流id", required = true) @Parameter(name = "stream", description = "流id", required = true)
public void start(String app, String stream){ public void start(String app, String stream){
@ -172,7 +174,7 @@ public class StreamProxyController {
@GetMapping(value = "/stop") @GetMapping(value = "/stop")
@ResponseBody @ResponseBody
@Operation(summary = "停用代理") @Operation(summary = "停用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流id", required = true) @Parameter(name = "stream", description = "流id", required = true)
public void stop(String app, String stream){ public void stop(String app, String stream){

View File

@ -6,6 +6,7 @@ import com.alibaba.excel.read.metadata.ReadSheet;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.conf.security.SecurityUtils; import com.genersoft.iot.vmp.conf.security.SecurityUtils;
import com.genersoft.iot.vmp.conf.security.dto.LoginUser; import com.genersoft.iot.vmp.conf.security.dto.LoginUser;
import com.genersoft.iot.vmp.gb28181.bean.GbStream; import com.genersoft.iot.vmp.gb28181.bean.GbStream;
@ -20,6 +21,7 @@ import com.genersoft.iot.vmp.vmanager.bean.*;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -64,7 +66,7 @@ public class StreamPushController {
@GetMapping(value = "/list") @GetMapping(value = "/list")
@ResponseBody @ResponseBody
@Operation(summary = "推流列表查询") @Operation(summary = "推流列表查询", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page", description = "当前页") @Parameter(name = "page", description = "当前页")
@Parameter(name = "count", description = "每页查询数量") @Parameter(name = "count", description = "每页查询数量")
@Parameter(name = "query", description = "查询内容") @Parameter(name = "query", description = "查询内容")
@ -88,7 +90,7 @@ public class StreamPushController {
@PostMapping(value = "/save_to_gb") @PostMapping(value = "/save_to_gb")
@ResponseBody @ResponseBody
@Operation(summary = "将推流添加到国标") @Operation(summary = "将推流添加到国标", security = @SecurityRequirement(name = JwtUtils.HEADER))
public void saveToGB(@RequestBody GbStream stream){ public void saveToGB(@RequestBody GbStream stream){
if (!streamPushService.saveToGB(stream)){ if (!streamPushService.saveToGB(stream)){
throw new ControllerException(ErrorCode.ERROR100); throw new ControllerException(ErrorCode.ERROR100);
@ -98,7 +100,7 @@ public class StreamPushController {
@DeleteMapping(value = "/remove_form_gb") @DeleteMapping(value = "/remove_form_gb")
@ResponseBody @ResponseBody
@Operation(summary = "将推流移出到国标") @Operation(summary = "将推流移出到国标", security = @SecurityRequirement(name = JwtUtils.HEADER))
public void removeFormGB(@RequestBody GbStream stream){ public void removeFormGB(@RequestBody GbStream stream){
if (!streamPushService.removeFromGB(stream)){ if (!streamPushService.removeFromGB(stream)){
throw new ControllerException(ErrorCode.ERROR100); throw new ControllerException(ErrorCode.ERROR100);
@ -108,7 +110,7 @@ public class StreamPushController {
@PostMapping(value = "/stop") @PostMapping(value = "/stop")
@ResponseBody @ResponseBody
@Operation(summary = "中止一个推流") @Operation(summary = "中止一个推流", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流id", required = true) @Parameter(name = "stream", description = "流id", required = true)
public void stop(String app, String streamId){ public void stop(String app, String streamId){
@ -119,7 +121,7 @@ public class StreamPushController {
@DeleteMapping(value = "/batchStop") @DeleteMapping(value = "/batchStop")
@ResponseBody @ResponseBody
@Operation(summary = "中止多个推流") @Operation(summary = "中止多个推流", security = @SecurityRequirement(name = JwtUtils.HEADER))
public void batchStop(@RequestBody BatchGBStreamParam batchGBStreamParam){ public void batchStop(@RequestBody BatchGBStreamParam batchGBStreamParam){
if (batchGBStreamParam.getGbStreams().size() == 0) { if (batchGBStreamParam.getGbStreams().size() == 0) {
throw new ControllerException(ErrorCode.ERROR100); throw new ControllerException(ErrorCode.ERROR100);
@ -231,7 +233,7 @@ public class StreamPushController {
*/ */
@GetMapping(value = "/getPlayUrl") @GetMapping(value = "/getPlayUrl")
@ResponseBody @ResponseBody
@Operation(summary = "获取推流播放地址") @Operation(summary = "获取推流播放地址", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "stream", description = "流id", required = true) @Parameter(name = "stream", description = "流id", required = true)
@Parameter(name = "mediaServerId", description = "媒体服务器id") @Parameter(name = "mediaServerId", description = "媒体服务器id")
@ -261,7 +263,7 @@ public class StreamPushController {
*/ */
@PostMapping(value = "/add") @PostMapping(value = "/add")
@ResponseBody @ResponseBody
@Operation(summary = "添加推流信息") @Operation(summary = "添加推流信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
public void add(@RequestBody StreamPushItem stream){ public void add(@RequestBody StreamPushItem stream){
if (ObjectUtils.isEmpty(stream.getGbId())) { if (ObjectUtils.isEmpty(stream.getGbId())) {
throw new ControllerException(ErrorCode.ERROR400.getCode(), "国标ID不可为空"); throw new ControllerException(ErrorCode.ERROR400.getCode(), "国标ID不可为空");

View File

@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.vmanager.user; package com.genersoft.iot.vmp.vmanager.user;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.conf.security.SecurityUtils; import com.genersoft.iot.vmp.conf.security.SecurityUtils;
import com.genersoft.iot.vmp.service.IRoleService; import com.genersoft.iot.vmp.service.IRoleService;
import com.genersoft.iot.vmp.storager.dao.dto.Role; import com.genersoft.iot.vmp.storager.dao.dto.Role;
@ -8,6 +9,7 @@ import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -24,7 +26,7 @@ public class RoleController {
private IRoleService roleService; private IRoleService roleService;
@PostMapping("/add") @PostMapping("/add")
@Operation(summary = "添加角色") @Operation(summary = "添加角色", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "name", description = "角色名", required = true) @Parameter(name = "name", description = "角色名", required = true)
@Parameter(name = "authority", description = "权限(自行定义内容,目前未使用)", required = true) @Parameter(name = "authority", description = "权限(自行定义内容,目前未使用)", required = true)
public void add(@RequestParam String name, public void add(@RequestParam String name,
@ -49,7 +51,7 @@ public class RoleController {
} }
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除角色") @Operation(summary = "删除角色", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "用户Id", required = true) @Parameter(name = "id", description = "用户Id", required = true)
public void delete(@RequestParam Integer id){ public void delete(@RequestParam Integer id){
// 获取当前登录用户id // 获取当前登录用户id
@ -66,7 +68,7 @@ public class RoleController {
} }
@GetMapping("/all") @GetMapping("/all")
@Operation(summary = "查询角色") @Operation(summary = "查询角色", security = @SecurityRequirement(name = JwtUtils.HEADER))
public List<Role> all(){ public List<Role> all(){
// 获取当前登录用户id // 获取当前登录用户id
List<Role> allRoles = roleService.getAll(); List<Role> allRoles = roleService.getAll();

View File

@ -67,7 +67,7 @@ public class UserController {
@PostMapping("/changePassword") @PostMapping("/changePassword")
@Operation(summary = "修改密码") @Operation(summary = "修改密码", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "username", description = "用户名", required = true) @Parameter(name = "username", description = "用户名", required = true)
@Parameter(name = "oldpassword", description = "旧密码已md5加密的密码", required = true) @Parameter(name = "oldpassword", description = "旧密码已md5加密的密码", required = true)
@Parameter(name = "password", description = "新密码未md5加密的密码", required = true) @Parameter(name = "password", description = "新密码未md5加密的密码", required = true)
@ -132,7 +132,7 @@ public class UserController {
} }
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除用户") @Operation(summary = "删除用户", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "用户Id", required = true) @Parameter(name = "id", description = "用户Id", required = true)
public void delete(@RequestParam Integer id){ public void delete(@RequestParam Integer id){
// 获取当前登录用户id // 获取当前登录用户id
@ -148,7 +148,7 @@ public class UserController {
} }
@GetMapping("/all") @GetMapping("/all")
@Operation(summary = "查询用户") @Operation(summary = "查询用户", security = @SecurityRequirement(name = JwtUtils.HEADER))
public List<User> all(){ public List<User> all(){
// 获取当前登录用户id // 获取当前登录用户id
return userService.getAllUsers(); return userService.getAllUsers();
@ -162,7 +162,7 @@ public class UserController {
* @return * @return
*/ */
@GetMapping("/users") @GetMapping("/users")
@Operation(summary = "分页查询用户") @Operation(summary = "分页查询用户", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "page", description = "当前页", required = true) @Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true) @Parameter(name = "count", description = "每页查询数量", required = true)
public PageInfo<User> users(int page, int count) { public PageInfo<User> users(int page, int count) {
@ -170,7 +170,7 @@ public class UserController {
} }
@RequestMapping("/changePushKey") @RequestMapping("/changePushKey")
@Operation(summary = "修改pushkey") @Operation(summary = "修改pushkey", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "userId", description = "用户Id", required = true) @Parameter(name = "userId", description = "用户Id", required = true)
@Parameter(name = "pushKey", description = "新的pushKey", required = true) @Parameter(name = "pushKey", description = "新的pushKey", required = true)
public void changePushKey(@RequestParam Integer userId,@RequestParam String pushKey) { public void changePushKey(@RequestParam Integer userId,@RequestParam String pushKey) {
@ -188,7 +188,7 @@ public class UserController {
} }
@PostMapping("/changePasswordForAdmin") @PostMapping("/changePasswordForAdmin")
@Operation(summary = "管理员修改普通用户密码") @Operation(summary = "管理员修改普通用户密码", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "adminId", description = "管理员id", required = true) @Parameter(name = "adminId", description = "管理员id", required = true)
@Parameter(name = "userId", description = "用户id", required = true) @Parameter(name = "userId", description = "用户id", required = true)
@Parameter(name = "password", description = "新密码未md5加密的密码", required = true) @Parameter(name = "password", description = "新密码未md5加密的密码", required = true)