Commit 15aaf8a6 by 罗志长

fix: 时间差

parent 88cc2321
......@@ -92,6 +92,7 @@ import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
......@@ -881,10 +882,10 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
platRoomBedDeviceService.remove(new QueryWrapper<PlatRoomBedDevice>().lambda()
.in(PlatRoomBedDevice::getDeviceId,deviceIdList)
.eq(BaseBusEntity::getTenantId, platTenant.getId()));
// 删除缓存里的设备
// 10s后删除缓存里的设备
newPlatformDeviceIdSet.forEach(deviceId -> {
String key = RedisConst.PLAT_OWN_IOT_DEVICE_ID + deviceId;
RedisUtil.delete(key);
RedisUtil.expire(key, 10, TimeUnit.SECONDS);
});
}
if (CollectionUtils.isEmpty(iotDeviceIdSet)) {
......
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