diff --git a/OpenAuth.App/ServiceApp/ManageApp.cs b/OpenAuth.App/ServiceApp/ManageApp.cs index 34dd33c..418a55c 100644 --- a/OpenAuth.App/ServiceApp/ManageApp.cs +++ b/OpenAuth.App/ServiceApp/ManageApp.cs @@ -1518,5 +1518,20 @@ namespace OpenAuth.App.ServiceApp return rootNodes; } + + public async Task> GetTaskPicList(string flightId, long timestamp) + { + var lasaMediaFile = await Repository.ChangeRepository>() + .AsQueryable() + .Where(r => r.FlightId == flightId) + .OrderBy(r => r.CreateTime) + //.Where(r => r.CreateTime > timestamp) + .SingleAsync(); + return new Response() + { + // todo objectKey 转换成链接 + Result = lasaMediaFile.ObjectKey + }; + } } } \ No newline at end of file diff --git a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs index 1bc85da..37c2820 100644 --- a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs +++ b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs @@ -223,17 +223,17 @@ public class ConfigSubscribe : IJob var parents = new List(3); var parent1 = new LasaMediaFile() { - Id = Guid.NewGuid().ToString(), + Id = folderKey[0], FlightId = flightId, TaskId = taskId, - ParentKey = "", + ParentKey = "0", Name = folderKey[0], WorkspaceId = executeTask.WorkspaceId, }; parents.Add(parent1); parent1 = new LasaMediaFile() { - Id = Guid.NewGuid().ToString(), + Id = folderKey[1], FlightId = flightId, TaskId = taskId, ParentKey = folderKey[0], @@ -243,7 +243,7 @@ public class ConfigSubscribe : IJob parents.Add(parent1); parent1 = new LasaMediaFile() { - Id = Guid.NewGuid().ToString(), + Id = folderKey[2], FlightId = flightId, TaskId = taskId, ParentKey = folderKey[1], diff --git a/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs b/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs index 71b64a9..36f273c 100644 --- a/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs +++ b/OpenAuth.WebApi/Controllers/ServiceControllers/ManageController.cs @@ -249,7 +249,17 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers { return await _app.DeleteTask(id); } - + + /// + /// 根据flightId查询指令拍摄图片 + /// + /// + /// + /// + public async Task> GetTaskPicList(string flightId,long timestamp) + { + return await _app.GetTaskPicList(flightId,timestamp); + } #endregion #region 航线管理