@@ -1,3 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using YhCore.Common;
|
||||
using YhCore.Common.UserContext;
|
||||
@@ -22,30 +23,30 @@ namespace YhCore.WebApi.Controllers.Api
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 系统操作日志搜索(对应 Java GET /api/log/systemSearch)。
|
||||
/// 系统操作日志搜索(对应 Java GET /api/log/systemSearch,全量日志)。
|
||||
/// </summary>
|
||||
/// <param name="keyword">关键字(可空)</param>
|
||||
/// <param name="page">页码,从 0 开始(对应 Spring Pageable.page)</param>
|
||||
/// <param name="size">每页大小(对应 Spring Pageable.size)</param>
|
||||
[HttpGet("systemSearch")]
|
||||
public PageVO<SysOperationLog> SystemSearch(
|
||||
public Task<PageVO<SysOperationLog>> SystemSearch(
|
||||
[FromQuery] string keyword,
|
||||
[FromQuery] int page = 0,
|
||||
[FromQuery] int size = 20)
|
||||
{
|
||||
return _logService.Search(UserContextHolder.GetSchId(), keyword, true, page, size);
|
||||
return _logService.SearchAsync(UserContextHolder.GetSchId(), keyword, true, page, size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 操作日志搜索(对应 Java GET /api/log/search)。
|
||||
/// 操作日志搜索(对应 Java GET /api/log/search,排除查询类)。
|
||||
/// </summary>
|
||||
[HttpGet("search")]
|
||||
public PageVO<SysOperationLog> Search(
|
||||
public Task<PageVO<SysOperationLog>> Search(
|
||||
[FromQuery] string keyword,
|
||||
[FromQuery] int page = 0,
|
||||
[FromQuery] int size = 20)
|
||||
{
|
||||
return _logService.Search(UserContextHolder.GetSchId(), keyword, false, page, size);
|
||||
return _logService.SearchAsync(UserContextHolder.GetSchId(), keyword, false, page, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ namespace YhCore.WebApi
|
||||
// Redis 缓存(RedisUtil 单例,连接串取 Redis:ConnectionString)
|
||||
services.AddRedisCache(Configuration);
|
||||
|
||||
// 框架期占位实现;业务实现就绪后在 Extensions 中统一替换注册
|
||||
services.AddScoped<ILogService, LogServiceStub>();
|
||||
// 审计日志查询(sys_operation_log 分页搜索,LogServiceStub 已被真实实现替换)
|
||||
services.AddScoped<ILogService, LogService>();
|
||||
|
||||
// ===== DocPrint 业务服务(对应旧 BestSchool.Service / BestSchool.DocPrint) =====
|
||||
services.AddScoped<IDictionaryService, DictionaryService>();
|
||||
|
||||
Reference in New Issue
Block a user