From b1f34881a0c542792ac7282a9048509633b35f69 Mon Sep 17 00:00:00 2001 From: Winston Date: Mon, 20 Jun 2022 18:10:35 +0800 Subject: [PATCH] fix: Mono in Mono error --- .../community/device/web/GatewayDeviceController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/GatewayDeviceController.java b/jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/GatewayDeviceController.java index e05d002b..40238846 100644 --- a/jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/GatewayDeviceController.java +++ b/jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/GatewayDeviceController.java @@ -140,7 +140,7 @@ public class GatewayDeviceController { .flatMap(operator -> operator.setConfig(DeviceConfigKey.parentGatewayId, gatewayId)) ).then(registry.getDevice(gatewayId) .flatMap(gwOperator -> gwOperator.getProtocol() - .map(protocolSupport -> protocolSupport.onChildBind(gwOperator, + .flatMap(protocolSupport -> protocolSupport.onChildBind(gwOperator, Flux.from(registry.getDevice(deviceId))) ) ) @@ -177,7 +177,7 @@ public class GatewayDeviceController { .then() ).then(registry.getDevice(gatewayId) .flatMap(gwOperator -> gwOperator.getProtocol() - .map(protocolSupport -> protocolSupport.onChildBind(gwOperator, + .flatMap(protocolSupport -> protocolSupport.onChildBind(gwOperator, Flux.fromIterable(deviceIdList).flatMap(id -> registry.getDevice(id))) ) ) @@ -202,7 +202,7 @@ public class GatewayDeviceController { .flatMap(operator -> operator.removeConfig(DeviceConfigKey.parentGatewayId.getKey()))) .then(registry.getDevice(gatewayId) .flatMap(gwOperator -> gwOperator.getProtocol() - .map(protocolSupport -> protocolSupport.onChildUnbind(gwOperator, + .flatMap(protocolSupport -> protocolSupport.onChildUnbind(gwOperator, Flux.from(registry.getDevice(deviceId))) ) )