日志记录v1.0
parent
e0b8a57c0d
commit
3587eddc75
@ -0,0 +1,32 @@
|
|||||||
|
package com.engine.organization.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/4/28
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public enum DeleteTypeEnum {
|
||||||
|
|
||||||
|
NOT_DELETED(0, "未删除"),
|
||||||
|
|
||||||
|
DELETED(1, "已删除");
|
||||||
|
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
DeleteTypeEnum(Integer value, String desc) {
|
||||||
|
this.value = value;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.engine.organization.mapper.SISLog;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.LoggerContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/4/28
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface SISLogMapper {
|
||||||
|
|
||||||
|
void insert(LoggerContext loggerContext);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.engine.organization.mapper.SISLog.SISLogMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.LoggerContext">
|
||||||
|
<!--<result column="id" property="id"/>-->
|
||||||
|
<!--<result column="operate_desc" property="operateDesc"/>-->
|
||||||
|
<!--<result column="operator_id" property="operatorId"/>-->
|
||||||
|
<!--<result column="operator_name" property="operatorName"/>-->
|
||||||
|
<!--<result column="create_time" property="createTime"/>-->
|
||||||
|
<!--<result column="operate_type" property="operateType"/>-->
|
||||||
|
<!--<result column="params_str" property="paramsStr"/>-->
|
||||||
|
<!--<result column="client_ip" property="clientIp"/>-->
|
||||||
|
<!--<result column="method_name" property="methodName"/>-->
|
||||||
|
<!--<result column="class_name" property="className"/>-->
|
||||||
|
<!--<result column="delete_type" property="deleteType"/>-->
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 表字段 -->
|
||||||
|
<sql id="baseColumns">
|
||||||
|
t.id
|
||||||
|
, t.operate_desc
|
||||||
|
, t.operator_id
|
||||||
|
, t.operator_name
|
||||||
|
, t.create_time
|
||||||
|
, t.operate_type
|
||||||
|
, t.params_str
|
||||||
|
, t.client_ip
|
||||||
|
, t.method_name
|
||||||
|
, t.class_name
|
||||||
|
, t.delete_type
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 插入全部字段 -->
|
||||||
|
<insert id="insert" parameterType="com.engine.organization.entity.LoggerContext"
|
||||||
|
keyProperty="id" keyColumn="id" useGeneratedKeys="true"
|
||||||
|
>
|
||||||
|
INSERT INTO hr_log
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
operate_desc,
|
||||||
|
operator_id,
|
||||||
|
operator_name,
|
||||||
|
create_time,
|
||||||
|
operate_type,
|
||||||
|
params_str,
|
||||||
|
client_ip,
|
||||||
|
method_name,
|
||||||
|
class_name,
|
||||||
|
delete_type
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
#{operateDesc},
|
||||||
|
#{operatorId},
|
||||||
|
#{operatorName},
|
||||||
|
#{createTime},
|
||||||
|
#{operateType},
|
||||||
|
#{paramsStr},
|
||||||
|
#{clientIp},
|
||||||
|
#{methodName},
|
||||||
|
#{className},
|
||||||
|
#{deleteType}
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue