优化收到redis推动的推流设备信息更新内容重复的问题

pull/1371/head
648540858 2024-03-13 15:40:30 +08:00
parent e1d476a54a
commit dc8869be49
1 changed files with 7 additions and 1 deletions

View File

@ -75,7 +75,7 @@ public class RedisPushStreamStatusListMsgListener implements MessageListener {
if (!contains) {
if (allGBId.containsKey(streamPushItem.getGbId())) {
GbStream gbStream = allGBId.get(streamPushItem.getGbId());
logger.warn("[REDIS消息-推流设备列表更新] 国标编号重复: {}, 已分配给{}/{}",
logger.warn("[REDIS消息-推流设备列表更新-INSERT] 国标编号重复: {}, 已分配给{}/{}",
streamPushItem.getGbId(), gbStream.getApp(), gbStream.getStream());
continue;
}
@ -88,6 +88,12 @@ public class RedisPushStreamStatusListMsgListener implements MessageListener {
streamPushItemForSave.add(streamPushItem);
allGBId.put(streamPushItem.getGbId(), streamPushItem);
} else {
if (allGBId.containsKey(streamPushItem.getGbId())) {
GbStream gbStream = allGBId.get(streamPushItem.getGbId());
logger.warn("[REDIS消息-推流设备列表更新-UPDATE] 国标编号重复: {}, 已分配给{}/{}",
streamPushItem.getGbId(), gbStream.getApp(), gbStream.getStream());
continue;
}
//存在就只修改 name和gbId
streamPushItemForUpdate.add(streamPushItem);
}