<?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.xisc.pm.infra.mapper.PmSlabLenConfigTraMapper">


    <sql id = "BaseSql">
    PSLCT.TRA_ID,
    PSLCT.OPERATION_TYPE,
    PSLCT.OPERATION_USER,
    PSLCT.OPERATION_TIME,
    PSLCT.ID,
    PSLCT.SLAB_MIN_LEN,
    PSLCT.SLAB_MAX_LEN,
    PSLCT.VALID_FLAG,
    PSLCT.MSC_LINE_NO,
    PSLCT.TENANT_ID,
    PSLCT.ATTRIBUTE1,
    PSLCT.ATTRIBUTE2,
    PSLCT.ATTRIBUTE3,
    PSLCT.ATTRIBUTE4,
    PSLCT.ATTRIBUTE5,
    PSLCT.creation_date,    PSLCT.created_by,    PSLCT.last_updated_by,    PSLCT.last_update_date,    PSLCT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmSlabLenConfigTra">
        select
        <include refid = "BaseSql"/>
        from PM_SLAB_LEN_CONFIG_TRA PSLCT
        <where>
            <if test="traId !=null">
                and PSLCT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PSLCT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PSLCT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PSLCT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="id !=null">
                and PSLCT.ID = #{id,jdbcType = INTEGER}
            </if>
            <if test="slabMinLen !=null">
                and PSLCT.SLAB_MIN_LEN = #{slabMinLen,jdbcType = INTEGER}
            </if>
            <if test="slabMaxLen !=null">
                and PSLCT.SLAB_MAX_LEN = #{slabMaxLen,jdbcType = INTEGER}
            </if>
            <if test="validFlag !=null">
                and PSLCT.VALID_FLAG = #{validFlag,jdbcType = VARCHAR}
            </if>
            <if test="mscLineNo !=null">
                and PSLCT.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PSLCT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PSLCT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PSLCT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PSLCT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PSLCT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PSLCT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

