perf: nuget update

This commit is contained in:
tk
2025-05-20 18:38:55 +08:00
committed by nsnail
parent 585f8f4e43
commit 83deb735d0
19 changed files with 46 additions and 33 deletions

View File

@ -98,8 +98,8 @@ public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicReposit
TEntity newValue //
, List<string> includeFields = null //
, List<string> excludeFields = null //
, Expression<Func<TEntity, bool>> whereExp = null //
, string whereSql = null //
, Expression<Func<TEntity, bool>> whereExp = null //
, string whereSql = null //
, bool ignoreVersion = false)
{
// 默认匹配主键

View File

@ -26,7 +26,7 @@ public static class ISelectExtensions
where T1 : class
{
return me
#if DBTYPE_SQLSERVER
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
;
@ -40,7 +40,7 @@ public static class ISelectExtensions
where T2 : class
{
return me
#if DBTYPE_SQLSERVER
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
;
@ -55,7 +55,7 @@ public static class ISelectExtensions
where T3 : class
{
return me
#if DBTYPE_SQLSERVER
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
;
@ -71,7 +71,7 @@ public static class ISelectExtensions
where T4 : class
{
return me
#if DBTYPE_SQLSERVER
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
;
@ -88,7 +88,7 @@ public static class ISelectExtensions
where T5 : class
{
return me
#if DBTYPE_SQLSERVER
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
;
@ -106,7 +106,7 @@ public static class ISelectExtensions
where T6 : class
{
return me
#if DBTYPE_SQLSERVER
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
;

View File

@ -5,7 +5,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CronExpressionDescriptor" Version="2.41.0"/>
<PackageReference Include="Cronos" Version="0.10.0"/>
<PackageReference Include="Cronos" Version="0.11.0"/>
<PackageReference Include="NetAdmin.CsvHelper" Version="1.0.0"/>
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14"/>
</ItemGroup>

View File

@ -1,5 +1,9 @@
using Spectre.Console;
using Spectre.Console.Cli;
#if WINDOWS
using Color = Spectre.Console.Color;
using Panel = Spectre.Console.Panel;
#endif
namespace NetAdmin.Host;

View File

@ -15,9 +15,9 @@ public static class Chars
public const string FLG_CONTEXT_USER_ID = nameof(FLG_CONTEXT_USER_ID);
public const string FLG_CONTEXT_USER_INFO = nameof(FLG_CONTEXT_USER_INFO);
public const string FLG_CRON_PER_SECS = "* * * * * *";
public const string FLG_DB_EXCEPTION_IDX = "idx_";
public const string FLG_DB_EXCEPTION_PRIMARY_KEY_CONFLICT = "PRIMARY KEY";
public const string FLG_DB_EXCEPTION_UNIQUE_CONSTRAINT_CONFLICT = "UNIQUE constraint";
public const string FLG_DB_EXCEPTION_IDX = "idx_";
public const string FLG_DB_FIELD_TYPE_NVARCHAR = "nvarchar";
public const string FLG_DB_FIELD_TYPE_NVARCHAR_1022 = "nvarchar(1022)";
public const string FLG_DB_FIELD_TYPE_NVARCHAR_127 = "nvarchar(127)";

View File

@ -330,7 +330,7 @@ public enum CountryCodes
"United States", "USA", "Vereinigte Staaten von Amerika", "États-Unis", "Estados Unidos", "アメリカ合衆国", "Verenigde Staten"
, "Соединенные Штаты Америки", "美国"
], IsPreferred = true
, Timezones = [
, Timezones = [
"America/Adak,-1000", "America/Anchorage,-0900", "America/Boise,-0700", "America/Chicago,-0600", "America/Denver,-0700"
, "America/Detroit,-0500", "America/Indiana/Indianapolis,-0500", "America/Indiana/Knox,-0600", "America/Indiana/Marengo,-0500"
, "America/Indiana/Petersburg,-0500", "America/Indiana/Tell_City,-0600", "America/Indiana/Vevay,-0500"

View File

@ -4,6 +4,11 @@ using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
#if WINDOWS
using Image = SixLabors.ImageSharp.Image;
using Point = SixLabors.ImageSharp.Point;
using Size = SixLabors.ImageSharp.Size;
#endif
namespace NetAdmin.Infrastructure.Utils;

View File

@ -1,6 +1,8 @@
using NetAdmin.Domain.Dto.Sys.Captcha;
using SixLabors.ImageSharp;
using Yitter.IdGenerator;
#if WINDOWS
using Size = SixLabors.ImageSharp.Size;
#endif
namespace NetAdmin.SysComponent.Application.Services.Sys;

View File

@ -77,7 +77,7 @@ public sealed class DicCatalogService(BasicRepository<Sys_DicCatalog, long> rpo)
return
#if DBTYPE_SQLSERVER
(await UpdateReturnListAsync(req).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryDicCatalogRsp>();
#else
#else
await UpdateAsync(req).ConfigureAwait(false) > 0 ? await GetAsync(new QueryDicCatalogReq { Id = req.Id }).ConfigureAwait(false) : null;
#endif
}

View File

@ -78,7 +78,7 @@ public sealed class DocCatalogService(BasicRepository<Sys_DocCatalog, long> rpo)
return
#if DBTYPE_SQLSERVER
(await UpdateReturnListAsync(req).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryDocCatalogRsp>();
#else
#else
await UpdateAsync(req).ConfigureAwait(false) > 0 ? await GetAsync(new QueryDocCatalogReq { Id = req.Id }).ConfigureAwait(false) : null;
#endif
}

View File

@ -87,7 +87,7 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
return
#if DBTYPE_SQLSERVER
(await UpdateReturnListAsync(req.Adapt<Sys_UserProfile>()).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryUserProfileRsp>();
#else
#else
await UpdateAsync(req.Adapt<Sys_UserProfile>()).ConfigureAwait(false) > 0
? await GetAsync(new QueryUserProfileReq { Id = req.Id }).ConfigureAwait(false)
: null;
@ -136,13 +136,12 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
.ConfigureAwait(false);
return new PagedQueryRsp<QueryUserProfileRsp>(req.Page, req.PageSize, total
, list.ConvertAll(
x => x.a.Adapt<QueryUserProfileRsp>() with {
NationArea = x.b.Adapt<QueryDicContentRsp>()
, CompanyArea = x.c.Adapt<QueryDicContentRsp>()
, HomeArea = x.d.Adapt<QueryDicContentRsp>()
, EmergencyContactArea = x.e.Adapt<QueryDicContentRsp>()
}));
, list.ConvertAll(x => x.a.Adapt<QueryUserProfileRsp>() with {
NationArea = x.b.Adapt<QueryDicContentRsp>()
, CompanyArea = x.c.Adapt<QueryDicContentRsp>()
, HomeArea = x.d.Adapt<QueryDicContentRsp>()
, EmergencyContactArea = x.e.Adapt<QueryDicContentRsp>()
}));
}
/// <inheritdoc />

View File

@ -4,6 +4,6 @@
<ProjectReference Include="../NetAdmin/NetAdmin.Tests/NetAdmin.Tests.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0-preview-25107-01"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0"/>
</ItemGroup>
</Project>