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; }