From 28b5cc39d0a2d9939f70b4c980a31d9b27fc1e4c Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Tue, 19 Jul 2022 14:27:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E6=8E=A8?= =?UTF-8?q?=E6=B5=81=E7=8A=B6=E6=80=81sql=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformNotRegisterEventLister.java | 1 - .../impl/MobilePositionSubscribeHandlerTask.java | 6 ++---- .../iot/vmp/service/impl/RedisGpsMsgListener.java | 1 + .../iot/vmp/storager/dao/StreamPushMapper.java | 12 ++++++------ 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java index 14ed76a2..56bdeb58 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java @@ -65,7 +65,6 @@ public class PlatformNotRegisterEventLister implements ApplicationListener sendRtpItems = redisCatchStorage.querySendRTPServer(event.getPlatformGbID()); - logger.info("[ 平台未注册事件 ] 停止[ {} ]的所有推流size", sendRtpItems.size()); if (sendRtpItems != null && sendRtpItems.size() > 0) { logger.info("[ 平台未注册事件 ] 停止[ {} ]的所有推流", event.getPlatformGbID()); for (SendRtpItem sendRtpItem : sendRtpItems) { diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeHandlerTask.java b/src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeHandlerTask.java index 0bad048a..7edee4dd 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeHandlerTask.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeHandlerTask.java @@ -66,10 +66,8 @@ public class MobilePositionSubscribeHandlerTask implements ISubscribeTask { for (DeviceChannel deviceChannel : gbStreams) { String gbId = deviceChannel.getChannelId(); GPSMsgInfo gpsMsgInfo = redisCatchStorage.getGpsMsgInfo(gbId); - if (gpsMsgInfo != null) { // 无最新位置不发送 - if (logger.isDebugEnabled()) { - logger.debug("无最新位置不发送"); - } + // 无最新位置不发送 + if (gpsMsgInfo != null) { // 经纬度都为0不发送 if (gpsMsgInfo.getLng() == 0 && gpsMsgInfo.getLat() == 0) { continue; diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/RedisGpsMsgListener.java b/src/main/java/com/genersoft/iot/vmp/service/impl/RedisGpsMsgListener.java index be214010..74828334 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/RedisGpsMsgListener.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/RedisGpsMsgListener.java @@ -25,6 +25,7 @@ public class RedisGpsMsgListener implements MessageListener { @Override public void onMessage(@NotNull Message message, byte[] bytes) { + // TODO 加消息队列 GPSMsgInfo gpsMsgInfo = JSON.parseObject(message.getBody(), GPSMsgInfo.class); redisCatchStorage.updateGpsMsgInfo(gpsMsgInfo); } diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java index 895316d1..4f2fbe24 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java @@ -125,16 +125,16 @@ public interface StreamPushMapper { "where sp.status = 1 and (gs.app, gs.stream) in (" + "" + "(#{item.app}, #{item.stream}) " + - ")" + - "") + "" + + ")") List getOnlinePusherForGbInList(List offlineStreams); @Update("") + "" + + ")") void offline(List offlineStreams); @Select("") + "" + + ")") void online(List onlineStreams); @Select("SELECT gs.* FROM stream_push sp left join gb_stream gs on sp.app = gs.app AND sp.stream = gs.stream where sp.status = 1")