refactor: 抽象操作日志模块

This commit is contained in:
陈淳
2023-02-22 16:49:24 +08:00
parent fa4e0b3752
commit 99aa7d3361
43 changed files with 415 additions and 212 deletions

View File

@@ -10,6 +10,7 @@ using System.Threading.Tasks;
using Yi.Framework.Core.Attributes;
using Yi.Framework.Data;
using Yi.Framework.EventBus;
using Yi.Framework.OperLog;
using Yi.Framework.ThumbnailSharp;
using Yi.RBAC.Domain.Logs;
using Yi.RBAC.Domain.Shared;
@@ -20,7 +21,8 @@ namespace Yi.RBAC.Domain
typeof(YiRBACDomainSharedModule),
typeof(YiFrameworkDataModule),
typeof(YiFrameworkThumbnailSharpModule),
typeof(YiFrameworkEventBusModule)
typeof(YiFrameworkEventBusModule),
typeof(YiFrameworkOperLogModule)
)]
public class YiRBACDomainModule : IStartupModule
{
@@ -31,10 +33,7 @@ namespace Yi.RBAC.Domain
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
{
services.AddHeiCaptcha();
services.AddControllers(options => {
options.Filters.Add<GlobalOperLogAttribute>();
});
services.AddSingleton<GlobalOperLogAttribute>();
}
}
}