From 4e0a463f883816d78a4c4241ab23e79b2e805f98 Mon Sep 17 00:00:00 2001 From: 648540858 <456panlinlin> Date: 星期四, 28 四月 2022 09:47:46 +0800 Subject: [PATCH] 优化对Parental字段的判断 --- 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