From 3884e9a56aeab7ac2ad7c9483059adc0df6683d9 Mon Sep 17 00:00:00 2001 From: jiang <893224616@qq.com> Date: 星期三, 07 九月 2022 15:56:48 +0800 Subject: [PATCH] 1.根据redis消息更新推流列表时同时更新在线状态 2.推流列表的模板增加在线状态 --- src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java index 8734882..95b46b8 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java @@ -1,10 +1,9 @@ package com.genersoft.iot.vmp.service.impl; -import com.genersoft.iot.vmp.conf.SipConfig; import com.genersoft.iot.vmp.gb28181.bean.*; import com.genersoft.iot.vmp.gb28181.event.EventPublisher; import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent; -import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; +import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; import com.genersoft.iot.vmp.storager.dao.GbStreamMapper; import com.genersoft.iot.vmp.storager.dao.ParentPlatformMapper; import com.genersoft.iot.vmp.storager.dao.PlatformCatalogMapper; @@ -19,6 +18,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionStatus; +import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import java.util.ArrayList; @@ -169,7 +169,7 @@ public void sendCatalogMsgs(List<GbStream> gbStreams, String type) { if (gbStreams.size() > 0) { for (GbStream gs : gbStreams) { - if (StringUtils.isEmpty(gs.getGbId())){ + if (ObjectUtils.isEmpty(gs.getGbId())){ continue; } List<ParentPlatform> parentPlatforms = platformGbStreamMapper.selectByAppAndStream(gs.getApp(), gs.getStream()); @@ -183,4 +183,9 @@ } } } + + @Override + public int updateGbIdOrName(List<StreamPushItem> streamPushItemForUpdate) { + return gbStreamMapper.updateGbIdOrName(streamPushItemForUpdate); + } } -- Gitblit v1.8.0