@@ -1,18 +0,0 @@
|
|||||||
using YhCore.Entity;
|
|
||||||
using YhCore.Model.Vo;
|
|
||||||
using YhCore.Service.Interfaces;
|
|
||||||
|
|
||||||
namespace YhCore.Service.Impl
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 日志查询服务占位实现(框架期保证接口可运行)。
|
|
||||||
/// TODO:接入 Repository 层后实现真实查询(按 schId + systemScope 过滤、keyword 模糊匹配、分页)。
|
|
||||||
/// </summary>
|
|
||||||
public class LogServiceStub : ILogService
|
|
||||||
{
|
|
||||||
public PageVO<SysOperationLog> Search(int schId, string keyword, bool systemScope, int page, int size)
|
|
||||||
{
|
|
||||||
return PageVO<SysOperationLog>.Empty(page, size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
using YhCore.Entity;
|
using YhCore.Entity;
|
||||||
using YhCore.Model.Vo;
|
using YhCore.Model.Vo;
|
||||||
|
|
||||||
@@ -9,13 +10,13 @@ namespace YhCore.Service.Interfaces
|
|||||||
public interface ILogService
|
public interface ILogService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分页搜索系统审计日志。
|
/// 分页搜索系统审计日志(sys_operation_log,按 CreateTime 倒序)。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="schId">学校 ID</param>
|
/// <param name="schId">学校 ID(多校隔离)</param>
|
||||||
/// <param name="keyword">关键字(可为空)</param>
|
/// <param name="keyword">关键字(可为空;模糊匹配用户名/URI/类方法/参数/异常/操作类型)</param>
|
||||||
/// <param name="systemScope">true=系统操作日志(systemSearch);false=普通操作日志(search)</param>
|
/// <param name="systemScope">true=系统操作日志(systemSearch,全量);false=普通操作日志(search,排除查询类)</param>
|
||||||
/// <param name="page">页码,从 0 开始</param>
|
/// <param name="page">页码,从 0 开始</param>
|
||||||
/// <param name="size">每页大小</param>
|
/// <param name="size">每页大小</param>
|
||||||
PageVO<SysOperationLog> Search(int schId, string keyword, bool systemScope, int page, int size);
|
Task<PageVO<SysOperationLog>> SearchAsync(int schId, string keyword, bool systemScope, int page, int size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,11 @@ namespace YhCore.WebApi
|
|||||||
// 数据层:默认 SQL Server 主库,DatabaseProvider=MySql 可切换
|
// 数据层:默认 SQL Server 主库,DatabaseProvider=MySql 可切换
|
||||||
services.AddDataLayer(Configuration);
|
services.AddDataLayer(Configuration);
|
||||||
|
|
||||||
|
// 健康探针:/health(免认证,路径不在 SSO 保护段内),数据库/Redis 各 2 秒超时
|
||||||
|
services.AddHealthChecks()
|
||||||
|
.AddCheck<HealthChecks.DbContextHealthCheck>("database", timeout: TimeSpan.FromSeconds(2))
|
||||||
|
.AddCheck<HealthChecks.RedisHealthCheck>("redis", timeout: TimeSpan.FromSeconds(2));
|
||||||
|
|
||||||
// 仓储与 Dapper 通道(对应 Java Repository 自动装配)
|
// 仓储与 Dapper 通道(对应 Java Repository 自动装配)
|
||||||
services.AddRepositories();
|
services.AddRepositories();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user