| | |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.gbStream.bean.GbStreamParam; |
| | | import com.genersoft.iot.vmp.service.IGbStreamService; |
| | | import com.github.pagehelper.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "视频流关联到级联平台") |
| | | @Tag(name = "视频流关联到级联平台") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/api/gbStream") |
| | |
| | | * @param platformId 平台ID |
| | | * @return |
| | | */ |
| | | @ApiOperation("查询国标通道") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "当前页", required = true , dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "count", value = "每页条数", required = true , dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "platformId", value = "平台ID", required = true , dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "catalogId", value = "目录ID", required = false , dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="query", value = "查询内容", required = false , dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="pushing", value = "是否正在推流", required = false , dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name="mediaServerId", value = "流媒体ID", required = false , dataTypeClass = String.class), |
| | | |
| | | }) |
| | | @Operation(summary = "查询国标通道") |
| | | @Parameter(name = "page", description = "当前页", required = true) |
| | | @Parameter(name = "count", description = "每页条数", required = true) |
| | | @Parameter(name = "platformId", description = "平台ID", required = true) |
| | | @Parameter(name = "catalogId", description = "目录ID") |
| | | @Parameter(name = "query", description = "查询内容") |
| | | @Parameter(name = "mediaServerId", description = "流媒体ID") |
| | | @GetMapping(value = "/list") |
| | | @ResponseBody |
| | | public PageInfo<GbStream> list(@RequestParam(required = true)Integer page, |
| | |
| | | @RequestParam(required = true)String platformId, |
| | | @RequestParam(required = false)String catalogId, |
| | | @RequestParam(required = false)String query, |
| | | @RequestParam(required = false)Boolean pushing, |
| | | @RequestParam(required = false)String mediaServerId){ |
| | | if (StringUtils.isEmpty(catalogId)) { |
| | | if (ObjectUtils.isEmpty(catalogId)) { |
| | | catalogId = null; |
| | | } |
| | | if (StringUtils.isEmpty(query)) { |
| | | if (ObjectUtils.isEmpty(query)) { |
| | | query = null; |
| | | } |
| | | if (StringUtils.isEmpty(mediaServerId)) { |
| | | if (ObjectUtils.isEmpty(mediaServerId)) { |
| | | mediaServerId = null; |
| | | } |
| | | |
| | | // catalogId 为null 查询未在平台下分配的数据 |
| | | // catalogId 不为null 查询平台下这个,目录下的通道 |
| | | return gbStreamService.getAll(page, count, platformId, catalogId, query, pushing, mediaServerId); |
| | | return gbStreamService.getAll(page, count, platformId, catalogId, query, mediaServerId); |
| | | } |
| | | |
| | | |
| | |
| | | * @param gbStreamParam |
| | | * @return |
| | | */ |
| | | @ApiOperation("移除国标关联") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true, |
| | | dataTypeClass = GbStreamParam.class), |
| | | }) |
| | | @Operation(summary = "移除国标关联") |
| | | @DeleteMapping(value = "/del") |
| | | @ResponseBody |
| | | public Object del(@RequestBody GbStreamParam gbStreamParam){ |
| | |
| | | * @param gbStreamParam |
| | | * @return |
| | | */ |
| | | @ApiOperation("保存国标关联") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true, dataTypeClass = GbStreamParam.class), |
| | | }) |
| | | @Operation(summary = "保存国标关联") |
| | | @PostMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(@RequestBody GbStreamParam gbStreamParam){ |