From 65f4e34fc603e58bb895beb249a0d79db7a6e954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Mon, 21 Jul 2025 15:24:12 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E6=AF=AB=E7=A7=92=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.App/ServiceApp/ManageApp.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/OpenAuth.App/ServiceApp/ManageApp.cs b/OpenAuth.App/ServiceApp/ManageApp.cs index 9cfe740..0afc98e 100644 --- a/OpenAuth.App/ServiceApp/ManageApp.cs +++ b/OpenAuth.App/ServiceApp/ManageApp.cs @@ -1529,8 +1529,8 @@ namespace OpenAuth.App.ServiceApp .AsQueryable() .Where(r => r.FlightId == flightId) .Where(r => r.ObjectKey.Contains("/Remote-Control")) - .Where(r=>r.ObjectKey.Contains(".jpeg")) - .Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp)) + .Where(r => r.ObjectKey.Contains(".jpeg")) + .Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp).ToLocalTime()) .SingleAsync(); if (lasaMediaFile == null) { @@ -1542,11 +1542,12 @@ namespace OpenAuth.App.ServiceApp /*lasaMediaFile.PicLink = "http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" + lasaMediaFile.ObjectKey;*/ - var tempPath = Path.Combine(Path.GetTempPath(),"lasa"); + var tempPath = Path.Combine(Path.GetTempPath(), "lasa"); if (!Directory.Exists(tempPath)) { Directory.CreateDirectory(tempPath); } + await _minioService .DownLoadObject(_minioService._bucketName, lasaMediaFile.ObjectKey, tempPath, ""); var picPath = Path.Combine(tempPath, lasaMediaFile.ObjectKey); @@ -1565,7 +1566,7 @@ namespace OpenAuth.App.ServiceApp imgOriginHeight = dimensions.height, imgOriginWidth = dimensions.width, psjj = 0, // 等效焦距 - time = lasaMediaFile.CreateTime, + time = lasaMediaFile.CreateTime, height = lasaMediaFile.Height, lon = lasaMediaFile.Lng, lat = lasaMediaFile.Lat, @@ -1584,8 +1585,8 @@ namespace OpenAuth.App.ServiceApp .AsQueryable() .Where(r => r.FlightId == flightId) .Where(r => r.ObjectKey.Contains("/Remote-Control")) - .Where(r=>r.ObjectKey.Contains("S.mp4")) - .Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp)) + .Where(r => r.ObjectKey.Contains("S.mp4")) + .Where(r => r.CreateTime > DateTimeOffset.FromUnixTimeMilliseconds(timestamp).ToLocalTime()) .SingleAsync(); if (lasaMediaFile == null) { @@ -1594,6 +1595,7 @@ namespace OpenAuth.App.ServiceApp Result = new CommandVideoResponse() }; } + return new Response() { Result = new CommandVideoResponse() @@ -1610,6 +1612,7 @@ namespace OpenAuth.App.ServiceApp } }; } + /// /// 获取图片信息 ///