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


    <sql id = "BaseSql">
    PSSLBT.TRA_ID,
    PSSLBT.OPERATION_TYPE,
    PSSLBT.OPERATION_USER,
    PSSLBT.OPERATION_TIME,
    PSSLBT.PSSLB_ID,
    PSSLBT.ROLL_LINE_NO,
    PSSLBT.S_PD_FIX_WIDTH_MIN,
    PSSLBT.S_PD_FIX_WIDTH_MAX,
    PSSLBT.S_PD_MOVE_WIDTH_MIN,
    PSSLBT.S_PD_MOVE_WIDTH_MAX,
    PSSLBT.TENANT_ID,
    PSSLBT.ATTRIBUTE1,
    PSSLBT.ATTRIBUTE2,
    PSSLBT.ATTRIBUTE3,
    PSSLBT.ATTRIBUTE4,
    PSSLBT.ATTRIBUTE5,
    PSSLBT.creation_date,    PSSLBT.created_by,    PSSLBT.last_updated_by,    PSSLBT.last_update_date,    PSSLBT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmSdivSpecLimitBtTra">
        select
        <include refid = "BaseSql"/>
        from PM_SDIV_SPEC_LIMIT_BT_TRA PSSLBT
        <where>
            <if test="traId !=null">
                and PSSLBT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PSSLBT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PSSLBT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PSSLBT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="psslbId !=null">
                and PSSLBT.PSSLB_ID = #{psslbId,jdbcType = INTEGER}
            </if>
            <if test="rollLineNo !=null">
                and PSSLBT.ROLL_LINE_NO = #{rollLineNo,jdbcType = VARCHAR}
            </if>
            <if test="sPdFixWidthMin !=null">
                and PSSLBT.S_PD_FIX_WIDTH_MIN = #{sPdFixWidthMin,jdbcType = INTEGER}
            </if>
            <if test="sPdFixWidthMax !=null">
                and PSSLBT.S_PD_FIX_WIDTH_MAX = #{sPdFixWidthMax,jdbcType = INTEGER}
            </if>
            <if test="sPdMoveWidthMin !=null">
                and PSSLBT.S_PD_MOVE_WIDTH_MIN = #{sPdMoveWidthMin,jdbcType = INTEGER}
            </if>
            <if test="sPdMoveWidthMax !=null">
                and PSSLBT.S_PD_MOVE_WIDTH_MAX = #{sPdMoveWidthMax,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PSSLBT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PSSLBT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PSSLBT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PSSLBT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PSSLBT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PSSLBT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

