From a5f85ade3f7d2a0fa089f6421552f4ddf66b7b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Tue, 17 Jun 2025 10:23:26 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=96=B9=E6=B3=95=202.=20=E8=88=AA=E7=BA=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8B=E5=8F=91=E9=83=A8=E5=88=86=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=A1=AB=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.App/ServiceApp/ManageApp.cs | 11 ++++++++--- .../ServiceControllers/ManageController.cs | 7 +++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/OpenAuth.App/ServiceApp/ManageApp.cs b/OpenAuth.App/ServiceApp/ManageApp.cs index 4f374bc..ca6f3ce 100644 --- a/OpenAuth.App/ServiceApp/ManageApp.cs +++ b/OpenAuth.App/ServiceApp/ManageApp.cs @@ -526,7 +526,7 @@ namespace OpenAuth.App.ServiceApp var airLine = await Repository.ChangeRepository>() .GetByIdAsync(task.AirLineId); var wpml = airLine.WPML; - // todo 查询sn + // 查询机场sn var dronePort = await Repository.ChangeRepository>() .GetByIdAsync(airLine.UavId); if (dronePort == null) @@ -564,8 +564,8 @@ namespace OpenAuth.App.ServiceApp task_type = task.TaskType, file = new { - url = wpml, // todo 拼接地址 - fingerprint = "" // todo 计算md5 + url = wpml, + fingerprint = _minioService.GetMetaObject(wpml, "") // todo 计算md5 }, // 任务就绪条件 可选字段。条件任务(即 task_type 为2)时必填,其他类型任务会忽略该字段。下发条件任务后,设备会定频检查 ready_conditions 是否全部满足,若全部满足则会有 flighttask_ready 事件通知。且设备端接收 flighttask_execute 指令时,也会检查任务的 ready_conditions 是否已全部满足。 ready_conditions = new @@ -658,5 +658,10 @@ namespace OpenAuth.App.ServiceApp { return _minioService.UploadFile(xmlFile, ""); } + + public async Task GetMd5Meta(string objectname) + { + return await _minioService.GetMetaObject(objectname, "test"); + } } } \ No newline at end of file diff --git a/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs b/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs index 384973a..f2efdee 100644 --- a/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs +++ b/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs @@ -470,5 +470,12 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers var dir = configuration["WpmlDir"]; return dir; } + + [HttpGet] + [AllowAnonymous] + public Task TestGetMd5Meta(string objectname) + { + return _app.GetMd5Meta(objectname); + } } } \ No newline at end of file