From d3d9d3d964bd676c560eaeef2fe0217314d6bcda Mon Sep 17 00:00:00 2001
From: ZhaoYandong00 <zhaoyandong00@hotmail.com>
Date: 星期四, 01 八月 2024 20:22:13 +0800
Subject: [PATCH] 修复无法单独选择显示下载上传网络速率问题
---
src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 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 d3f69d6..920228d 100755
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
@@ -7,6 +7,7 @@
import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
+import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
import com.genersoft.iot.vmp.media.bean.MediaInfo;
import com.genersoft.iot.vmp.media.bean.MediaServer;
@@ -531,7 +532,16 @@
@Override
public int updateStatus(boolean status, String app, String stream) {
- return streamProxyMapper.updateStatus(app, stream, status);
+ // 鐘舵�佸彉鍖栨椂鎺ㄩ�佸埌鍥芥爣涓婄骇
+ StreamProxyItem streamProxyItem = streamProxyMapper.selectOne(app, stream);
+ if (streamProxyItem == null) {
+ return 0;
+ }
+ int result = streamProxyMapper.updateStatus(app, stream, status);
+ if (!ObjectUtils.isEmpty(streamProxyItem.getGbId())) {
+ gbStreamService.sendCatalogMsg(streamProxyItem, status?CatalogEvent.ON:CatalogEvent.OFF);
+ }
+ return result;
}
private void syncPullStream(String mediaServerId){
--
Gitblit v1.8.0