using Hh.Mes.Common.Request; using Hh.Mes.POJO.Entity; using Hh.Mes.Service; using Hh.Mes.Service.Logs; using Hh.Mes.Service.SystemAuth; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using WebMvc.Aop; namespace WebMvc.Areas.log.Controllers { /// <summary> /// 日志 /// </summary> [Area("log")] public class LogsController : BaseController { private readonly LogService logService; public LogsController(IAuth authUtil, LogService logService) : base(authUtil) { this.logService = logService; this.logService.sysWebUser = authUtil.GetCurrentUser().User; } #region 接口 public ActionResult InterIndex() { return View(); } [HttpPost] public string LoadSysInterLog(PageReq pageRequest, sys_interface_log entity) { return Serialize(logService.LoadSysInterLog(pageRequest, entity)); } #endregion #region 操作 public ActionResult SysOperLogIndex() { return View(); } [HttpPost] public string LoadSysOperLog(PageReq pageRequest, sys_oper_log entity) { return Serialize(logService.LoadSysOperLog(pageRequest, entity)); } #endregion #region 定时器 public ActionResult SysJobLogIndex() { return View(); } [HttpPost] public string LoadJobLog(PageReq pageRequest, sys_job_log entity) { return Serialize(logService.LoadSysJobLog(pageRequest, entity)); } #endregion #region 在线用户 public ActionResult SysUserOnlineLogIndex() { return View(); } [HttpPost] public string LoadSysJobLog(PageReq pageRequest, sys_user_online entity) { return Serialize(logService.LoadSysUserOnlineLog(pageRequest, entity)); } #region 自定义方法 /// <summary> /// 强退用户 /// </summary> /// <param name="entity">数据实体</param> /// <returns></returns> [HttpPost] [ServiceFilter(typeof(OperLogFilter))] public string Logout(List<sys_user_online> entity) { return Serialize(logService.Logout(entity)); } #endregion #endregion #region 登入 public ActionResult SysLoginLogIndex() { return View(); } [HttpPost] public string LoadSysLoginLog(PageReq pageRequest, sys_login_log entity) { return Serialize(logService.LoadSysLoginLog(pageRequest, entity)); } #endregion } }