bugfix: 毫秒转换时间错误

main
陈伟 2 months ago
parent fb777b7820
commit 65f4e34fc6

@ -1529,8 +1529,8 @@ namespace OpenAuth.App.ServiceApp
.AsQueryable() .AsQueryable()
.Where(r => r.FlightId == flightId) .Where(r => r.FlightId == flightId)
.Where(r => r.ObjectKey.Contains("/Remote-Control")) .Where(r => r.ObjectKey.Contains("/Remote-Control"))
.Where(r=>r.ObjectKey.Contains(".jpeg")) .Where(r => r.ObjectKey.Contains(".jpeg"))
.Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp)) .Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp).ToLocalTime())
.SingleAsync(); .SingleAsync();
if (lasaMediaFile == null) if (lasaMediaFile == null)
{ {
@ -1542,11 +1542,12 @@ namespace OpenAuth.App.ServiceApp
/*lasaMediaFile.PicLink = "http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" + /*lasaMediaFile.PicLink = "http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" +
lasaMediaFile.ObjectKey;*/ lasaMediaFile.ObjectKey;*/
var tempPath = Path.Combine(Path.GetTempPath(),"lasa"); var tempPath = Path.Combine(Path.GetTempPath(), "lasa");
if (!Directory.Exists(tempPath)) if (!Directory.Exists(tempPath))
{ {
Directory.CreateDirectory(tempPath); Directory.CreateDirectory(tempPath);
} }
await _minioService await _minioService
.DownLoadObject(_minioService._bucketName, lasaMediaFile.ObjectKey, tempPath, ""); .DownLoadObject(_minioService._bucketName, lasaMediaFile.ObjectKey, tempPath, "");
var picPath = Path.Combine(tempPath, lasaMediaFile.ObjectKey); var picPath = Path.Combine(tempPath, lasaMediaFile.ObjectKey);
@ -1565,7 +1566,7 @@ namespace OpenAuth.App.ServiceApp
imgOriginHeight = dimensions.height, imgOriginHeight = dimensions.height,
imgOriginWidth = dimensions.width, imgOriginWidth = dimensions.width,
psjj = 0, // 等效焦距 psjj = 0, // 等效焦距
time = lasaMediaFile.CreateTime, time = lasaMediaFile.CreateTime,
height = lasaMediaFile.Height, height = lasaMediaFile.Height,
lon = lasaMediaFile.Lng, lon = lasaMediaFile.Lng,
lat = lasaMediaFile.Lat, lat = lasaMediaFile.Lat,
@ -1584,8 +1585,8 @@ namespace OpenAuth.App.ServiceApp
.AsQueryable() .AsQueryable()
.Where(r => r.FlightId == flightId) .Where(r => r.FlightId == flightId)
.Where(r => r.ObjectKey.Contains("/Remote-Control")) .Where(r => r.ObjectKey.Contains("/Remote-Control"))
.Where(r=>r.ObjectKey.Contains("S.mp4")) .Where(r => r.ObjectKey.Contains("S.mp4"))
.Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp)) .Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp).ToLocalTime())
.SingleAsync(); .SingleAsync();
if (lasaMediaFile == null) if (lasaMediaFile == null)
{ {
@ -1594,6 +1595,7 @@ namespace OpenAuth.App.ServiceApp
Result = new CommandVideoResponse() Result = new CommandVideoResponse()
}; };
} }
return new Response<CommandVideoResponse>() return new Response<CommandVideoResponse>()
{ {
Result = new CommandVideoResponse() Result = new CommandVideoResponse()
@ -1610,6 +1612,7 @@ namespace OpenAuth.App.ServiceApp
} }
}; };
} }
/// <summary> /// <summary>
/// 获取图片信息 /// 获取图片信息
/// </summary> /// </summary>

Loading…
Cancel
Save