1、指令从数据通道发下去

This commit is contained in:
weidong 2024-03-28 10:45:08 +08:00
parent d7fedeaffe
commit 2ddf095395

View File

@ -39,7 +39,9 @@ public class ApiController {
Map<String, Object> status = new HashMap<>();
HttpResp resp = new HttpResp();
DeviceChannel deviceChannel = OnlineChannels.INSTANCE.getConfigChannel(deviceId);
if(deviceChannel == null) deviceChannel = OnlineChannels.INSTANCE.getDataChannel(deviceId);
if(deviceChannel == null || !deviceChannel.isOnline()) {
deviceChannel = OnlineChannels.INSTANCE.getDataChannel(deviceId);
}
//if(deviceChannel!=null && deviceChannel.isOnline()){
if(deviceChannel!=null && deviceChannel.isOnline()){
status.put("status", "Online");