From ec3a2041447c18f5e4504a31147921edf3707790 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=86=89=E6=88=90=E6=A5=BC?= <799806631@qq.com>
Date: Fri, 8 Aug 2025 14:47:05 +0800
Subject: [PATCH] 1
---
OpenAuth.Repository/Domain/SysAppSetting.cs | 7 ++++---
.../BaseControllers/SysAppSettingController.cs | 15 +++++++++++++--
OpenAuth.WebApi/boot/TestAbc.cs | 7 +++++++
3 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/OpenAuth.Repository/Domain/SysAppSetting.cs b/OpenAuth.Repository/Domain/SysAppSetting.cs
index 1c4d0f8..28775d6 100644
--- a/OpenAuth.Repository/Domain/SysAppSetting.cs
+++ b/OpenAuth.Repository/Domain/SysAppSetting.cs
@@ -1,4 +1,5 @@
-using SqlSugar;
+using Newtonsoft.Json.Linq;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,13 +8,13 @@ using System.Threading.Tasks;
namespace OpenAuth.Repository.Domain
{
- [SugarTable]
+ [SugarTable("sys_appsetting")]
public class SysAppSetting
{
[SugarColumn(IsPrimaryKey = true)]
public long UserId { get; set; }
[SugarColumn(IsJson = true)]
- public string SettingInfo { get; set; }
+ public JObject SettingInfo { get; set; }
}
}
diff --git a/OpenAuth.WebApi/Controllers/BaseControllers/SysAppSettingController.cs b/OpenAuth.WebApi/Controllers/BaseControllers/SysAppSettingController.cs
index ab2ebc0..8f26c51 100644
--- a/OpenAuth.WebApi/Controllers/BaseControllers/SysAppSettingController.cs
+++ b/OpenAuth.WebApi/Controllers/BaseControllers/SysAppSettingController.cs
@@ -9,6 +9,9 @@ using System.Threading.Tasks;
namespace OpenAuth.WebApi.Controllers.BaseControllers
{
+ ///
+ /// 系统配置
+ ///
[Route("api/[controller]/[action]")]
[ApiController]
public class SysAppSettingController : ControllerBase
@@ -19,7 +22,11 @@ namespace OpenAuth.WebApi.Controllers.BaseControllers
_app = app;
}
- [AllowAnonymous]
+ ///
+ /// 获取用户配置
+ ///
+ ///
+ ///
[HttpGet]
public async Task> Get(long id)
{
@@ -37,7 +44,11 @@ namespace OpenAuth.WebApi.Controllers.BaseControllers
return result;
}
- [AllowAnonymous]
+ ///
+ /// 保存用户配置
+ ///
+ ///
+ ///
[HttpPost]
public async Task> Save(SysAppSetting obj)
{
diff --git a/OpenAuth.WebApi/boot/TestAbc.cs b/OpenAuth.WebApi/boot/TestAbc.cs
index ef4b46d..3b6ac42 100644
--- a/OpenAuth.WebApi/boot/TestAbc.cs
+++ b/OpenAuth.WebApi/boot/TestAbc.cs
@@ -404,6 +404,13 @@ public class TestAbc
int offset = 0, length = 0;
}
+ //[Test]
+ public void ExtraceJpeg()
+ {
+ var picStr = "f:/DJI_20250801170827_0082_V.jpeg";
+ var extractor = new ExifThumbnailExtractor();
+ extractor.Extract(picStr, "f:/abc.jpeg");
+ }
private bool IsValidImageFormat(byte[] data)
{