日志分析+导出

beetlsql3-dev
Mlxa0324 2 years ago
parent f783247adb
commit 2b95b640a9

@ -57,43 +57,43 @@ public class StudentLoginLogVO extends BaseEntity {
/** /**
* *
*/ */
@ExcelProperty(value = "班级名称", index = 5) @ExcelProperty(value = "班级名称", index = 4)
private String className; private String className;
/** /**
* *
*/ */
@ExcelProperty(value = "登入时间", index = 6) @ExcelProperty(value = "登入时间", index = 5)
private String loginTime; private String loginTime;
/** /**
* *
*/ */
@ExcelProperty(value = "登出时间", index = 7) @ExcelProperty(value = "登出时间", index = 6)
private String logoutTime; private String logoutTime;
/** /**
* 线 * 线
*/ */
@ExcelProperty(value = "在线时长", index = 8) @ExcelProperty(value = "在线时长", index = 7)
private String onlineDuration; private String onlineDuration;
/** /**
* 线 * 线
*/ */
@ExcelProperty(value = "是否在线", index = 9) @ExcelProperty(value = "是否在线", index = 8)
private Boolean isOnLine; private Boolean isOnLine;
/** /**
* IP * IP
*/ */
@ExcelProperty(value = "登录IP", index = 10) @ExcelProperty(value = "登录IP", index = 9)
private String ip; private String ip;
/** /**
* IP * IP
*/ */
@ExcelProperty(value = "IP所属地", index = 11) @ExcelProperty(value = "IP所属地", index = 10)
private String ipAddress; private String ipAddress;
/** /**
* *
*/ */
@ExcelProperty(value = "登录次数", index = 12) @ExcelProperty(value = "登录次数", index = 11)
private Integer loginCount; private Integer loginCount;

@ -45,7 +45,7 @@ public class StudentUseLogVO extends BaseEntity {
private String universitiesCollegesName; private String universitiesCollegesName;
/** /**
* *
*/ */
@ExcelProperty(value = "所属省份", index = 3) @ExcelProperty(value = "所属省份", index = 3)
private String universitiesCollegesProvince; private String universitiesCollegesProvince;

@ -1554,7 +1554,6 @@ queryStudentLoginLogByCondition
tc.`name`, tc.`name`,
td.universities_colleges_name, td.universities_colleges_name,
td.universities_colleges_province, td.universities_colleges_province,
ta.ip,
td.class_name td.class_name
) z ) z
@ -1663,12 +1662,14 @@ queryStudentLogAnalysisByCondition
* 日志分析,统计报表 * 日志分析,统计报表
SELECT SELECT
@// 日期 @pageTag() {
DATE_FORMAT(ta.create_time, '%Y-%m-%d') as date_str, @// 日期
te.universities_colleges_name, DATE_FORMAT(ta.create_time, '%Y-%m-%d') as time,
te.universities_colleges_province, te.universities_colleges_name,
count( 1 ) AS login_count, te.universities_colleges_province,
count( DISTINCT ta.user_id ) AS on_line_count count( 1 ) AS login_count,
count( DISTINCT ta.user_id ) AS on_line_count
@}
FROM FROM
sys_log ta sys_log ta
LEFT JOIN student t ON ta.user_id = t.user_id LEFT JOIN student t ON ta.user_id = t.user_id

Loading…
Cancel
Save