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


    <sql id = "BaseSql">
    PABTBT.TRA_ID,
    PABTBT.OPERATION_TYPE,
    PABTBT.OPERATION_USER,
    PABTBT.OPERATION_TIME,
    PABTBT.PABTB_ID,
    PABTBT.ROLL_LINE_NO,
    PABTBT.WITH_SIDE_FLAG,
    PABTBT.WIDTH_ADDV,
    PABTBT.TENANT_ID,
    PABTBT.ATTRIBUTE1,
    PABTBT.ATTRIBUTE2,
    PABTBT.ATTRIBUTE3,
    PABTBT.ATTRIBUTE4,
    PABTBT.ATTRIBUTE5,
    PABTBT.VALID_FLAG,
    PABTBT.creation_date,    PABTBT.created_by,    PABTBT.last_updated_by,    PABTBT.last_update_date,    PABTBT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmAxisBrdTrimBtTra">
        select
        <include refid = "BaseSql"/>
        from PM_AXIS_BRD_TRIM_BT_TRA PABTBT
        <where>
            <if test="traId !=null">
                and PABTBT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PABTBT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PABTBT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PABTBT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="pabtbId !=null">
                and PABTBT.PABTB_ID = #{pabtbId,jdbcType = INTEGER}
            </if>
            <if test="rollLineNo !=null">
                and PABTBT.ROLL_LINE_NO = #{rollLineNo,jdbcType = VARCHAR}
            </if>
            <if test="withSideFlag !=null">
                and PABTBT.WITH_SIDE_FLAG = #{withSideFlag,jdbcType = VARCHAR}
            </if>
            <if test="widthAddv !=null">
                and PABTBT.WIDTH_ADDV = #{widthAddv,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PABTBT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PABTBT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PABTBT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PABTBT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PABTBT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PABTBT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
            <if test="validFlag !=null">
                and PABTBT.VALID_FLAG = #{validFlag,jdbcType = INTEGER}
            </if>
        </where>
    </select>
</mapper>

