update 校验channel是否保存

This commit is contained in:
2023-11-18 08:26:43 +08:00
parent fce5992a26
commit c1c756df9c

View File

@@ -31,14 +31,17 @@ public class PileChannelEntity {
String channelId = channel.id().asLongText();
if (!StringUtils.equals(sourceChannelId, channelId)) {
// 不一致则更新
log.info("checkChannel-manager中pileSn:{}的连接不一致, 老channelId:{}, 保存新的channel:{}", pileSn, sourceChannelId, channelId);
manager.put(pileSn, channel);
}
} else {
// 为空就put
log.info("checkChannel-manager中pileSn:{}的连接为空,保存新的channel:{}", pileSn, channel.id().asLongText());
manager.put(pileSn, channel);
}
} else {
// 如果manager中不存在pileSn的连接则保存
log.info("checkChannel-manager中不存在pileSn:{}的连接,保存新的channel:{}", pileSn, channel.id().asLongText());
manager.put(pileSn, channel);
}
}