feature-flyModify
parent
a0942d1dbe
commit
ec3a204144
|
|
@ -1,4 +1,5 @@
|
||||||
using SqlSugar;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using SqlSugar;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -7,13 +8,13 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace OpenAuth.Repository.Domain
|
namespace OpenAuth.Repository.Domain
|
||||||
{
|
{
|
||||||
[SugarTable]
|
[SugarTable("sys_appsetting")]
|
||||||
public class SysAppSetting
|
public class SysAppSetting
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true)]
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
public long UserId { get; set; }
|
public long UserId { get; set; }
|
||||||
|
|
||||||
[SugarColumn(IsJson = true)]
|
[SugarColumn(IsJson = true)]
|
||||||
public string SettingInfo { get; set; }
|
public JObject SettingInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace OpenAuth.WebApi.Controllers.BaseControllers
|
namespace OpenAuth.WebApi.Controllers.BaseControllers
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 系统配置
|
||||||
|
/// </summary>
|
||||||
[Route("api/[controller]/[action]")]
|
[Route("api/[controller]/[action]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
public class SysAppSettingController : ControllerBase
|
public class SysAppSettingController : ControllerBase
|
||||||
|
|
@ -19,7 +22,11 @@ namespace OpenAuth.WebApi.Controllers.BaseControllers
|
||||||
_app = app;
|
_app = app;
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
/// <summary>
|
||||||
|
/// 获取用户配置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<Response<SysAppSetting>> Get(long id)
|
public async Task<Response<SysAppSetting>> Get(long id)
|
||||||
{
|
{
|
||||||
|
|
@ -37,7 +44,11 @@ namespace OpenAuth.WebApi.Controllers.BaseControllers
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
/// <summary>
|
||||||
|
/// 保存用户配置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<Response<bool>> Save(SysAppSetting obj)
|
public async Task<Response<bool>> Save(SysAppSetting obj)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -404,6 +404,13 @@ public class TestAbc
|
||||||
int offset = 0, length = 0;
|
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)
|
private bool IsValidImageFormat(byte[] data)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue