//
namespace SafeCampus.Web.Core;
///
/// 操作日志控制器
///
[ApiDescriptionSettings(Tag = "操作日志")]
[Route("sys/audit/[controller]")]
[SuperAdmin]
public class LogOperateController : BaseController
{
private readonly IOperateLogService _operateLogService;
public LogOperateController(IOperateLogService operateLogService)
{
_operateLogService = operateLogService;
}
///
/// 操作日志分页查询
///
///
///
[HttpGet("page")]
public async Task Page([FromQuery] OperateLogPageInput input)
{
return await _operateLogService.Page(input);
}
///
/// 操作日志周统计柱状图图
///
///
[HttpGet("columnChartData")]
public async Task BarChartData()
{
return await _operateLogService.StatisticsByDay(7);
}
///
/// 操作日志数量总览饼图
///
///
[HttpGet("pieChartData")]
public async Task PieChartData()
{
return await _operateLogService.TotalCount();
}
///
/// 清空日志
///
///
///
[HttpPost("delete")]
public async Task Delete([FromBody] OperateLogDeleteInput input)
{
await _operateLogService.Delete(input.Category);
}
///
/// 日志详情
///
///
///
[HttpGet("detail")]
public async Task Detail([FromQuery] BaseIdInput input)
{
return await _operateLogService.Detail(input);
}
}