From 9d24c8e261ea0f15ac197e20ec04557ca9d2149f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Fri, 8 Aug 2025 09:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AA=92=E4=BD=93=E5=9B=BE=E7=89=87=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=B7=BB=E5=8A=A0=E6=8B=8D=E6=91=84=E8=B4=9F=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ServiceApp/Subscribe/ConfigSubscribe.cs | 14 +++++++++++++- OpenAuth.Repository/Domain/LasaMediaFile.cs | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs index 3aaed41..b3c45b9 100644 --- a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs +++ b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs @@ -273,6 +273,7 @@ public class ConfigSubscribe : IJob long? picSize = 0; int width = 0, height = 0, focalLength = 0; int offset = 0, length = 0; + string model = ""; var fileUrl ="http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" + objectKey; using (var httpClient = new HttpClient()) { @@ -306,6 +307,16 @@ public class ConfigSubscribe : IJob { if (directory is ExifDirectoryBase) { + if (directory.Name.Equals("Exif IFD0")) + { + foreach (var tag in directory.Tags) + { + if (tag.Name.Equals("Model")) + { + model = tag.Description; + } + } + } if (directory.Name.Equals("Exif SubIFD")) { foreach (var tag in directory.Tags) @@ -432,7 +443,8 @@ public class ConfigSubscribe : IJob Size = picSize, ShowOnMap = 1, display = 1, - FocalLength = focalLength + FocalLength = focalLength, + PayloadModelName = model }; // todo 添加事务 await _sqlSugarClient.Insertable(fileUpload).ExecuteCommandAsync(); diff --git a/OpenAuth.Repository/Domain/LasaMediaFile.cs b/OpenAuth.Repository/Domain/LasaMediaFile.cs index 4b3be01..67336c6 100644 --- a/OpenAuth.Repository/Domain/LasaMediaFile.cs +++ b/OpenAuth.Repository/Domain/LasaMediaFile.cs @@ -122,6 +122,8 @@ public class LasaMediaFile public string minipic { get; set; } public double? FocalLength { get; set; } + + public string PayloadModelName { get; set; } [SugarColumn(IsIgnore = true)] public List Children { get; set; }