From cb073c6248b54c343907a37eb42f3798b5138737 Mon Sep 17 00:00:00 2001 From: 18298001496 <779063024@qq.com> Date: Thu, 1 Sep 2022 22:42:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A9=B1=E5=8A=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/IOTCS.EdgeGateway.Application/Imps/DataLocationService.cs | 4 +++- src/IOTCS.EdgeGateway.ResDriver/HttpDriver.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/IOTCS.EdgeGateway.Application/Imps/DataLocationService.cs b/src/IOTCS.EdgeGateway.Application/Imps/DataLocationService.cs index 784fe04..df73de4 100644 --- a/src/IOTCS.EdgeGateway.Application/Imps/DataLocationService.cs +++ b/src/IOTCS.EdgeGateway.Application/Imps/DataLocationService.cs @@ -39,6 +39,7 @@ public async Task> GetAsync() public async Task> GetNodeByIdAsync(string id) { + List results = new List(); var model = await _repository.GetNodeByIdAsync(id).ConfigureAwait(false); var node = from s in model select s.ToModel(); @@ -55,9 +56,10 @@ public async Task> GetNodeByIdAsync(string id) dataLocation.Sink = locaton.Sink; dataLocation.Status = locaton.Status; } + results.Add(dataLocation); } } - return node; + return results; } public async Task Insert(DataLocationDto data) diff --git a/src/IOTCS.EdgeGateway.ResDriver/HttpDriver.cs b/src/IOTCS.EdgeGateway.ResDriver/HttpDriver.cs index ed843dc..991b198 100644 --- a/src/IOTCS.EdgeGateway.ResDriver/HttpDriver.cs +++ b/src/IOTCS.EdgeGateway.ResDriver/HttpDriver.cs @@ -101,7 +101,7 @@ public async Task Run(dynamic data) var req = new RequestDto { ResourceId = "iotcs_test", Msg = JsonConvert.SerializeObject(data) }; restRequest.AddJsonBody(req); var response = await _httpClient.ExecuteAsync(restRequest).ConfigureAwait(false); - result = response.get_IsSuccessful(); + result = response.IsSuccessful; restRequest = null; return result;