|
|
|
@ -23,7 +23,7 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|
|
|
|
|
|
|
|
|
public bool CanHandle(string topic)
|
|
|
|
|
{
|
|
|
|
|
return topic.Contains("/requests1");
|
|
|
|
|
return topic.Contains("/requests");
|
|
|
|
|
}
|
|
|
|
|
string bid, tid, previousgateway;
|
|
|
|
|
long timestamp;
|
|
|
|
@ -63,7 +63,7 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
string payloadreq = JsonSerializer.Serialize(requestData);
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{gateway}/requests1_reply", payloadreq);
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{gateway}/requests_reply", payloadreq);
|
|
|
|
|
await _app.UpdateGateway(gateway, tid);
|
|
|
|
|
}
|
|
|
|
|
if (payload.Contains("airport_bind_status"))
|
|
|
|
@ -108,7 +108,7 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|
|
|
|
};
|
|
|
|
|
string payloadreq = JsonSerializer.Serialize(requestData);
|
|
|
|
|
string getway = topic.Split('/')[2];
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{getway}/requests1_reply", payloadreq);
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{getway}/requests_reply", payloadreq);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (payload.Contains("airport_organization_get"))//
|
|
|
|
@ -132,7 +132,7 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|
|
|
|
};
|
|
|
|
|
string payloadreq = JsonSerializer.Serialize(requestData);
|
|
|
|
|
string getway = topic.Split('/')[2];
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{getway}/requests1_reply", payloadreq);
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{getway}/requests_reply", payloadreq);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (payload.Contains("airport_organization_bind"))
|
|
|
|
@ -206,7 +206,7 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|
|
|
|
};
|
|
|
|
|
string payloadreq = JsonSerializer.Serialize(requestData);
|
|
|
|
|
string getway = topic.Split('/')[2];
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{getway}/requests1_reply", payloadreq);
|
|
|
|
|
await _mqttClientManager.PublishAsync($"thing/product/{getway}/requests_reply", payloadreq);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|