纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

3 years ago
  1. using NFine.Application.SystemSecurity;
  2. using NFine.Code;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Mvc;
  8. namespace NFine.Web.Areas.SystemSecurity.Controllers
  9. {
  10. public class LogController : ControllerBase
  11. {
  12. private LogApp logApp = new LogApp();
  13. [HttpGet]
  14. public ActionResult RemoveLog()
  15. {
  16. return View();
  17. }
  18. [HttpGet]
  19. [HandlerAjaxOnly]
  20. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  21. {
  22. var data = new
  23. {
  24. rows = logApp.GetList(pagination, queryJson),
  25. total = pagination.total,
  26. page = pagination.page,
  27. records = pagination.records
  28. };
  29. return Content(data.ToJson());
  30. }
  31. [HttpPost]
  32. [HandlerAjaxOnly]
  33. [HandlerAuthorize]
  34. [ValidateAntiForgeryToken]
  35. public ActionResult SubmitRemoveLog(string keepTime)
  36. {
  37. logApp.RemoveLog(keepTime);
  38. return Success("清空成功。");
  39. }
  40. }
  41. }