feat: 用户选择器 (#189)

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-11-06 11:48:36 +08:00
committed by GitHub
parent a454f2ab2d
commit 8479f69bdc
18 changed files with 46 additions and 20 deletions

View File

@ -5,8 +5,8 @@
<ItemGroup>
<PackageReference Include="FreeSql.DbContext.NS" Version="3.2.833-ns4"/>
<PackageReference Include="FreeSql.Provider.Sqlite.NS" Version="3.2.833-ns4"/>
<PackageReference Include="Gurion" Version="1.1.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.11.0"/>
<PackageReference Include="Gurion" Version="1.2.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.12.0-3.final"/>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0-rc.2.24474.3"/>
<PackageReference Include="Minio" Version="6.0.3"/>
<PackageReference Include="NSExt" Version="2.2.0"/>

View File

@ -1,6 +1,5 @@
{
"AppSettings": {
"InjectSpecificationDocument": true,
"InjectMiniProfiler": true
"InjectSpecificationDocument": true
}
}

View File

@ -1,6 +1,5 @@
{
"AppSettings": {
"InjectSpecificationDocument": true,
"InjectMiniProfiler": true
"InjectSpecificationDocument": true
}
}

View File

@ -1,6 +1,5 @@
{
"AppSettings": {
"InjectSpecificationDocument": true,
"InjectMiniProfiler": true
"InjectSpecificationDocument": true
}
}

View File

@ -1,8 +1,7 @@
{
// App基本配置
"AppSettings": {
"InjectSpecificationDocument": false,
"InjectMiniProfiler": false
"InjectSpecificationDocument": false
},
// Swagger文档配置 ------------------------------------------------------------------------------
"SpecificationDocumentSettings": {

View File

@ -1,4 +1,4 @@
namespace NetAdmin.Infrastructure.Utils;
namespace NetAdmin.Infrastructure.Utils;
/// <summary>
/// 忽略 JsonIgnore 特性

View File

@ -246,7 +246,13 @@ public sealed class UserService(
public async Task<IEnumerable<QueryUserRsp>> QueryAsync(QueryReq<QueryUserReq> req)
{
req.ThrowIfInvalid();
var list = await (await QueryInternalAsync(req).ConfigureAwait(false)).Take(req.Count).ToListAsync(_listUserExp).ConfigureAwait(false);
var list = await (await QueryInternalAsync(req, false).ConfigureAwait(false))
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
.Take(req.Count)
.ToListAsync(a => new Sys_User { Id = a.Id, UserName = a.UserName })
.ConfigureAwait(false);
return list.Adapt<IEnumerable<QueryUserRsp>>();
}

View File

@ -42,7 +42,7 @@ public record CreateMenuReq : Sys_Menu
/// <inheritdoc cref="Sys_Menu.ParentId" />
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public override long ParentId { get; init; } = 0;
public override long ParentId { get; init; }
/// <inheritdoc cref="Sys_Menu.Path" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]

View File

@ -5,7 +5,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0-rc.2.24474.3"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0-pre.42">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>