From 3d6db7478d79b824f93708f936c598cc622221f2 Mon Sep 17 00:00:00 2001
From: mk1990 <153958232@qq.com>
Date: 星期一, 20 六月 2022 15:10:31 +0800
Subject: [PATCH] fix设备状态查询接口
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
index 1cb1128..f3a9f65 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
@@ -7,7 +7,7 @@
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
import com.genersoft.iot.vmp.gb28181.transmit.event.response.SIPResponseProcessorAbstract;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
-import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
+import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -27,13 +27,13 @@
public class RegisterResponseProcessor extends SIPResponseProcessorAbstract {
private Logger logger = LoggerFactory.getLogger(RegisterResponseProcessor.class);
- private String method = "REGISTER";
+ private final String method = "REGISTER";
@Autowired
private ISIPCommanderForPlatform sipCommanderForPlatform;
@Autowired
- private IVideoManagerStorager storager;
+ private IVideoManagerStorage storager;
@Autowired
private IRedisCatchStorage redisCatchStorage;
@@ -90,17 +90,18 @@
redisCatchStorage.delPlatformCatchInfo(platformGBId);
// 鍙栧洖Expires璁剧疆锛岄伩鍏嶆敞閿�杩囩▼涓缃负0
ParentPlatform parentPlatformTmp = storager.queryParentPlatByServerGBId(platformGBId);
- parentPlatformTmp.setStatus("娉ㄥ唽".equals(action));
- redisCatchStorage.updatePlatformRegister(parentPlatformTmp);
- redisCatchStorage.updatePlatformKeepalive(parentPlatformTmp);
- parentPlatformCatch.setParentPlatform(parentPlatformTmp);
+ if (parentPlatformTmp != null) {
+ parentPlatformTmp.setStatus("娉ㄥ唽".equals(action));
+ redisCatchStorage.updatePlatformRegister(parentPlatformTmp);
+ redisCatchStorage.updatePlatformKeepalive(parentPlatformTmp);
+ parentPlatformCatch.setParentPlatform(parentPlatformTmp);
+ }
redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
storager.updateParentPlatformStatus(platformGBId, "娉ㄥ唽".equals(action));
if ("娉ㄩ攢".equals(action)) {
subscribeHolder.removeCatalogSubscribe(platformGBId);
subscribeHolder.removeMobilePositionSubscribe(platformGBId);
}
-
}
}
--
Gitblit v1.8.0