修复设备缓存BUG
This commit is contained in:
parent
06978e9c7f
commit
5e7c8554f4
@ -121,6 +121,12 @@ public class EquipmentCacheImpl implements EquipmentCache {
|
||||
Integer index = deviceIdIndex.get(deviceId);
|
||||
if (index != null) {
|
||||
deviceInfoCaches.remove(index);
|
||||
//重新刷新索引
|
||||
for (int i = index; i < deviceInfoCaches.size(); i++) {
|
||||
DeviceInfoCache deviceInfoCache = deviceInfoCaches.get(i);
|
||||
deviceIdIndex.put(deviceInfoCache.getDeviceId(),i);
|
||||
deviceCodeIndex.put(deviceInfoCache.getDeviceCode(),i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user