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


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

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmAxisBrdTrimBt">
        select
        <include refid = "BaseSql"/>
        from PM_AXIS_BRD_TRIM_BT PABTB
        <where>
            <if test="pabtbId !=null">
                and PABTB.PABTB_ID = #{pabtbId,jdbcType = INTEGER}
            </if>
            <if test="rollLineNo !=null">
                and PABTB.ROLL_LINE_NO = #{rollLineNo,jdbcType = VARCHAR}
            </if>
            <if test="withSideFlag !=null">
                and PABTB.WITH_SIDE_FLAG = #{withSideFlag,jdbcType = VARCHAR}
            </if>
            <if test="widthAddv !=null">
                and PABTB.WIDTH_ADDV = #{widthAddv,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PABTB.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PABTB.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PABTB.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PABTB.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PABTB.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PABTB.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
            <if test="validFlag !=null">
                and PABTB.VALID_FLAG = #{validFlag,jdbcType = INTEGER}
            </if>
        </where>
    </select>
</mapper>

