feat: 分组统计功能

This commit is contained in:
tk 2024-12-09 19:36:44 +08:00 committed by nsnail
parent 89846d9783
commit 0b036e9d67
131 changed files with 1813 additions and 236 deletions

View File

@ -30,6 +30,11 @@ public interface ICrudModule<in TCreateReq, TCreateRsp, in TEditReq, TQueryReq,
/// </summary>
Task<long> CountAsync(QueryReq<TQueryReq> req);
/// <summary>
/// 实体分组计数
/// </summary>
Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<TQueryReq> req);
/// <summary>
/// 创建实体
/// </summary>

View File

@ -31,6 +31,21 @@ public sealed class ExampleService(BasicRepository<Tpl_Example, long> rpo) //
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryExampleReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Tpl_Example>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Tpl_Example).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryExampleRsp> CreateAsync(CreateExampleReq req)
{

View File

@ -21,6 +21,12 @@ public sealed class ExampleCache(IDistributedCache cache, IExampleService servic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryExampleReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryExampleRsp> CreateAsync(CreateExampleReq req)
{

View File

@ -25,7 +25,7 @@ public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreate
[Column(CanUpdate = false, Position = -1)]
[CsvIgnore]
[JsonIgnore]
public long? CreatedUserId { get; init; }
public virtual long? CreatedUserId { get; init; }
/// <summary>
/// 创建者用户名

View File

@ -39,7 +39,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column]
[CsvIgnore]
[JsonIgnore]
public virtual int Duration { get; protected init; }
public virtual int Duration { get; init; }
/// <summary>
/// 程序响应码
@ -47,7 +47,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column]
[CsvIgnore]
[JsonIgnore]
public virtual ErrorCodes ErrorCode { get; protected init; }
public virtual ErrorCodes ErrorCode { get; init; }
/// <summary>
/// HTTP状态码
@ -63,7 +63,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column(Position = -1, DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_63)]
[CsvIgnore]
[JsonIgnore]
public virtual string LoginUserName { get; protected init; }
public virtual string LoginUserName { get; init; }
/// <summary>
/// 拥有者
@ -95,7 +95,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column(DbType = Chars.FLGL_DB_FIELD_TYPE_VARCHAR_MAX)]
[CsvIgnore]
[JsonIgnore]
public virtual string RequestBody { get; protected init; }
public virtual string RequestBody { get; init; }
/// <summary>
/// 请求头信息
@ -103,7 +103,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column(DbType = Chars.FLGL_DB_FIELD_TYPE_VARCHAR_MAX)]
[CsvIgnore]
[JsonIgnore]
public virtual string RequestHeaders { get; protected init; }
public virtual string RequestHeaders { get; init; }
/// <summary>
/// 请求地址
@ -111,7 +111,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_127)]
[CsvIgnore]
[JsonIgnore]
public virtual string RequestUrl { get; protected init; }
public virtual string RequestUrl { get; init; }
/// <summary>
/// 响应内容
@ -119,7 +119,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column(DbType = Chars.FLGL_DB_FIELD_TYPE_VARCHAR_MAX)]
[CsvIgnore]
[JsonIgnore]
public virtual string ResponseBody { get; protected init; }
public virtual string ResponseBody { get; init; }
/// <summary>
/// 响应头
@ -127,7 +127,7 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column(DbType = Chars.FLGL_DB_FIELD_TYPE_VARCHAR_MAX)]
[CsvIgnore]
[JsonIgnore]
public virtual string ResponseHeaders { get; protected init; }
public virtual string ResponseHeaders { get; init; }
/// <summary>
/// 服务器IP
@ -135,5 +135,5 @@ public record Sys_LoginLog : SimpleEntity, IFieldCreatedTime, IFieldOwner, IFiel
[Column]
[CsvIgnore]
[JsonIgnore]
public virtual int? ServerIp { get; protected init; }
public virtual int? ServerIp { get; init; }
}

View File

@ -47,7 +47,7 @@ public sealed record ExportLoginLogRsp : QueryLoginLogRsp
[CsvIgnore(false)]
[CsvIndex(2)]
[CsvName(nameof(Ln.登录名))]
public override string LoginUserName { get; protected init; }
public override string LoginUserName { get; init; }
/// <inheritdoc />
[CsvIgnore]

View File

@ -30,11 +30,11 @@ public record QueryLoginLogRsp : Sys_LoginLog
/// <inheritdoc cref="Sys_LoginLog.Duration" />
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public override int Duration { get; protected init; }
public override int Duration { get; init; }
/// <inheritdoc cref="Sys_LoginLog.ErrorCode" />
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public override ErrorCodes ErrorCode { get; protected init; }
public override ErrorCodes ErrorCode { get; init; }
/// <inheritdoc cref="Sys_LoginLog.HttpStatusCode" />
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
@ -46,32 +46,32 @@ public record QueryLoginLogRsp : Sys_LoginLog
/// <inheritdoc cref="Sys_LoginLog.LoginUserName" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public override string LoginUserName { get; protected init; }
public override string LoginUserName { get; init; }
/// <inheritdoc cref="Sys_LoginLog.Owner" />
public new virtual QueryUserRsp Owner { get; init; }
/// <inheritdoc cref="Sys_LoginLog.RequestBody" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public override string RequestBody { get; protected init; }
public override string RequestBody { get; init; }
/// <inheritdoc cref="Sys_LoginLog.RequestHeaders" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public override string RequestHeaders { get; protected init; }
public override string RequestHeaders { get; init; }
/// <inheritdoc cref="Sys_LoginLog.RequestUrl" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public override string RequestUrl { get; protected init; }
public override string RequestUrl { get; init; }
/// <inheritdoc cref="Sys_LoginLog.ResponseBody" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public override string ResponseBody { get; protected init; }
public override string ResponseBody { get; init; }
/// <inheritdoc cref="Sys_LoginLog.ResponseHeaders" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public override string ResponseHeaders { get; protected init; }
public override string ResponseHeaders { get; init; }
/// <inheritdoc cref="Sys_LoginLog.ServerIp" />
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public override int? ServerIp { get; protected init; }
public override int? ServerIp { get; init; }
}

View File

@ -20,10 +20,10 @@ public abstract record SqlCommandEvent : DataAbstraction, IEventSource
public CancellationToken CancellationToken { get; init; }
/// <inheritdoc />
public DateTime CreatedTime { get; protected init; }
public DateTime CreatedTime { get; init; }
/// <inheritdoc />
public string EventId { get; protected init; }
public string EventId { get; init; }
/// <inheritdoc />
public object Payload { get; init; }

View File

@ -31,6 +31,15 @@ public sealed class ExampleController(IExampleCache cache) : ControllerBase<IExa
return Cache.CountAsync(req);
}
/// <summary>
/// 示例分组计数
/// </summary>
[NonAction]
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryExampleReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建示例
/// </summary>

View File

@ -11,6 +11,11 @@ public interface IApiModule : ICrudModule<CreateApiReq, QueryApiRsp // 创建类
, DelReq // 删除类型
>
{
/// <summary>
/// 平面查询接口
/// </summary>
public Task<IEnumerable<QueryApiRsp>> PlainQueryAsync(QueryReq<QueryApiReq> req);
/// <summary>
/// 同步接口
/// </summary>

View File

@ -18,6 +18,11 @@ public interface IDicModule
/// </summary>
Task<int> BulkDeleteContentAsync(BulkReq<DelReq> req);
/// <summary>
/// 字典内容分组计数
/// </summary>
Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDicContentReq> req);
/// <summary>
/// 创建字典目录
/// </summary>

View File

@ -18,6 +18,11 @@ public interface IDocModule
/// </summary>
Task<int> BulkDeleteContentAsync(BulkReq<DelReq> req);
/// <summary>
/// 文档内容分组计数
/// </summary>
Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDocContentReq> req);
/// <summary>
/// 创建文档分类
/// </summary>

View File

@ -53,6 +53,11 @@ public interface IJobModule : ICrudModule<CreateJobReq, QueryJobRsp // 创建类
/// </summary>
Task<PagedQueryRsp<QueryJobRecordRsp>> PagedQueryRecordAsync(PagedQueryReq<QueryJobRecordReq> req);
/// <summary>
/// 作业记录分组计数
/// </summary>
Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> RecordCountByAsync(QueryReq<QueryJobRecordReq> req);
/// <summary>
/// 设置计划作业启用状态
/// </summary>

View File

@ -0,0 +1,3 @@
<wpf:ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xml:space="preserve">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=modules_005Csys_005Csession/@EntryIndexedValue">True</s:Boolean>
</wpf:ResourceDictionary>

View File

@ -24,6 +24,21 @@ public sealed class ApiService(
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryApiReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_Api>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_Api).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public Task<QueryApiRsp> CreateAsync(CreateApiReq req)
{
@ -73,6 +88,14 @@ public sealed class ApiService(
throw new NotImplementedException();
}
/// <inheritdoc />
public async Task<IEnumerable<QueryApiRsp>> PlainQueryAsync(QueryReq<QueryApiReq> req)
{
req.ThrowIfInvalid();
var ret = await Rpo.Select.WhereDynamicFilter(req.DynamicFilter).WhereDynamic(req.Filter).ToListAsync().ConfigureAwait(false);
return ret.Adapt<IEnumerable<QueryApiRsp>>();
}
/// <inheritdoc />
public async Task<IEnumerable<QueryApiRsp>> QueryAsync(QueryReq<QueryApiReq> req)
{

View File

@ -28,6 +28,21 @@ public sealed class ConfigService(BasicRepository<Sys_Config, long> rpo) //
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryConfigReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_Config>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_Config).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryConfigRsp> CreateAsync(CreateConfigReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class DeptService(BasicRepository<Sys_Dept, long> rpo) //
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDeptReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_Dept>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_Dept).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
/// <exception cref="NetAdminInvalidOperationException">Parent_department_does_not_exist</exception>
public async Task<QueryDeptRsp> CreateAsync(CreateDeptReq req)

View File

@ -71,6 +71,11 @@ public sealed class DevService(IApiService apiService) : ServiceBase<DevService>
, Path.Combine(dtoDir, $"Create{req.ModuleName}Req.cs"), typeAbbr)
.ConfigureAwait(false);
// EditReq
await WriteCodeFileAsync(req, Path.Combine(tplDataDir, "Dto", "Tpl", "Example", "EditExampleReq.cs")
, Path.Combine(dtoDir, $"Edit{req.ModuleName}Req.cs"), typeAbbr)
.ConfigureAwait(false);
// QueryReq
await WriteCodeFileAsync(req, Path.Combine(tplDataDir, "Dto", "Tpl", "Example", "QueryExampleReq.cs")
, Path.Combine(dtoDir, $"Query{req.ModuleName}Req.cs"), typeAbbr)

View File

@ -28,6 +28,21 @@ public sealed class DicCatalogService(BasicRepository<Sys_DicCatalog, long> rpo)
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDicCatalogReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_DicCatalog>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_DicCatalog).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
/// <exception cref="NetAdminInvalidOperationException">The_parent_node_does_not_exist</exception>
public async Task<QueryDicCatalogRsp> CreateAsync(CreateDicCatalogReq req)

View File

@ -28,6 +28,21 @@ public sealed class DicContentService(BasicRepository<Sys_DicContent, long> rpo)
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDicContentReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_DicContent>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_DicContent).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
/// <exception cref="NetAdminInvalidOperationException">Dictionary_directory_does_not_exist</exception>
public async Task<QueryDicContentRsp> CreateAsync(CreateDicContentReq req)

View File

@ -21,6 +21,13 @@ public sealed class DicService(IDicCatalogService catalogService, IDicContentSer
return contentService.BulkDeleteAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDicContentReq> req)
{
req.ThrowIfInvalid();
return contentService.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDicCatalogRsp> CreateCatalogAsync(CreateDicCatalogReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class DocCatalogService(BasicRepository<Sys_DocCatalog, long> rpo)
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDocCatalogReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_DocCatalog>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_DocCatalog).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
/// <exception cref="NetAdminInvalidOperationException">The_parent_node_does_not_exist</exception>
public async Task<QueryDocCatalogRsp> CreateAsync(CreateDocCatalogReq req)

View File

@ -32,6 +32,21 @@ public sealed class DocContentService(BasicRepository<Sys_DocContent, long> rpo)
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDocContentReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_DocContent>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_DocContent).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
/// <exception cref="NetAdminInvalidOperationException">Doctionary_directory_does_not_exist</exception>
public async Task<QueryDocContentRsp> CreateAsync(CreateDocContentReq req)

View File

@ -21,6 +21,13 @@ public sealed class DocService(IDocCatalogService catalogService, IDocContentSer
return contentService.BulkDeleteAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDocContentReq> req)
{
req.ThrowIfInvalid();
return contentService.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDocCatalogRsp> CreateCatalogAsync(CreateDocCatalogReq req)
{

View File

@ -29,6 +29,21 @@ public sealed class JobRecordService(BasicRepository<Sys_JobRecord, long> rpo) /
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryJobRecordReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_JobRecord>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_JobRecord).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryJobRecordRsp> CreateAsync(CreateJobRecordReq req)
{

View File

@ -33,6 +33,21 @@ public sealed class JobService(BasicRepository<Sys_Job, long> rpo, IJobRecordSer
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryJobReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_Job>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_Job).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public Task<long> CountRecordAsync(QueryReq<QueryJobRecordReq> req)
{
@ -265,6 +280,13 @@ public sealed class JobService(BasicRepository<Sys_Job, long> rpo, IJobRecordSer
return ret.Adapt<IEnumerable<QueryJobRsp>>();
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> RecordCountByAsync(QueryReq<QueryJobRecordReq> req)
{
req.ThrowIfInvalid();
return jobRecordService.CountByAsync(req);
}
/// <inheritdoc />
public async Task<int> ReleaseStuckTaskAsync()
{

View File

@ -28,6 +28,21 @@ public sealed class LoginLogService(BasicRepository<Sys_LoginLog, long> rpo) //
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryLoginLogReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_LoginLog>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_LoginLog).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryLoginLogRsp> CreateAsync(CreateLoginLogReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class MenuService(BasicRepository<Sys_Menu, long> rpo, IUserServic
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryMenuReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_Menu>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_Menu).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryMenuRsp> CreateAsync(CreateMenuReq req)
{

View File

@ -28,6 +28,22 @@ public sealed class RequestLogDetailService(BasicRepository<Sys_RequestLogDetail
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(
QueryReq<QueryRequestLogDetailReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_RequestLogDetail>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_RequestLogDetail).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryRequestLogDetailRsp> CreateAsync(CreateRequestLogDetailReq req)
{

View File

@ -30,6 +30,21 @@ public sealed class RequestLogService(BasicRepository<Sys_RequestLog, long> rpo,
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRequestLogReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_RequestLog>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_RequestLog).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryRequestLogRsp> CreateAsync(CreateRequestLogReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class RoleService(BasicRepository<Sys_Role, long> rpo) //
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRoleReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_Role>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_Role).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryRoleRsp> CreateAsync(CreateRoleReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class SiteMsgDeptService(BasicRepository<Sys_SiteMsgDept, long> rp
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgDeptReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_SiteMsgDept>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_SiteMsgDept).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QuerySiteMsgDeptRsp> CreateAsync(CreateSiteMsgDeptReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class SiteMsgFlagService(BasicRepository<Sys_SiteMsgFlag, long> rp
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgFlagReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_SiteMsgFlag>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_SiteMsgFlag).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QuerySiteMsgFlagRsp> CreateAsync(CreateSiteMsgFlagReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class SiteMsgRoleService(BasicRepository<Sys_SiteMsgRole, long> rp
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgRoleReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_SiteMsgRole>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_SiteMsgRole).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QuerySiteMsgRoleRsp> CreateAsync(CreateSiteMsgRoleReq req)
{

View File

@ -32,6 +32,21 @@ public sealed class SiteMsgService(BasicRepository<Sys_SiteMsg, long> rpo, Conte
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_SiteMsg>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_SiteMsg).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QuerySiteMsgRsp> CreateAsync(CreateSiteMsgReq req)
{

View File

@ -28,6 +28,21 @@ public sealed class SiteMsgUserService(BasicRepository<Sys_SiteMsgUser, long> rp
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgUserReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_SiteMsgUser>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_SiteMsgUser).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QuerySiteMsgUserRsp> CreateAsync(CreateSiteMsgUserReq req)
{

View File

@ -44,7 +44,22 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
public Task<long> CountAsync(QueryReq<QueryUserProfileReq> req)
{
req.ThrowIfInvalid();
return QueryInternal(req).WithNoLockNoWait().CountAsync();
return QueryInternalComplex(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryUserProfileReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_UserProfile>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_UserProfile).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
@ -89,7 +104,9 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
public async Task<QueryUserProfileRsp> GetAsync(QueryUserProfileReq req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(new QueryReq<QueryUserProfileReq> { Filter = req, Order = Orders.None }).ToOneAsync().ConfigureAwait(false);
var ret = await QueryInternalComplex(new QueryReq<QueryUserProfileReq> { Filter = req, Order = Orders.None })
.ToOneAsync()
.ConfigureAwait(false);
return ret.Adapt<QueryUserProfileRsp>();
}
@ -104,7 +121,7 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
public async Task<PagedQueryRsp<QueryUserProfileRsp>> PagedQueryAsync(PagedQueryReq<QueryUserProfileReq> req)
{
req.ThrowIfInvalid();
var list = await QueryInternal(req)
var list = await QueryInternalComplex(req)
.Page(req.Page, req.PageSize)
.WithNoLockNoWait()
.Count(out var total)
@ -131,7 +148,7 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
public async Task<IEnumerable<QueryUserProfileRsp>> QueryAsync(QueryReq<QueryUserProfileReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req)
var ret = await QueryInternalComplex(req)
.WithNoLockNoWait()
.Take(req.Count)
.ToListAsync((a, b, c, d, e) => new {
@ -164,7 +181,28 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
return UpdateAsync(req, [nameof(req.AppConfig)], null, a => a.Id == UserToken.Id, null, true);
}
private ISelect<Sys_UserProfile, Sys_DicContent, Sys_DicContent, Sys_DicContent, Sys_DicContent> QueryInternal(QueryReq<QueryUserProfileReq> req)
private ISelect<Sys_UserProfile> QueryInternal(QueryReq<QueryUserProfileReq> req)
{
var ret = Rpo.Select.WhereDynamicFilter(req.DynamicFilter).WhereDynamic(req.Filter);
// ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault
switch (req.Order) {
case Orders.None:
return ret;
case Orders.Random:
return ret.OrderByRandom();
}
ret = ret.OrderByPropertyNameIf(req.Prop?.Length > 0, req.Prop, req.Order == Orders.Ascending);
if (!req.Prop?.Equals(nameof(req.Filter.Id), StringComparison.OrdinalIgnoreCase) ?? true) {
ret = ret.OrderByDescending(a => a.Id);
}
return ret;
}
private ISelect<Sys_UserProfile, Sys_DicContent, Sys_DicContent, Sys_DicContent, Sys_DicContent> QueryInternalComplex(
QueryReq<QueryUserProfileReq> req)
{
#pragma warning disable CA1305,IDE0072
var ret = Rpo.Orm.Select<Sys_UserProfile, Sys_DicContent, Sys_DicContent, Sys_DicContent, Sys_DicContent>()

View File

@ -72,6 +72,23 @@ public sealed class UserService(
#pragma warning restore VSTHRD103
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryUserReq> req)
{
req.ThrowIfInvalid();
#pragma warning disable S6966
var ret = await QueryInternal(req with { Order = Orders.None })
#pragma warning restore S6966
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_User>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Sys_User).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryUserRsp> CreateAsync(CreateUserReq req)
{

View File

@ -32,6 +32,21 @@ public sealed class VerifyCodeService(BasicRepository<Sys_VerifyCode, long> rpo,
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryVerifyCodeReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Sys_VerifyCode>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(
y => y, y => typeof(Sys_VerifyCode).GetProperty(y)!.GetValue(x.Key)!.ToString()), x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
public async Task<QueryVerifyCodeRsp> CreateAsync(CreateVerifyCodeReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class ApiCache(IDistributedCache cache, IApiService service) //
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryApiReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryApiRsp> CreateAsync(CreateApiReq req)
{
@ -54,6 +60,12 @@ public sealed class ApiCache(IDistributedCache cache, IApiService service) //
return Service.PagedQueryAsync(req);
}
/// <inheritdoc />
public Task<IEnumerable<QueryApiRsp>> PlainQueryAsync(QueryReq<QueryApiReq> req)
{
return Service.PlainQueryAsync(req);
}
/// <inheritdoc />
public Task<IEnumerable<QueryApiRsp>> QueryAsync(QueryReq<QueryApiReq> req)
{

View File

@ -18,6 +18,12 @@ public sealed class ConfigCache(IDistributedCache cache, IConfigService service)
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryConfigReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryConfigRsp> CreateAsync(CreateConfigReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class DeptCache(IDistributedCache cache, IDeptService service) //
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDeptReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDeptRsp> CreateAsync(CreateDeptReq req)
{

View File

@ -19,6 +19,12 @@ public sealed class DicCache(IDistributedCache cache, IDicService service) //
return Service.BulkDeleteContentAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDicContentReq> req)
{
return Service.ContentCountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDicCatalogRsp> CreateCatalogAsync(CreateDicCatalogReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class DicCatalogCache(IDistributedCache cache, IDicCatalogService
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDicCatalogReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDicCatalogRsp> CreateAsync(CreateDicCatalogReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class DicContentCache(IDistributedCache cache, IDicContentService
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDicContentReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDicContentRsp> CreateAsync(CreateDicContentReq req)
{

View File

@ -19,6 +19,12 @@ public sealed class DocCache(IDistributedCache cache, IDocService service) //
return Service.BulkDeleteContentAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDocContentReq> req)
{
return Service.ContentCountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDocCatalogRsp> CreateCatalogAsync(CreateDocCatalogReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class DocCatalogCache(IDistributedCache cache, IDocCatalogService
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDocCatalogReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDocCatalogRsp> CreateAsync(CreateDocCatalogReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class DocContentCache(IDistributedCache cache, IDocContentService
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDocContentReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryDocContentRsp> CreateAsync(CreateDocContentReq req)
{

View File

@ -19,6 +19,12 @@ public sealed class JobCache(IDistributedCache cache, IJobService service) : Dis
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryJobReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<long> CountRecordAsync(QueryReq<QueryJobRecordReq> req)
{
@ -127,6 +133,12 @@ public sealed class JobCache(IDistributedCache cache, IJobService service) : Dis
return Service.QueryAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> RecordCountByAsync(QueryReq<QueryJobRecordReq> req)
{
return Service.RecordCountByAsync(req);
}
/// <inheritdoc />
public Task<int> SetEnabledAsync(SetJobEnabledReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class JobRecordCache(IDistributedCache cache, IJobRecordService se
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryJobRecordReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryJobRecordRsp> CreateAsync(CreateJobRecordReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class LoginLogCache(IDistributedCache cache, ILoginLogService serv
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryLoginLogReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryLoginLogRsp> CreateAsync(CreateLoginLogReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class MenuCache(IDistributedCache cache, IMenuService service) //
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryMenuReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryMenuRsp> CreateAsync(CreateMenuReq req)
{

View File

@ -31,6 +31,12 @@ public sealed class RequestLogCache(IDistributedCache cache, IRequestLogService
#endif
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRequestLogReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryRequestLogRsp> CreateAsync(CreateRequestLogReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class RequestLogDetailCache(IDistributedCache cache, IRequestLogDe
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRequestLogDetailReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryRequestLogDetailRsp> CreateAsync(CreateRequestLogDetailReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class RoleCache(IDistributedCache cache, IRoleService service) //
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRoleReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryRoleRsp> CreateAsync(CreateRoleReq req)
{

View File

@ -19,6 +19,12 @@ public sealed class SiteMsgCache(IDistributedCache cache, ISiteMsgService servic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QuerySiteMsgRsp> CreateAsync(CreateSiteMsgReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class SiteMsgDeptCache(IDistributedCache cache, ISiteMsgDeptServic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgDeptReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QuerySiteMsgDeptRsp> CreateAsync(CreateSiteMsgDeptReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class SiteMsgFlagCache(IDistributedCache cache, ISiteMsgFlagServic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgFlagReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QuerySiteMsgFlagRsp> CreateAsync(CreateSiteMsgFlagReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class SiteMsgRoleCache(IDistributedCache cache, ISiteMsgRoleServic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgRoleReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QuerySiteMsgRoleRsp> CreateAsync(CreateSiteMsgRoleReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class SiteMsgUserCache(IDistributedCache cache, ISiteMsgUserServic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgUserReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QuerySiteMsgUserRsp> CreateAsync(CreateSiteMsgUserReq req)
{

View File

@ -31,6 +31,12 @@ public sealed class UserCache(IDistributedCache cache, IUserService service, IVe
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryUserReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryUserRsp> CreateAsync(CreateUserReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class UserProfileCache(IDistributedCache cache, IUserProfileServic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryUserProfileReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryUserProfileRsp> CreateAsync(CreateUserProfileReq req)
{

View File

@ -18,6 +18,12 @@ public sealed class VerifyCodeCache(IDistributedCache cache, IVerifyCodeService
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryVerifyCodeReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryVerifyCodeRsp> CreateAsync(CreateVerifyCodeReq req)
{

View File

@ -27,6 +27,15 @@ public sealed class ApiController(IApiCache cache) : ControllerBase<IApiCache, I
return Cache.CountAsync(req);
}
/// <summary>
/// 接口分组计数
/// </summary>
[NonAction]
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryApiReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建接口
/// </summary>
@ -83,6 +92,14 @@ public sealed class ApiController(IApiCache cache) : ControllerBase<IApiCache, I
return Cache.PagedQueryAsync(req);
}
/// <summary>
/// 平面查询接口
/// </summary>
public Task<IEnumerable<QueryApiRsp>> PlainQueryAsync(QueryReq<QueryApiReq> req)
{
return Cache.PlainQueryAsync(req);
}
/// <summary>
/// 查询接口
/// </summary>

View File

@ -26,6 +26,14 @@ public sealed class ConfigController(IConfigCache cache) : ControllerBase<IConfi
return Cache.CountAsync(req);
}
/// <summary>
/// 配置分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryConfigReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建配置
/// </summary>

View File

@ -26,6 +26,14 @@ public sealed class DeptController(IDeptCache cache) : ControllerBase<IDeptCache
return Cache.CountAsync(req);
}
/// <summary>
/// 部门分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDeptReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建部门
/// </summary>

View File

@ -28,6 +28,14 @@ public sealed class DicController(IDicCache cache) : ControllerBase<IDicCache, I
return Cache.BulkDeleteContentAsync(req);
}
/// <summary>
/// 字典内容分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDicContentReq> req)
{
return Cache.ContentCountByAsync(req);
}
/// <summary>
/// 创建字典目录
/// </summary>

View File

@ -28,6 +28,14 @@ public sealed class DocController(IDocCache cache) : ControllerBase<IDocCache, I
return Cache.BulkDeleteContentAsync(req);
}
/// <summary>
/// 文档内容分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(QueryReq<QueryDocContentReq> req)
{
return Cache.ContentCountByAsync(req);
}
/// <summary>
/// 创建文档分类
/// </summary>

View File

@ -28,6 +28,14 @@ public sealed class JobController(IJobCache cache) : ControllerBase<IJobCache, I
return Cache.CountAsync(req);
}
/// <summary>
/// 计划作业分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryJobReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 作业记录计数
/// </summary>
@ -151,6 +159,14 @@ public sealed class JobController(IJobCache cache) : ControllerBase<IJobCache, I
return Cache.QueryAsync(req);
}
/// <summary>
/// 作业记录分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> RecordCountByAsync(QueryReq<QueryJobRecordReq> req)
{
return Cache.RecordCountByAsync(req);
}
/// <summary>
/// 启用/禁用作业
/// </summary>

View File

@ -26,6 +26,14 @@ public sealed class LoginLogController(ILoginLogCache cache) : ControllerBase<IL
return Cache.CountAsync(req);
}
/// <summary>
/// 登录日志分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryLoginLogReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建登录日志
/// </summary>

View File

@ -26,6 +26,15 @@ public sealed class MenuController(IMenuCache cache) : ControllerBase<IMenuCache
return Cache.CountAsync(req);
}
/// <summary>
/// 菜单分组计数
/// </summary>
[NonAction]
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryMenuReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建菜单
/// </summary>

View File

@ -28,6 +28,14 @@ public sealed class RequestLogController(IRequestLogCache cache) : ControllerBas
return Cache.CountAsync(req);
}
/// <summary>
/// 请求日志分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRequestLogReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建请求日志
/// </summary>

View File

@ -26,6 +26,14 @@ public sealed class RoleController(IRoleCache cache) : ControllerBase<IRoleCache
return Cache.CountAsync(req);
}
/// <summary>
/// 角色分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRoleReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建角色
/// </summary>

View File

@ -27,6 +27,14 @@ public sealed class SiteMsgController(ISiteMsgCache cache) : ControllerBase<ISit
return Cache.CountAsync(req);
}
/// <summary>
/// 站内信分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建站内信
/// </summary>

View File

@ -46,6 +46,14 @@ public sealed class UserController(IUserCache cache, IConfigCache configCache) :
return Cache.CountAsync(req);
}
/// <summary>
/// 用户分组计数
/// </summary>
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryUserReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建用户
/// </summary>

View File

@ -27,6 +27,15 @@ public sealed class VerifyCodeController(IVerifyCodeCache cache, ICaptchaCache c
return Cache.CountAsync(req);
}
/// <summary>
/// 验证码分组计数
/// </summary>
[NonAction]
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryVerifyCodeReq> req)
{
return Cache.CountByAsync(req);
}
/// <summary>
/// 创建验证码
/// </summary>

View File

@ -15,7 +15,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<int> BulkDeleteAsync(BulkReq<DelReq> req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -25,7 +25,17 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<long> CountAsync(QueryReq<QueryApiReq> req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryApiReq> req)
{
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -35,7 +45,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<QueryApiRsp> CreateAsync(CreateApiReq req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -45,7 +55,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<int> DeleteAsync(DelReq req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -55,7 +65,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<QueryApiRsp> EditAsync(EditApiReq req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -65,7 +75,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<IActionResult> ExportAsync(QueryReq<QueryApiReq> req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -75,7 +85,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<QueryApiRsp> GetAsync(QueryApiReq req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -85,7 +95,17 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<PagedQueryRsp<QueryApiRsp>> PagedQueryAsync(PagedQueryReq<QueryApiReq> req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IEnumerable<QueryApiRsp>> PlainQueryAsync(QueryReq<QueryApiReq> req)
{
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -95,7 +115,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Theory]
public async Task<IEnumerable<QueryApiRsp>> QueryAsync(QueryReq<QueryApiReq> req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
var rsp = await PostJsonAsync(typeof(ApiController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
@ -104,7 +124,7 @@ public class ApiTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
[Fact]
public async Task SyncAsync()
{
var rsp = await PostJsonAsync(typeof(DeptController));
var rsp = await PostJsonAsync(typeof(ApiController));
Assert.True(rsp.IsSuccessStatusCode);
}
}

View File

@ -30,6 +30,16 @@ public class ConfigTests(WebTestApplicationFactory<Startup> factory, ITestOutput
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryConfigReq> req)
{
var rsp = await PostJsonAsync(typeof(ConfigController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -30,6 +30,16 @@ public class DeptTests(WebTestApplicationFactory<Startup> factory, ITestOutputHe
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryDeptReq> req)
{
var rsp = await PostJsonAsync(typeof(DeptController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -31,6 +31,17 @@ public class DicTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(
QueryReq<QueryDicContentReq> req)
{
var rsp = await PostJsonAsync(typeof(DicController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -31,6 +31,17 @@ public class DocTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> ContentCountByAsync(
QueryReq<QueryDocContentReq> req)
{
var rsp = await PostJsonAsync(typeof(DocController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -32,6 +32,16 @@ public class JobTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryJobReq> req)
{
var rsp = await PostJsonAsync(typeof(JobController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
@ -181,6 +191,16 @@ public class JobTests(WebTestApplicationFactory<Startup> factory, ITestOutputHel
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> RecordCountByAsync(QueryReq<QueryJobRecordReq> req)
{
var rsp = await PostJsonAsync(typeof(JobController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -30,6 +30,16 @@ public class LoginLogTests(WebTestApplicationFactory<Startup> factory, ITestOutp
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryLoginLogReq> req)
{
var rsp = await PostJsonAsync(typeof(LoginLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -30,6 +30,16 @@ public class MenuTests(WebTestApplicationFactory<Startup> factory, ITestOutputHe
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryMenuReq> req)
{
var rsp = await PostJsonAsync(typeof(MenuTests), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -31,6 +31,16 @@ public class RequestLogTests(WebTestApplicationFactory<Startup> factory, ITestOu
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRequestLogReq> req)
{
var rsp = await PostJsonAsync(typeof(RequestLogController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -30,6 +30,16 @@ public class RoleTests(WebTestApplicationFactory<Startup> factory, ITestOutputHe
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryRoleReq> req)
{
var rsp = await PostJsonAsync(typeof(RoleController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -31,6 +31,16 @@ public class SiteMsgTests(WebTestApplicationFactory<Startup> factory, ITestOutpu
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QuerySiteMsgReq> req)
{
var rsp = await PostJsonAsync(typeof(SiteMsgController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -57,6 +57,17 @@ public class UserTests(WebTestApplicationFactory<Startup> factory, ITestOutputHe
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
[TestPriority(100400)]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryUserReq> req)
{
var rsp = await PostJsonAsync(typeof(UserController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -30,6 +30,16 @@ public class VerifyCodeTests(WebTestApplicationFactory<Startup> factory, ITestOu
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryVerifyCodeReq> req)
{
var rsp = await PostJsonAsync(typeof(VerifyCodeController), req);
Assert.True(rsp.IsSuccessStatusCode);
return default;
}
/// <inheritdoc />
[InlineData(default)]
[Theory]

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 平面查询接口
*/
plainQuery: {
url: `${config.API_URL}/api/sys/api/plain.query`,
name: `平面查询接口`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 查询接口
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 配置分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/config/count.by`,
name: `配置分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建配置
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 部门分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/dept/count.by`,
name: `部门分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建部门
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 字典内容分组计数
*/
contentCountBy: {
url: `${config.API_URL}/api/sys/dic/content.count.by`,
name: `字典内容分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建字典目录
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 文档内容分组计数
*/
contentCountBy: {
url: `${config.API_URL}/api/sys/doc/content.count.by`,
name: `文档内容分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建文档分类
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 计划作业分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/job/count.by`,
name: `计划作业分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 作业记录计数
*/
@ -192,6 +203,17 @@ export default {
},
},
/**
* 作业记录分组计数
*/
recordCountBy: {
url: `${config.API_URL}/api/sys/job/record.count.by`,
name: `作业记录分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 启用/禁用作业
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 登录日志分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/login.log/count.by`,
name: `登录日志分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建登录日志
*/

View File

@ -16,6 +16,17 @@ export default {
},
},
/**
* 请求日志分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/request.log/count.by`,
name: `请求日志分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 导出请求日志
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 角色分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/role/count.by`,
name: `角色分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建角色
*/

View File

@ -27,6 +27,17 @@ export default {
},
},
/**
* 站内信分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/site.msg/count.by`,
name: `站内信分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建站内信
*/

View File

@ -38,6 +38,17 @@ export default {
},
},
/**
* 用户分组计数
*/
countBy: {
url: `${config.API_URL}/api/sys/user/count.by`,
name: `用户分组计数`,
post: async function (data = {}, config = {}) {
return await http.post(this.url, data, config)
},
},
/**
* 创建用户
*/

Some files were not shown because too many files have changed in this diff Show More