perf(backend): nuget update (#119)

[skip ci]
This commit is contained in:
nsnail 2024-05-13 16:12:10 +08:00 committed by GitHub
parent 47e67dd503
commit 40e8eff5f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 26 additions and 14 deletions

View File

@ -2,7 +2,7 @@
通用后台权限管理系统、快速开发框架基于C#12/.NET9、Vue3/Vite、Element Plus等现代技术构建具有十分整洁、优雅的编码规范
[![.NET](https://github.com/nsnail/NetAdmin/actions/workflows/ci.yml/badge.svg)](https://github.com/nsnail/NetAdmin/actions/workflows/ci.yml)
[![.NET](https://github.com/nsnail/NetAdmin/actions/workflows/nightly-build.yml/badge.svg)](https://github.com/nsnail/NetAdmin/actions/workflows/ci.yml)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nsnail/NetAdmin/blob/main/LICENSE)
[![Furion](https://img.shields.io/badge/Furion-4.x-blueviolet.svg)](https://github.com/nsnail/NetAdmin/blob/main/LICENSE)
[![FreeSql](https://img.shields.io/badge/FreeSql-3.x-orange.svg)](https://github.com/nsnail/NetAdmin/blob/main/LICENSE)

View File

@ -15,15 +15,15 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.12-preview">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers" Version="4.12.2">
<PackageReference Include="Roslynator.Analyzers" Version="4.12.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.24.0.89429">
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.25.0.90414">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

View File

@ -9,7 +9,7 @@
"packages": [
{
"packageName": "Furion.Pure.NS",
"version": "4.9.2.31-ns3"
"version": "4.9.3-ns3"
}
]
}

View File

@ -1,8 +1,16 @@
using Furion.FriendlyException;
using NetAdmin.Domain.Dto;
namespace NetAdmin.Host.Filters;
/// <inheritdoc cref="NetAdmin.Host.Filters.ApiResultHandler{T}" />
/// <inheritdoc cref="ApiResultHandler{T}" />
[SuppressSniffer]
[UnifyModel(typeof(RestfulInfo<>))]
public sealed class DefaultApiResultHandler : ApiResultHandler<RestfulInfo<object>>, IUnifyResultProvider;
public sealed class DefaultApiResultHandler : ApiResultHandler<RestfulInfo<object>>, IUnifyResultProvider
{
/// <inheritdoc />
public IActionResult OnAuthorizeException(DefaultHttpContext context, ExceptionMetadata metadata)
{
throw new NotImplementedException();
}
}

View File

@ -9,9 +9,9 @@
<PackageReference Include="Cronos" Version="0.8.4"/>
<PackageReference Include="FreeSql.DbContext.NS" Version="3.2.821-ns1"/>
<PackageReference Include="FreeSql.Provider.Sqlite.NS" Version="3.2.821-ns1"/>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.2.31"/>
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster.NS" Version="4.9.2.31-ns1"/>
<PackageReference Include="Furion.Pure.NS" Version="4.9.2.31-ns1"/>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.3"/>
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster.NS" Version="4.9.3-ns1"/>
<PackageReference Include="Furion.Pure.NS" Version="4.9.3-ns1"/>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0-preview.3.24172.13"/>
<PackageReference Include="Minio" Version="6.0.2"/>
<PackageReference Include="NSExt" Version="2.1.0"/>

View File

@ -134,9 +134,9 @@ public sealed class UserService(
req.ThrowIfInvalid();
// ReSharper disable once MethodHasAsyncOverload
#pragma warning disable VSTHRD103
#pragma warning disable VSTHRD103,S6966
return (await QueryInternal(new QueryReq<QueryUserReq> { Filter = req })
#pragma warning restore VSTHRD103
#pragma warning restore S6966, VSTHRD103
.ForUpdate()
.ToOneAsync()
.ConfigureAwait(false)).Adapt<QueryUserRsp>();
@ -257,7 +257,9 @@ public sealed class UserService(
if (await Rpo.UpdateDiy
.SetSource(req with {
Id = UserToken.Id
, Version = Rpo.Where(a => a.Id == UserToken.Id).ToOne(a => a.Version)
, Version = await Rpo.Where(a => a.Id == UserToken.Id)
.ToOneAsync(a => a.Version)
.ConfigureAwait(false)
})
.UpdateColumns(a => a.Avatar)
.ExecuteAffrowsAsync()
@ -278,7 +280,9 @@ public sealed class UserService(
public async Task<UserInfoRsp> SetEmailAsync(SetEmailReq req)
{
req.ThrowIfInvalid();
var user = Rpo.Where(a => a.Id == UserToken.Id).ToOne(a => new { a.Mobile, a.Version, a.Email });
var user = await Rpo.Where(a => a.Id == UserToken.Id)
.ToOneAsync(a => new { a.Mobile, a.Version, a.Email })
.ConfigureAwait(false);
// 如果已绑定手机号、需要手机安全验证
if (!user.Mobile.NullOrEmpty()) {