From acd767b47a4f78e905a3cbe89a4c82ffe88d73d9 Mon Sep 17 00:00:00 2001
From: hotcoffie <35990065+hotcoffie@users.noreply.github.com>
Date: 星期四, 21 四月 2022 10:04:50 +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 | 10 +++++++---
1 files changed, 7 insertions(+), 3 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 437e7de..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;
@@ -7,8 +8,8 @@
import com.genersoft.iot.vmp.utils.redis.RedisUtil;
/**
- * @Description:璁惧绂诲湪绾跨姸鎬佹娴嬪櫒锛岀敤浜庢娴嬭澶囩姸鎬�
- * @author: songww
+ * @description:璁惧绂诲湪绾跨姸鎬佹娴嬪櫒锛岀敤浜庢娴嬭澶囩姸鎬�
+ * @author: swwheihei
* @date: 2020骞�5鏈�13鏃� 涓嬪崍2:40:29
*/
@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