查询指令拍摄照片返回数据结构修改

main
陈伟 2 months ago
parent 0c559db1cb
commit 91961e63de

@ -1519,7 +1519,7 @@ namespace OpenAuth.App.ServiceApp
return rootNodes;
}
public async Task<Response<string>> GetTaskPicList(string flightId, long timestamp)
public async Task<Response<LasaMediaFile>> GetTaskPicList(string flightId, long timestamp)
{
var lasaMediaFile = await Repository.ChangeRepository<SugarRepositiry<LasaMediaFile>>()
.AsQueryable()
@ -1529,16 +1529,17 @@ namespace OpenAuth.App.ServiceApp
.SingleAsync();
if (lasaMediaFile == null)
{
return new Response<string>()
return new Response<LasaMediaFile>()
{
Result = ""
Result = new LasaMediaFile()
};
}
return new Response<string>()
lasaMediaFile.PicLink = "http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" +
lasaMediaFile.ObjectKey;
return new Response<LasaMediaFile>()
{
// todo objectKey 转换成链接
Result = "http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" +
lasaMediaFile.ObjectKey
Result = lasaMediaFile
};
}
}

@ -113,4 +113,7 @@ public class LasaMediaFile
public string Bid { get; set; }
public int? FlightType { get; set; }
[SugarColumn(IsIgnore = true)]
public string PicLink { get; set; }
}

@ -259,7 +259,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public async Task<Response<string>> GetTaskPicList(string flightId, long timestamp)
public async Task<Response<LasaMediaFile>> GetTaskPicList(string flightId, long timestamp)
{
return await _app.GetTaskPicList(flightId, timestamp);
}

Loading…
Cancel
Save