Commit 4446218f9e051160ebec51cad3e9c321f170e72b

Authored by 648540858
1 parent 21d5bed1

修复通道导入bug

src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java
@@ -366,7 +366,7 @@ public class StreamPushServiceImpl implements IStreamPushService { @@ -366,7 +366,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
366 // 存储数据到stream_push表 366 // 存储数据到stream_push表
367 streamPushMapper.addAll(streamPushItems); 367 streamPushMapper.addAll(streamPushItems);
368 List<StreamPushItem> streamPushItemForGbStream = streamPushItems.stream() 368 List<StreamPushItem> streamPushItemForGbStream = streamPushItems.stream()
369 - .filter(streamPushItem-> streamPushItem.getId() != null) 369 + .filter(streamPushItem-> streamPushItem.getGbId() != null)
370 .collect(Collectors.toList()); 370 .collect(Collectors.toList());
371 // 存储数据到gb_stream表, id会返回到streamPushItemForGbStream里 371 // 存储数据到gb_stream表, id会返回到streamPushItemForGbStream里
372 if (streamPushItemForGbStream.size() > 0) { 372 if (streamPushItemForGbStream.size() > 0) {
src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java
@@ -56,7 +56,7 @@ public interface IVideoManagerStorage { @@ -56,7 +56,7 @@ public interface IVideoManagerStorage {
56 * @param count 每页数量 56 * @param count 每页数量
57 * @return 57 * @return
58 */ 58 */
59 - public PageInfo queryChannelsByDeviceId(String deviceId, String query, Boolean hasSubChannel, Boolean online, Boolean catalogUnderDevice, int page, int count); 59 + public PageInfo<DeviceChannel> queryChannelsByDeviceId(String deviceId, String query, Boolean hasSubChannel, Boolean online, Boolean catalogUnderDevice, int page, int count);
60 60
61 public List<DeviceChannel> queryChannelsByDeviceIdWithStartAndLimit(String deviceId, String query, Boolean hasSubChannel, Boolean online, int start, int limit,List<String> channelIds); 61 public List<DeviceChannel> queryChannelsByDeviceIdWithStartAndLimit(String deviceId, String query, Boolean hasSubChannel, Boolean online, int start, int limit,List<String> channelIds);
62 62
src/main/java/com/genersoft/iot/vmp/vmanager/bean/StreamContent.java
1 package com.genersoft.iot.vmp.vmanager.bean; 1 package com.genersoft.iot.vmp.vmanager.bean;
2 2
3 import com.genersoft.iot.vmp.common.StreamInfo; 3 import com.genersoft.iot.vmp.common.StreamInfo;
  4 +import io.swagger.v3.oas.annotations.media.Schema;
4 5
  6 +@Schema(description = "流信息")
5 public class StreamContent { 7 public class StreamContent {
6 8
  9 + @Schema(description = "应用名")
7 private String app; 10 private String app;
  11 +
  12 + @Schema(description = "流ID")
8 private String stream; 13 private String stream;
9 14
  15 + @Schema(description = "IP")
10 private String ip; 16 private String ip;
11 17
  18 + @Schema(description = "HTTP-FLV流地址")
12 private String flv; 19 private String flv;
13 20
  21 + @Schema(description = "HTTPS-FLV流地址")
14 private String https_flv; 22 private String https_flv;
  23 +
  24 + @Schema(description = "Websocket-FLV流地址")
15 private String ws_flv; 25 private String ws_flv;
  26 +
  27 + @Schema(description = "Websockets-FLV流地址")
16 private String wss_flv; 28 private String wss_flv;
  29 +
  30 + @Schema(description = "HTTP-FMP4流地址")
17 private String fmp4; 31 private String fmp4;
  32 +
  33 + @Schema(description = "HTTPS-FMP4流地址")
18 private String https_fmp4; 34 private String https_fmp4;
  35 +
  36 + @Schema(description = "Websocket-FMP4流地址")
19 private String ws_fmp4; 37 private String ws_fmp4;
  38 +
  39 + @Schema(description = "Websockets-FMP4流地址")
20 private String wss_fmp4; 40 private String wss_fmp4;
  41 +
  42 + @Schema(description = "HLS流地址")
21 private String hls; 43 private String hls;
  44 +
  45 + @Schema(description = "HTTPS-HLS流地址")
22 private String https_hls; 46 private String https_hls;
  47 +
  48 + @Schema(description = "Websocket-HLS流地址")
23 private String ws_hls; 49 private String ws_hls;
  50 +
  51 + @Schema(description = "Websockets-HLS流地址")
24 private String wss_hls; 52 private String wss_hls;
  53 +
  54 + @Schema(description = "HTTP-TS流地址")
25 private String ts; 55 private String ts;
  56 +
  57 + @Schema(description = "HTTPS-TS流地址")
26 private String https_ts; 58 private String https_ts;
  59 +
  60 + @Schema(description = "Websocket-TS流地址")
27 private String ws_ts; 61 private String ws_ts;
  62 +
  63 + @Schema(description = "Websockets-TS流地址")
28 private String wss_ts; 64 private String wss_ts;
  65 +
  66 + @Schema(description = "RTMP流地址")
29 private String rtmp; 67 private String rtmp;
  68 +
  69 + @Schema(description = "RTMPS流地址")
30 private String rtmps; 70 private String rtmps;
  71 +
  72 + @Schema(description = "RTSP流地址")
31 private String rtsp; 73 private String rtsp;
  74 +
  75 + @Schema(description = "RTSPS流地址")
32 private String rtsps; 76 private String rtsps;
  77 +
  78 + @Schema(description = "RTC流地址")
33 private String rtc; 79 private String rtc;
34 80
  81 + @Schema(description = "RTCS流地址")
35 private String rtcs; 82 private String rtcs;
  83 +
  84 + @Schema(description = "流媒体ID")
36 private String mediaServerId; 85 private String mediaServerId;
  86 +
  87 + @Schema(description = "流编码信息")
37 private Object tracks; 88 private Object tracks;
38 89
  90 + @Schema(description = "开始时间")
39 private String startTime; 91 private String startTime;
40 92
  93 + @Schema(description = "结束时间")
41 private String endTime; 94 private String endTime;
42 95
43 private double progress; 96 private double progress;
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
@@ -123,7 +123,7 @@ public class DeviceQuery { @@ -123,7 +123,7 @@ public class DeviceQuery {
123 @Parameter(name = "online", description = "是否在线") 123 @Parameter(name = "online", description = "是否在线")
124 @Parameter(name = "channelType", description = "设备/子目录-> false/true") 124 @Parameter(name = "channelType", description = "设备/子目录-> false/true")
125 @Parameter(name = "catalogUnderDevice", description = "是否直属与设备的目录") 125 @Parameter(name = "catalogUnderDevice", description = "是否直属与设备的目录")
126 - public PageInfo channels(@PathVariable String deviceId, 126 + public PageInfo<DeviceChannel> channels(@PathVariable String deviceId,
127 int page, int count, 127 int page, int count,
128 @RequestParam(required = false) String query, 128 @RequestParam(required = false) String query,
129 @RequestParam(required = false) Boolean online, 129 @RequestParam(required = false) Boolean online,
@@ -223,7 +223,7 @@ public class DeviceQuery { @@ -223,7 +223,7 @@ public class DeviceQuery {
223 @Parameter(name = "online", description = "是否在线") 223 @Parameter(name = "online", description = "是否在线")
224 @Parameter(name = "channelType", description = "设备/子目录-> false/true") 224 @Parameter(name = "channelType", description = "设备/子目录-> false/true")
225 @GetMapping("/sub_channels/{deviceId}/{channelId}/channels") 225 @GetMapping("/sub_channels/{deviceId}/{channelId}/channels")
226 - public PageInfo subChannels(@PathVariable String deviceId, 226 + public PageInfo<DeviceChannel> subChannels(@PathVariable String deviceId,
227 @PathVariable String channelId, 227 @PathVariable String channelId,
228 int page, 228 int page,
229 int count, 229 int count,
@@ -237,8 +237,7 @@ public class DeviceQuery { @@ -237,8 +237,7 @@ public class DeviceQuery {
237 return deviceChannelPageResult; 237 return deviceChannelPageResult;
238 } 238 }
239 239
240 - PageInfo pageResult = storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count);  
241 - return pageResult; 240 + return storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count);
242 } 241 }
243 242
244 /** 243 /**