From 05a324a07a1848b020a06d671680907f8b92207d Mon Sep 17 00:00:00 2001
From: mk1990 <37614016+mk1990@users.noreply.github.com>
Date: 星期四, 05 五月 2022 08:43:10 +0800
Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java
index e5b57c8..5513ba2 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java
@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.gb28181.event;
+import com.genersoft.iot.vmp.conf.UserSetting;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -16,9 +17,12 @@
@Autowired
private RedisUtil redis;
+
+ @Autowired
+ private UserSetting userSetting;
public boolean isOnline(String deviceId) {
- String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + deviceId;
+ String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + userSetting.getServerId() + "_" + deviceId;
return redis.hasKey(key);
}
}
--
Gitblit v1.8.0