From bfcb4d23351c5eb8db753ed8670a0d16601c1992 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 13 一月 2022 16:39:32 +0800
Subject: [PATCH] 合并主分支

---
 src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
index a972585..1efc614 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
@@ -130,7 +130,7 @@
         if ( !StringUtils.isEmpty(param.getPlatformGbId()) && streamLive) {
             List<GbStream> gbStreams = new ArrayList<>();
             gbStreams.add(param);
-            if (gbStreamService.addPlatformInfo(gbStreams, param.getPlatformGbId())){
+            if (gbStreamService.addPlatformInfo(gbStreams, param.getPlatformGbId(), param.getCatalogId())){
                 result.append(",  鍏宠仈鍥芥爣骞冲彴[ " + param.getPlatformGbId() + " ]鎴愬姛");
             }else {
                 result.append(",  鍏宠仈鍥芥爣骞冲彴[ " + param.getPlatformGbId() + " ]澶辫触");
@@ -141,6 +141,7 @@
         if (parentPlatforms.size() > 0) {
             for (ParentPlatform parentPlatform : parentPlatforms) {
                 param.setPlatformId(parentPlatform.getServerGBId());
+                param.setCatalogId(parentPlatform.getCatalogId());
                 String stream = param.getStream();
                 StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(param.getApp(), stream, parentPlatform.getServerGBId());
                 if (streamProxyItems == null) {
@@ -278,18 +279,18 @@
         String type = "PULL";
 
         // 鍙戦�乺edis娑堟伅
-        List<StreamInfo> streamInfoList = redisCatchStorage.getStreams(mediaServerId, type);
-        if (streamInfoList.size() > 0) {
-            for (StreamInfo streamInfo : streamInfoList) {
+        List<MediaItem> mediaItems = redisCatchStorage.getStreams(mediaServerId, type);
+        if (mediaItems.size() > 0) {
+            for (MediaItem mediaItem : mediaItems) {
                 JSONObject jsonObject = new JSONObject();
                 jsonObject.put("serverId", userSetup.getServerId());
-                jsonObject.put("app", streamInfo.getApp());
-                jsonObject.put("stream", streamInfo.getStreamId());
+                jsonObject.put("app", mediaItem.getApp());
+                jsonObject.put("stream", mediaItem.getStream());
                 jsonObject.put("register", false);
                 jsonObject.put("mediaServerId", mediaServerId);
                 redisCatchStorage.sendStreamChangeMsg(type, jsonObject);
                 // 绉婚櫎redis鍐呮祦鐨勪俊鎭�
-                redisCatchStorage.removeStream(mediaServerId, type, streamInfo.getApp(), streamInfo.getStreamId());
+                redisCatchStorage.removeStream(mediaServerId, type, mediaItem.getApp(), mediaItem.getStream());
             }
         }
     }

--
Gitblit v1.8.0