<?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.PmSlabLenConfigMapper">


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

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmSlabLenConfig">
        select
        <include refid = "BaseSql"/>
        from PM_SLAB_LEN_CONFIG PSLC
        <where>
            <if test="id !=null">
                and PSLC.ID = #{id,jdbcType = INTEGER}
            </if>
            <if test="slabMinLen !=null">
                and PSLC.SLAB_MIN_LEN = #{slabMinLen,jdbcType = INTEGER}
            </if>
            <if test="slabMaxLen !=null">
                and PSLC.SLAB_MAX_LEN = #{slabMaxLen,jdbcType = INTEGER}
            </if>
            <if test="validFlag !=null">
                and PSLC.VALID_FLAG = #{validFlag,jdbcType = VARCHAR}
            </if>
            <if test="mscLineNo !=null">
                and PSLC.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PSLC.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PSLC.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PSLC.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PSLC.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PSLC.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PSLC.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

