SysLogAppService.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application
  3. {
  4. /// <summary>
  5. /// 日志
  6. /// </summary>
  7. [ApiDescriptionSettings(Name = "sys-log")]
  8. [Route("sys/log")]
  9. public class SysLogAppService : IDynamicApiController
  10. {
  11. private readonly ISysLogService _logService;
  12. public SysLogAppService(ISysLogService logService)
  13. {
  14. _logService = logService;
  15. }
  16. /// <summary>
  17. /// 清除访问日志
  18. /// </summary>
  19. /// <returns></returns>
  20. public async Task ClearLogVis()
  21. {
  22. await _logService.ClearLogVis();
  23. }
  24. /// <summary>
  25. /// 分页查询访问日志
  26. /// </summary>
  27. /// <param name="input"></param>
  28. /// <returns></returns>
  29. [DisableOpLog]
  30. public async Task<PageResult<SysLogVisOutput>> QueryLogVisPageList(SysLogVisPageInput input)
  31. {
  32. return await _logService.QueryLogVisPageList(input);
  33. }
  34. /// <summary>
  35. /// 清除异常日志
  36. /// </summary>
  37. /// <returns></returns>
  38. public async Task ClearLogEx()
  39. {
  40. await _logService.ClearLogEx();
  41. }
  42. /// <summary>
  43. /// 分页查询异常日志
  44. /// </summary>
  45. /// <param name="input"></param>
  46. /// <returns></returns>
  47. [DisableOpLog]
  48. public async Task<PageResult<SysLogExOutput>> QueryLogExPageList(SysLogExPageInput input)
  49. {
  50. return await _logService.QueryLogExPageList(input);
  51. }
  52. /// <summary>
  53. /// 清除操作日志
  54. /// </summary>
  55. /// <returns></returns>
  56. public async Task ClearLogOp()
  57. {
  58. await _logService.ClearLogOp();
  59. }
  60. /// <summary>
  61. /// 分页查询操作日志
  62. /// </summary>
  63. /// <param name="input"></param>
  64. /// <returns></returns>
  65. [DisableOpLog]
  66. public async Task<PageResult<SysLogOpOutput>> QueryLogOpPageList(SysLogOpPageInput input)
  67. {
  68. return await _logService.QueryLogOpPageList(input);
  69. }
  70. }
  71. }