|
@@ -136,6 +136,10 @@ public class ShotPictureTaskExecutors {
|
|
|
}
|
|
|
// 排除缓存中未删除, 但是系统中删除的情况
|
|
|
for (Object hashAlarmKey : hashAlarmKeys) {
|
|
|
+ //如果报警信息数据库不存在但报警缓存中存在, 则进行删除
|
|
|
+ if(!lockedMsgAlarmCameraCodes.contains(hashAlarmKey)){
|
|
|
+ redisService.redisTemplate.opsForHash().delete(CAMERA_ALARM_HASH, hashAlarmKey);
|
|
|
+ }
|
|
|
// 如果在数据库中都不存在, 则进行删除删除
|
|
|
if (!hashAlarmKeys.contains(hashAlarmKey) && !hashNormalKeys.contains(hashAlarmKey)) {
|
|
|
redisService.redisTemplate.opsForHash().delete(CAMERA_ALARM_HASH, hashAlarmKey);
|