feat 获取api日志

This commit is contained in:
cheche
2024-02-22 10:12:04 +08:00
parent 4c77130a18
commit 6d2d62d628
13 changed files with 220 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
using Dlhis.Basic.Device.Request;
using Dlhis.Basic.Device.Response;
using Dlhis.Basic.Device.Services;
using Dlhis.Entity.Basic.Entity;
using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -198,8 +199,18 @@ public class DevicesController : ControllerBase
/// </summary>
/// <returns></returns>
[HttpGet("recentnumbers")]
public async Task<Dictionary<string, int>> GetRecentNumbersAsync()
public async Task<List<RecentNumberResponse>> GetRecentNumbersAsync()
{
return await _deviceService.GetRecentNumbersAsync();
}
/// <summary>
/// 获取api日志
/// </summary>
/// <returns></returns>
[HttpGet("logs")]
public async Task<Pagination<ApiLogResponse>> GetLogsAsync([FromQuery]ApiLogRequest request)
{
return await _deviceService.GetLogsAsync(request);
}
}