|
|
@@ -234,16 +234,19 @@ public class LocalMediaDeviceService extends GenericReactiveCrudService<MediaDev
|
|
|
|
|
|
//将本节点信息下线
|
|
|
Set<Object> deviceIds = redisUtil.members("session_" + serverId);
|
|
|
- Mono.zip(this.createUpdate()
|
|
|
- .where(MediaDevice::getState,DeviceState.online)
|
|
|
- .in(MediaDevice::getId,deviceIds)
|
|
|
- .set(MediaDevice::getState,DeviceState.offline)
|
|
|
- .execute(),
|
|
|
- deviceChannelService.createUpdate()
|
|
|
- .set(MediaDeviceChannel::getStatus,DeviceState.offline)
|
|
|
- .in(MediaDeviceChannel::getDeviceId,deviceIds)
|
|
|
- .execute()
|
|
|
- )
|
|
|
- .subscribe();
|
|
|
+ if(CollectionUtil.isNotEmpty(deviceIds)){
|
|
|
+ Mono.zip(this.createUpdate()
|
|
|
+ .where(MediaDevice::getState,DeviceState.online)
|
|
|
+ .in(MediaDevice::getId,deviceIds)
|
|
|
+ .set(MediaDevice::getState,DeviceState.offline)
|
|
|
+ .execute(),
|
|
|
+ deviceChannelService.createUpdate()
|
|
|
+ .set(MediaDeviceChannel::getStatus,DeviceState.offline)
|
|
|
+ .in(MediaDeviceChannel::getDeviceId,deviceIds)
|
|
|
+ .execute()
|
|
|
+ )
|
|
|
+ .subscribe();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|