2024-07-24 14:53:01 +08:00
|
|
|
<?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.ruoyi.system.mapper.SysChangeRecordMapper">
|
|
|
|
<insert id="insertChangeRecord" parameterType="SysChangeRecord">
|
|
|
|
insert into sys_change_record
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="changeTime != null">changeTime,</if>
|
|
|
|
<if test="createName != null and createName != ''">createName,</if>
|
|
|
|
<if test="changeField != null and changeField != ''">changeField,</if>
|
|
|
|
<if test="beforeChange != null and beforeChange != ''">beforeChange,</if>
|
|
|
|
<if test="afterChange != null and afterChange != ''">afterChange,</if>
|
|
|
|
<if test="typeId != null and typeId != ''">typeId,</if>
|
|
|
|
<if test="codeName != null and codeName != ''">codeName,</if>
|
2024-07-26 17:11:36 +08:00
|
|
|
<if test="title != null and title != ''">title,</if>
|
2024-07-24 14:53:01 +08:00
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="changeTime != null">#{changeTime},</if>
|
|
|
|
<if test="createName != null and createName != ''">#{createName},</if>
|
|
|
|
<if test="changeField != null and changeField != ''">#{changeField},</if>
|
|
|
|
<if test="beforeChange != null and beforeChange != ''">#{beforeChange},</if>
|
|
|
|
<if test="afterChange != null and afterChange != ''">#{afterChange},</if>
|
|
|
|
<if test="typeId != null and typeId != ''">#{typeId},</if>
|
|
|
|
<if test="codeName != null and codeName != ''">#{codeName},</if>
|
2024-07-26 17:11:36 +08:00
|
|
|
<if test="title != null and title != ''">#{title},</if>
|
2024-07-24 14:53:01 +08:00
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<select id="recordsList" resultType="SysChangeRecord" parameterType="SysChangeRecord">
|
|
|
|
select a.changeTime,b.nick_name createName,a.changeField,
|
2024-07-26 17:11:36 +08:00
|
|
|
a.beforeChange,a.afterChange,a.typeId,a.codeName,a.title
|
2024-07-24 14:53:01 +08:00
|
|
|
from sys_change_record a
|
|
|
|
left join sys_user b on a.createName = b.user_name
|
|
|
|
where a.typeId = #{typeId}
|
|
|
|
</select>
|
|
|
|
</mapper>
|