feat: 框架代码同步 (#139)

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-06-09 22:46:54 +08:00
committed by GitHub
parent 366ca0d237
commit 608a1ded5c
61 changed files with 747 additions and 452 deletions

View File

@@ -91,4 +91,12 @@ public sealed class DeptController(IDeptCache cache) : ControllerBase<IDeptCache
{
return Cache.QueryAsync(req);
}
/// <summary>
/// 启用/禁用部门
/// </summary>
public Task SetEnabledAsync(SetDeptEnabledReq req)
{
return Cache.SetEnabledAsync(req);
}
}

View File

@@ -90,4 +90,12 @@ public sealed class RoleController(IRoleCache cache) : ControllerBase<IRoleCache
{
return Cache.QueryAsync(req);
}
/// <summary>
/// 启用/禁用角色
/// </summary>
public Task SetEnabledAsync(SetRoleEnabledReq req)
{
return Cache.SetEnabledAsync(req);
}
}

View File

@@ -20,8 +20,10 @@ public sealed class OperationLogger : IEventSubscriber
return;
}
// 跳过心跳请求
if (operationEvent.Data.ApiId.Equals("api/probe/health.check", StringComparison.OrdinalIgnoreCase)) {
// 跳过指定的请求
if (Array.Exists( //
GlobalStatic.LogSavingSkipApiIds
, x => x.Equals(operationEvent.Data.ApiId, StringComparison.OrdinalIgnoreCase))) {
return;
}