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