添加日志的操作人和时间的完整性
This commit is contained in:
@@ -50,7 +50,12 @@ public class SysLogininfor extends BaseEntity
|
||||
/** 访问时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date loginTime;
|
||||
private String loginTime;
|
||||
|
||||
//登录时间
|
||||
public String loginTimeCipher;
|
||||
//用户名
|
||||
private String userNameCipher;
|
||||
|
||||
public Long getInfoId()
|
||||
{
|
||||
@@ -132,13 +137,29 @@ public class SysLogininfor extends BaseEntity
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Date getLoginTime()
|
||||
public String getLoginTime()
|
||||
{
|
||||
return loginTime;
|
||||
}
|
||||
|
||||
public void setLoginTime(Date loginTime)
|
||||
public void setLoginTime(String loginTime)
|
||||
{
|
||||
this.loginTime = loginTime;
|
||||
}
|
||||
|
||||
public String getLoginTimeCipher() {
|
||||
return loginTimeCipher;
|
||||
}
|
||||
|
||||
public void setLoginTimeCipher(String loginTimeCipher) {
|
||||
this.loginTimeCipher = loginTimeCipher;
|
||||
}
|
||||
|
||||
public String getUserNameCipher() {
|
||||
return userNameCipher;
|
||||
}
|
||||
|
||||
public void setUserNameCipher(String userNameCipher) {
|
||||
this.userNameCipher = userNameCipher;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,12 +81,16 @@ public class SysOperLog extends BaseEntity
|
||||
/** 操作时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date operTime;
|
||||
private String operTime;
|
||||
|
||||
/** 消耗时间 */
|
||||
@Excel(name = "消耗时间", suffix = "毫秒")
|
||||
private Long costTime;
|
||||
|
||||
//时间
|
||||
public String operTimeCipher;
|
||||
public String operNameCipher;
|
||||
|
||||
public Long getOperId()
|
||||
{
|
||||
return operId;
|
||||
@@ -247,12 +251,12 @@ public class SysOperLog extends BaseEntity
|
||||
this.errorMsg = errorMsg;
|
||||
}
|
||||
|
||||
public Date getOperTime()
|
||||
public String getOperTime()
|
||||
{
|
||||
return operTime;
|
||||
}
|
||||
|
||||
public void setOperTime(Date operTime)
|
||||
public void setOperTime(String operTime)
|
||||
{
|
||||
this.operTime = operTime;
|
||||
}
|
||||
@@ -266,4 +270,20 @@ public class SysOperLog extends BaseEntity
|
||||
{
|
||||
this.costTime = costTime;
|
||||
}
|
||||
|
||||
public String getOperTimeCipher() {
|
||||
return operTimeCipher;
|
||||
}
|
||||
|
||||
public void setOperTimeCipher(String operTimeCipher) {
|
||||
this.operTimeCipher = operTimeCipher;
|
||||
}
|
||||
|
||||
public String getOperNameCipher() {
|
||||
return operNameCipher;
|
||||
}
|
||||
|
||||
public void setOperNameCipher(String operNameCipher) {
|
||||
this.operNameCipher = operNameCipher;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
||||
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
|
||||
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time,login_time_cipher,user_name_cipher)
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg},#{loginTime},#{loginTimeCipher},#{userNameCipher})
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
|
||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time,login_time_cipher,user_name_cipher from sys_logininfor
|
||||
<where>
|
||||
<if test="ipaddr != null and ipaddr != ''">
|
||||
AND ipaddr like concat('%', #{ipaddr}, '%')
|
||||
|
||||
@@ -25,13 +25,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOperLogVo">
|
||||
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
|
||||
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time,oper_time_cipher,oper_name_cipher
|
||||
from sys_oper_log
|
||||
</sql>
|
||||
|
||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
|
||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time,oper_time_cipher,oper_name_cipher)
|
||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime},#{operTime},#{operTimeCipher},#{operNameCipher})
|
||||
</insert>
|
||||
|
||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
||||
|
||||
Reference in New Issue
Block a user