Commit 19dddbd5 by 罗志长

fix: 设备上线时间差

parent 035ba6b5
......@@ -870,6 +870,11 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
platRoomBedDeviceService.remove(new QueryWrapper<PlatRoomBedDevice>().lambda()
.in(PlatRoomBedDevice::getDeviceId,deviceIdList)
.eq(BaseBusEntity::getTenantId, platTenant.getId()));
// 删除缓存里的设备
newPlatformDeviceIdSet.forEach(deviceId -> {
String key = RedisConst.PLAT_OWN_IOT_DEVICE_ID + deviceId;
RedisUtil.delete(key);
});
}
if (CollectionUtils.isEmpty(iotDeviceIdSet)) {
continue;
......
......@@ -49,10 +49,6 @@ public class DeviceCacheUtil implements ApplicationRunner {
if(RedisUtil.exist(key)){
RedisUtil.delete(RedisConst.PLAT_IOT_DEVICE_PREFIX + platDevice.getOriDeviceId()+":"+platTenant.getIotOrgId());
}
String key1 = RedisConst.PLAT_OWN_IOT_DEVICE_ID + platDevice.getOriDeviceId();
if(RedisUtil.exist(key1)){
RedisUtil.delete(key1);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment