From b070b57259fa0cf383009e6cedf314d6320509ec Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: Tue, 11 Jun 2024 23:10:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=89=E6=B5=81=E4=BB=A3=E7=90=86=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=8F=98=E5=8C=96=E6=97=B6=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=88=B0=E5=9B=BD=E6=A0=87=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/StreamProxyServiceImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 d3f69d67..920228df 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.common.StreamInfo; 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 @@ public class StreamProxyServiceImpl implements IStreamProxyService { @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){