添加日志记录

This commit is contained in:
韩鹏辉
2023-09-11 16:41:53 +08:00
parent 8726b8cfc3
commit 95952a234a

View File

@@ -0,0 +1,158 @@
<?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.chaozhanggui.dao.system.dao.TbPlussAdminRecodeMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussAdminRecode">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="operation_code" jdbcType="VARCHAR" property="operationCode" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussAdminRecodeWithBLOBs">
<result column="req_body" jdbcType="LONGVARCHAR" property="reqBody" />
<result column="response_body" jdbcType="LONGVARCHAR" property="responseBody" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, operation_code, ip, remark, create_time, update_time
</sql>
<sql id="Blob_Column_List">
req_body, response_body
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_pluss_admin_recode
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_admin_recode
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAdminRecodeWithBLOBs">
insert into tb_pluss_admin_recode (id, user_id, operation_code,
ip, remark, create_time,
update_time, req_body, response_body
)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{operationCode,jdbcType=VARCHAR},
#{ip,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{reqBody,jdbcType=LONGVARCHAR}, #{responseBody,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAdminRecodeWithBLOBs">
insert into tb_pluss_admin_recode
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="operationCode != null">
operation_code,
</if>
<if test="ip != null">
ip,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="reqBody != null">
req_body,
</if>
<if test="responseBody != null">
response_body,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="operationCode != null">
#{operationCode,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="reqBody != null">
#{reqBody,jdbcType=LONGVARCHAR},
</if>
<if test="responseBody != null">
#{responseBody,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAdminRecodeWithBLOBs">
update tb_pluss_admin_recode
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="operationCode != null">
operation_code = #{operationCode,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="reqBody != null">
req_body = #{reqBody,jdbcType=LONGVARCHAR},
</if>
<if test="responseBody != null">
response_body = #{responseBody,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAdminRecodeWithBLOBs">
update tb_pluss_admin_recode
set user_id = #{userId,jdbcType=INTEGER},
operation_code = #{operationCode,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
req_body = #{reqBody,jdbcType=LONGVARCHAR},
response_body = #{responseBody,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAdminRecode">
update tb_pluss_admin_recode
set user_id = #{userId,jdbcType=INTEGER},
operation_code = #{operationCode,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>