Files
AgileConfig/AgileConfig.Server.Apisite/Controllers/SysLogController.cs
T
2020-05-17 22:36:05 +08:00

33 lines
909 B
C#

using System;
using System.Threading.Tasks;
using AgileConfig.Server.Apisite.Filters;
using AgileConfig.Server.IService;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace AgileConfig.Server.Apisite.Controllers
{
[Authorize]
public class SysLogController : Controller
{
private readonly ISysLogService _sysLogService;
public SysLogController(ISysLogService sysLogService)
{
_sysLogService = sysLogService;
}
[HttpGet]
public async Task<IActionResult> Search(string appId, DateTime startTime, DateTime endTime, int pageSize, int pageIndex)
{
var pageList = await _sysLogService.SearchPage(appId, startTime, endTime, pageSize, pageIndex);
return Json(new
{
success = true,
data = pageList
});
}
}
}