|
@@ -144,7 +144,11 @@ public class AliBridgeServerController implements
|
|
|
@Operation(summary = "重启网桥")
|
|
@Operation(summary = "重启网桥")
|
|
|
@CreateAction
|
|
@CreateAction
|
|
|
public Mono<Void> startBridge(@PathVariable("bridgeId")String id){
|
|
public Mono<Void> startBridge(@PathVariable("bridgeId")String id){
|
|
|
- return bridgeGateway.reconnect(id,true);
|
|
|
|
|
|
|
+ return bridgeService.createUpdate()
|
|
|
|
|
+ .set(AliIotBridgeEntity::getState,BridgeStatus.running)
|
|
|
|
|
+ .where(AliIotBridgeEntity::getId,id)
|
|
|
|
|
+ .execute()
|
|
|
|
|
+ .flatMap(ignore->bridgeGateway.reconnect(id,true));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/unregister/{bridgeId}")
|
|
@PostMapping("/unregister/{bridgeId}")
|