LogsController.cs
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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
}
}