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

This commit is contained in:
648540858
2023-12-26 15:30:24 +08:00
parent 7c07ae9421
commit f8d2b933b1
21 changed files with 157 additions and 117 deletions

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