mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-23 05:37:48 +08:00
优化心跳和注册时间记录的取值和展示
This commit is contained in:
parent
4067dcf8d1
commit
27b06a84d7
@ -563,7 +563,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
|||||||
for (Device device : deviceList) {
|
for (Device device : deviceList) {
|
||||||
operations.opsForList().rightPush(VideoManagerConstants.DEVICE_KEEPALIVE_PREFIX + device.getDeviceId(), device.getKeepaliveTimeStamp());
|
operations.opsForList().rightPush(VideoManagerConstants.DEVICE_KEEPALIVE_PREFIX + device.getDeviceId(), device.getKeepaliveTimeStamp());
|
||||||
// 2. 截取列表,只保留最新 100 条
|
// 2. 截取列表,只保留最新 100 条
|
||||||
operations.opsForList().trim((VideoManagerConstants.DEVICE_KEEPALIVE_PREFIX + device.getDeviceId()), -1000, -1);
|
operations.opsForList().trim((VideoManagerConstants.DEVICE_KEEPALIVE_PREFIX + device.getDeviceId()), -100, -1);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -580,7 +580,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
|||||||
if (count == null) {
|
if (count == null) {
|
||||||
count = 20;
|
count = 20;
|
||||||
}
|
}
|
||||||
return longRedisTemplate.opsForList().range(VideoManagerConstants.DEVICE_KEEPALIVE_PREFIX + deviceId, 0, count + 1);
|
return longRedisTemplate.opsForList().range(VideoManagerConstants.DEVICE_KEEPALIVE_PREFIX + deviceId, -count - 1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
|||||||
for (Device device : deviceList) {
|
for (Device device : deviceList) {
|
||||||
operations.opsForList().rightPush(VideoManagerConstants.DEVICE_REGISTER_PREFIX + device.getDeviceId(), device.getRegisterTimeStamp());
|
operations.opsForList().rightPush(VideoManagerConstants.DEVICE_REGISTER_PREFIX + device.getDeviceId(), device.getRegisterTimeStamp());
|
||||||
// 2. 截取列表,只保留最新 100 条
|
// 2. 截取列表,只保留最新 100 条
|
||||||
operations.opsForList().trim((VideoManagerConstants.DEVICE_REGISTER_PREFIX + device.getDeviceId()), -1000, -1);
|
operations.opsForList().trim((VideoManagerConstants.DEVICE_REGISTER_PREFIX + device.getDeviceId()), -100, -1);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -615,6 +615,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
|||||||
if (count == null) {
|
if (count == null) {
|
||||||
count = 20;
|
count = 20;
|
||||||
}
|
}
|
||||||
return longRedisTemplate.opsForList().range(VideoManagerConstants.DEVICE_REGISTER_PREFIX + deviceId, 0, count + 1);
|
return longRedisTemplate.opsForList().range(VideoManagerConstants.DEVICE_REGISTER_PREFIX + deviceId, -count - 1, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
v-if="viewMode === 'table'"
|
v-if="viewMode === 'table'"
|
||||||
:data="list"
|
:data="list"
|
||||||
border
|
border
|
||||||
|
stripe
|
||||||
size="mini"
|
size="mini"
|
||||||
height="400px"
|
height="400px"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user