指令拍摄图片查询

main
陈伟 2 months ago
parent d2a87836a1
commit 6cba07cfa0

@ -1524,13 +1524,21 @@ namespace OpenAuth.App.ServiceApp
var lasaMediaFile = await Repository.ChangeRepository<SugarRepositiry<LasaMediaFile>>()
.AsQueryable()
.Where(r => r.FlightId == flightId)
.OrderBy(r => r.CreateTime)
//.Where(r => r.CreateTime > timestamp)
.Where(r => r.ObjectKey.Contains("/Remote-Control"))
.Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp))
.SingleAsync();
if (lasaMediaFile == null)
{
return new Response<string>()
{
Result = ""
};
}
return new Response<string>()
{
// todo objectKey 转换成链接
Result = lasaMediaFile.ObjectKey
Result = "http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" +
lasaMediaFile.ObjectKey
};
}
}

@ -256,6 +256,8 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
/// <param name="flightId"></param>
/// <param name="timestamp"></param>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public async Task<Response<string>> GetTaskPicList(string flightId,long timestamp)
{
return await _app.GetTaskPicList(flightId,timestamp);

Loading…
Cancel
Save