feat: 完成操作日志模块+添加文件模块

This commit is contained in:
陈淳
2023-02-22 17:30:20 +08:00
parent 232cbad5bd
commit 49acf0c7c9
18 changed files with 52 additions and 22 deletions

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\framework\Yi.Framework.Core\Yi.Framework.Core.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,7 @@
namespace Yi.Framework.FileManager
{
public class YiFrameworkFileManagerModule
{
}
}

View File

@@ -14,7 +14,7 @@ using Yi.Framework.Core.Helper;
using Yi.Framework.Ddd.Repositories;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
public class GlobalOperLogAttribute : ActionFilterAttribute
{

View File

@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Ddd.Services.Abstract;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
/// <summary>
/// OperationLog服务抽象

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
public enum OperEnum
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
[AttributeUsage(AttributeTargets.Method)]
public class OperLogAttribute : Attribute

View File

@@ -6,7 +6,7 @@ using SqlSugar;
using Yi.Framework.Data.Auditing;
using Yi.Framework.Ddd.Entities;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
/// <summary>
/// 操作日志表

View File

@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Ddd.Dtos;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
public class OperationLogGetListInputVo : PagedAllResultRequestDto
{

View File

@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Ddd.Dtos;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
public class OperationLogGetListOutputDto : IEntityDto<long>
{

View File

@@ -5,7 +5,7 @@ using Yi.Framework.Core.Attributes;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
/// <summary>
/// OperationLog服务实现

View File

@@ -4,10 +4,10 @@ using StartupModules;
using Yi.Framework.Core;
using Yi.Framework.Core.Attributes;
namespace Yi.Framework.OperLog
namespace Yi.Framework.OperLogManager
{
[DependsOn(typeof(YiFrameworkCoreModule))]
public class YiFrameworkOperLogModule : IStartupModule
public class YiFrameworkOperLogManagerModule : IStartupModule
{
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
{
@@ -18,6 +18,13 @@ namespace Yi.Framework.OperLog
services.AddControllers(options => {
options.Filters.Add<GlobalOperLogAttribute>();
});
services.AddAutoApiService(opt =>
{
//NETServiceTest所在程序集添加进动态api配置
opt.CreateConventional(typeof(YiFrameworkOperLogManagerModule).Assembly, option => option.RootPath = string.Empty);
});
services.AddSingleton<GlobalOperLogAttribute>();
}
}

View File

@@ -10,7 +10,7 @@ using Yi.Framework.Core.Autofac;
using Yi.RBAC.Application;
using Yi.Framework.AspNetCore;
using Yi.Framework.Data.Json;
using Yi.Framework.OperLog;
using Yi.Framework.OperLogManager;
namespace Yi.BBS.Web
{
@@ -32,8 +32,6 @@ namespace Yi.BBS.Web
{
//NETServiceTest所在程序集添加进动态api配置
opt.CreateConventional(typeof(YiBBSApplicationModule).Assembly, option => option.RootPath = string.Empty);
opt.CreateConventional(typeof(YiRBACApplicationModule).Assembly, option => option.RootPath = string.Empty);
opt.CreateConventional(typeof(YiFrameworkOperLogModule).Assembly, option => option.RootPath = string.Empty);
});
//添加swagger

View File

@@ -10,7 +10,7 @@ using Yi.Framework.Core.Autofac;
using Yi.RBAC.Application;
using Yi.Framework.AspNetCore;
using Yi.Framework.Data.Json;
using Yi.Framework.OperLog;
using Yi.Framework.OperLogManager;
namespace Yi.BBS.Web
{
@@ -32,8 +32,6 @@ namespace Yi.BBS.Web
{
//NETServiceTest所在程序集添加进动态api配置
opt.CreateConventional(typeof(YiBBSApplicationModule).Assembly, option => option.RootPath = string.Empty);
opt.CreateConventional(typeof(YiRBACApplicationModule).Assembly, option => option.RootPath = string.Empty);
opt.CreateConventional(typeof(YiFrameworkOperLogModule).Assembly, option => option.RootPath = string.Empty);
});
//添加swagger

View File

@@ -17,7 +17,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.EventBus\Yi.Framework.EventBus.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.OperLog\Yi.Framework.OperLog.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.OperLogManager\Yi.Framework.OperLogManager.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.ThumbnailSharp\Yi.Framework.ThumbnailSharp.csproj" />
<ProjectReference Include="..\Yi.RBAC.Domain.Shared\Yi.RBAC.Domain.Shared.csproj" />
</ItemGroup>

View File

@@ -10,7 +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.OperLogManager;
using Yi.Framework.ThumbnailSharp;
using Yi.RBAC.Domain.Logs;
using Yi.RBAC.Domain.Shared;
@@ -22,7 +22,7 @@ namespace Yi.RBAC.Domain
typeof(YiFrameworkDataModule),
typeof(YiFrameworkThumbnailSharpModule),
typeof(YiFrameworkEventBusModule),
typeof(YiFrameworkOperLogModule)
typeof(YiFrameworkOperLogManagerModule)
)]
public class YiRBACDomainModule : IStartupModule
{

View File

@@ -7,7 +7,7 @@ using Yi.Framework.Core;
using Yi.Framework.Core.Attributes;
using Yi.Framework.Core.Autofac;
using Yi.Framework.Data.Json;
using Yi.Framework.OperLog;
using Yi.Framework.OperLogManager;
using Yi.RBAC.Application;
using Yi.RBAC.Sqlsugar;
@@ -33,7 +33,7 @@ namespace Yi.RBAC.Web
{
//NETServiceTest所在程序集添加进动态api配置
opt.CreateConventional(typeof(YiRBACApplicationModule).Assembly, option => option.RootPath = string.Empty);
opt.CreateConventional(typeof(YiFrameworkOperLogModule).Assembly, option => option.RootPath = string.Empty);
});
//添加swagger