|
|
@@ -184,7 +184,11 @@ public class DeviceInfoListener implements IIotMsgHandler {
|
|
|
});
|
|
|
|
|
|
//所有事务处理完成后更新缓存信息
|
|
|
- cacheOperation.forEach(Supplier::get);
|
|
|
+ for (Supplier<?> supplier : cacheOperation) {
|
|
|
+ //异步改为同步,否则数据会出现可重复读误差
|
|
|
+ supplier.get();
|
|
|
+ }
|
|
|
+// cacheOperation.forEach(Supplier::get);
|
|
|
log.info("设备数据处理结束:{},耗时【{}】",JSONUtil.toJsonStr(device),(System.currentTimeMillis()-startTime));
|
|
|
return device;
|
|
|
}
|