From 4446218f9e051160ebec51cad3e9c321f170e72b Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 20 Feb 2023 15:21:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=9A=E9=81=93=E5=AF=BC?= =?UTF-8?q?=E5=85=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/StreamPushServiceImpl.java | 2 +- .../vmp/storager/IVideoManagerStorage.java | 2 +- .../iot/vmp/vmanager/bean/StreamContent.java | 53 +++++++++++++++++++ .../vmanager/gb28181/device/DeviceQuery.java | 7 ++- 4 files changed, 58 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java index b98f1886..6540e3e3 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java @@ -366,7 +366,7 @@ public class StreamPushServiceImpl implements IStreamPushService { // 存储数据到stream_push表 streamPushMapper.addAll(streamPushItems); List streamPushItemForGbStream = streamPushItems.stream() - .filter(streamPushItem-> streamPushItem.getId() != null) + .filter(streamPushItem-> streamPushItem.getGbId() != null) .collect(Collectors.toList()); // 存储数据到gb_stream表, id会返回到streamPushItemForGbStream里 if (streamPushItemForGbStream.size() > 0) { diff --git a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java index 0b0a7d91..938f669b 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java @@ -56,7 +56,7 @@ public interface IVideoManagerStorage { * @param count 每页数量 * @return */ - public PageInfo queryChannelsByDeviceId(String deviceId, String query, Boolean hasSubChannel, Boolean online, Boolean catalogUnderDevice, int page, int count); + public PageInfo queryChannelsByDeviceId(String deviceId, String query, Boolean hasSubChannel, Boolean online, Boolean catalogUnderDevice, int page, int count); public List queryChannelsByDeviceIdWithStartAndLimit(String deviceId, String query, Boolean hasSubChannel, Boolean online, int start, int limit,List channelIds); diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/StreamContent.java b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/StreamContent.java index e7c24aae..e577baa2 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/StreamContent.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/StreamContent.java @@ -1,43 +1,96 @@ package com.genersoft.iot.vmp.vmanager.bean; import com.genersoft.iot.vmp.common.StreamInfo; +import io.swagger.v3.oas.annotations.media.Schema; +@Schema(description = "流信息") public class StreamContent { + @Schema(description = "应用名") private String app; + + @Schema(description = "流ID") private String stream; + @Schema(description = "IP") private String ip; + @Schema(description = "HTTP-FLV流地址") private String flv; + @Schema(description = "HTTPS-FLV流地址") private String https_flv; + + @Schema(description = "Websocket-FLV流地址") private String ws_flv; + + @Schema(description = "Websockets-FLV流地址") private String wss_flv; + + @Schema(description = "HTTP-FMP4流地址") private String fmp4; + + @Schema(description = "HTTPS-FMP4流地址") private String https_fmp4; + + @Schema(description = "Websocket-FMP4流地址") private String ws_fmp4; + + @Schema(description = "Websockets-FMP4流地址") private String wss_fmp4; + + @Schema(description = "HLS流地址") private String hls; + + @Schema(description = "HTTPS-HLS流地址") private String https_hls; + + @Schema(description = "Websocket-HLS流地址") private String ws_hls; + + @Schema(description = "Websockets-HLS流地址") private String wss_hls; + + @Schema(description = "HTTP-TS流地址") private String ts; + + @Schema(description = "HTTPS-TS流地址") private String https_ts; + + @Schema(description = "Websocket-TS流地址") private String ws_ts; + + @Schema(description = "Websockets-TS流地址") private String wss_ts; + + @Schema(description = "RTMP流地址") private String rtmp; + + @Schema(description = "RTMPS流地址") private String rtmps; + + @Schema(description = "RTSP流地址") private String rtsp; + + @Schema(description = "RTSPS流地址") private String rtsps; + + @Schema(description = "RTC流地址") private String rtc; + @Schema(description = "RTCS流地址") private String rtcs; + + @Schema(description = "流媒体ID") private String mediaServerId; + + @Schema(description = "流编码信息") private Object tracks; + @Schema(description = "开始时间") private String startTime; + @Schema(description = "结束时间") private String endTime; private double progress; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java index 11bc6211..c15d771a 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java @@ -123,7 +123,7 @@ public class DeviceQuery { @Parameter(name = "online", description = "是否在线") @Parameter(name = "channelType", description = "设备/子目录-> false/true") @Parameter(name = "catalogUnderDevice", description = "是否直属与设备的目录") - public PageInfo channels(@PathVariable String deviceId, + public PageInfo channels(@PathVariable String deviceId, int page, int count, @RequestParam(required = false) String query, @RequestParam(required = false) Boolean online, @@ -223,7 +223,7 @@ public class DeviceQuery { @Parameter(name = "online", description = "是否在线") @Parameter(name = "channelType", description = "设备/子目录-> false/true") @GetMapping("/sub_channels/{deviceId}/{channelId}/channels") - public PageInfo subChannels(@PathVariable String deviceId, + public PageInfo subChannels(@PathVariable String deviceId, @PathVariable String channelId, int page, int count, @@ -237,8 +237,7 @@ public class DeviceQuery { return deviceChannelPageResult; } - PageInfo pageResult = storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count); - return pageResult; + return storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count); } /**