<?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.yifu.cloud.plus.v1.business.mapper.cert.TUpdateRecordMapper">
    <resultMap id="tUpdateRecordMap" type="com.yifu.cloud.plus.v1.business.entity.cert.TUpdateRecord">
        <id property="id" column="id"/>
        <result property="createUser" column="create_user"/>
        <result property="createUserName" column="create_user_name"/>
        <result property="createTime" column="create_time"/>
        <result property="domainId" column="domain_id"/>
        <result property="modul" column="modul"/>
        <result property="fullClassName" column="full_class_name"/>
        <result property="oldInfo" column="old_info"/>
        <result property="newInfo" column="new_info"/>
        <result property="differenceInfo" column="difference_info"/>
    </resultMap>
    <sql id="Base_Column_List">
             a.id,
                  a.create_user,
                  a.create_user_name,
                  a.create_time,
                  a.domain_id,
                  a.modul,
                  a.full_class_name,
                  a.old_info,
                  a.new_info,
                  a.difference_info
         </sql>
    <sql id="tUpdateRecord_where">
        <if test="tUpdateRecord != null">
            <if test="tUpdateRecord.domainId != null and tUpdateRecord.domainId.trim() != ''">
                AND a.domain_id = #{tUpdateRecord.domainId}
            </if>
            <if test="tUpdateRecord.modul != null and tUpdateRecord.modul.trim() != ''">
                AND a.modul = #{tUpdateRecord.modul}
            </if>
            <if test="tUpdateRecord.id != null and tUpdateRecord.id.trim() != ''">
                AND a.id = #{tUpdateRecord.id}
            </if>
            <if test="tUpdateRecord.createUser != null and tUpdateRecord.createUser.trim() != ''">
                AND a.create_user = #{tUpdateRecord.createUser}
            </if>
            <if test="tUpdateRecord.createUserName != null and tUpdateRecord.createUserName.trim() != ''">
                AND a.create_user_name = #{tUpdateRecord.createUserName}
            </if>
            <if test="tUpdateRecord.createTime != null">
                AND a.create_time = #{tUpdateRecord.createTime}
            </if>
            <if test="tUpdateRecord.fullClassName != null and tUpdateRecord.fullClassName.trim() != ''">
                AND a.full_class_name = #{tUpdateRecord.fullClassName}
            </if>
            <if test="tUpdateRecord.oldInfo != null and tUpdateRecord.oldInfo.trim() != ''">
                AND a.old_info = #{tUpdateRecord.oldInfo}
            </if>
            <if test="tUpdateRecord.newInfo != null and tUpdateRecord.newInfo.trim() != ''">
                AND a.new_info = #{tUpdateRecord.newInfo}
            </if>
            <if test="tUpdateRecord.differenceInfo != null and tUpdateRecord.differenceInfo.trim() != ''">
                AND a.difference_info = #{tUpdateRecord.differenceInfo}
            </if>
        </if>
    </sql>
    <!--tUpdateRecord简单分页查询-->
    <select id="getTUpdateRecordPage" resultMap="tUpdateRecordMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_update_record a
        <where>
            1=1
            <include refid="tUpdateRecord_where"/>
        </where>
    </select>
</mapper>
