Files
HTCloud/HT.Cloud.Web/Areas/SystemSecurity/Controllers/LogController.cs
2023-03-03 16:07:50 +08:00

51 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*******************************************************************************
* Copyright © 2020 HT.Cloud.Framework 版权所有
* Author: HT.Cloud
* Description: WaterCloud快速开发平台
* Website
*********************************************************************************/
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using HT.Cloud.Code;
namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
{
[Area("SystemSecurity")]
public class LogController : BaseController
{
[HttpGet]
[HandlerAuthorize]
public ActionResult RemoveLog()
{
return View();
}
[HttpGet]
[HandlerAjaxOnly]
public async Task<ActionResult> GetGridJson(Pagination pagination, string keyword, int timetype = 2)
{
if (string.IsNullOrEmpty(pagination.field))
{
pagination.order = "desc";
pagination.field = "F_CreatorTime";
}
//导出全部页使用
if (pagination.rows == 0 && pagination.page == 0)
{
pagination.rows = 99999999;
pagination.page = 1;
}
var data = await _logService.GetList(pagination, timetype, keyword);
return Success(pagination.records, data);
}
[HttpPost]
[HandlerAjaxOnly]
public async Task<ActionResult> SubmitRemoveLog(string keepTime)
{
await _logService.RemoveLog(keepTime);
return Success("清空成功。");
}
}
}