From a012007f36ba1ce44e9c932ea33120949835dfb7 Mon Sep 17 00:00:00 2001 From: 648540858 <456panlinlin> Date: 星期一, 25 四月 2022 17:12:29 +0800 Subject: [PATCH] 多级虚拟组织处理修复 --- 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