机场绑定网关
parent
4e6eafa75d
commit
435da925b9
|
|
@ -26,6 +26,7 @@ namespace OpenAuth.Repository.Domain
|
|||
[SugarColumn(DefaultValue = "false")]
|
||||
public bool IsDelete { get; set; }
|
||||
public string WorkSpaceId { get; set; }
|
||||
public string GateWay { get; set; }
|
||||
[Navigate(NavigateType.OneToMany, nameof(LasaUav.PId))]
|
||||
public List<LasaUav> UavList { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|||
}
|
||||
if (payload.Contains("airport_organization_bind"))
|
||||
{
|
||||
|
||||
string getway = topic.Split('/')[2];
|
||||
// 解析 JSON
|
||||
var root = JsonNode.Parse(payload)?.AsObject();
|
||||
// 获取 bind_devices 数组
|
||||
|
|
@ -163,6 +163,7 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|||
lasaDronePort.BindStatus = 1;
|
||||
lasaDronePort.Name = "机场";
|
||||
dronesn = obj["sn"].ToString();
|
||||
lasaDronePort.GateWay = getway;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -215,7 +216,6 @@ namespace OpenAuth.WebApi.Model.mqtt
|
|||
method = "airport_organization_bind"
|
||||
};
|
||||
string payloadreq = JsonSerializer.Serialize(requestData);
|
||||
string getway = topic.Split('/')[2];
|
||||
await _mqttClientManager.PublishAsync($"thing/product/{getway}/requests_reply", payloadreq);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue