using YBEE.EQM.Core;

namespace YBEE.EQM.Application
{
    /// <summary>
    /// 日志
    /// </summary>
    [ApiDescriptionSettings(Name = "sys-log")]
    [Route("sys/log")]
    public class SysLogAppService : IDynamicApiController
    {
        private readonly ISysLogService _logService;
        public SysLogAppService(ISysLogService logService)
        {
            _logService = logService;
        }

        /// <summary>
        /// 清除访问日志
        /// </summary>
        /// <returns></returns>
        public async Task ClearLogVis()
        {
            await _logService.ClearLogVis();
        }
        /// <summary>
        /// 分页查询访问日志
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [DisableOpLog]
        public async Task<PageResult<SysLogVisOutput>> QueryLogVisPageList(SysLogVisPageInput input)
        {
            return await _logService.QueryLogVisPageList(input);
        }
        /// <summary>
        /// 清除异常日志
        /// </summary>
        /// <returns></returns>
        public async Task ClearLogEx()
        {
            await _logService.ClearLogEx();
        }
        /// <summary>
        /// 分页查询异常日志
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [DisableOpLog]
        public async Task<PageResult<SysLogExOutput>> QueryLogExPageList(SysLogExPageInput input)
        {
            return await _logService.QueryLogExPageList(input);
        }
        /// <summary>
        /// 清除操作日志
        /// </summary>
        /// <returns></returns>
        public async Task ClearLogOp()
        {
            await _logService.ClearLogOp();
        }
        /// <summary>
        /// 分页查询操作日志
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [DisableOpLog]
        public async Task<PageResult<SysLogOpOutput>> QueryLogOpPageList(SysLogOpPageInput input)
        {
            return await _logService.QueryLogOpPageList(input);
        }
    }
}