@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user