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


    <sql id = "BaseSql">
    PHTFB.PHTFB_ID,
    PHTFB.HEAT_TREAT_FURNACE_NO,
    PHTFB.HEAT_TREAT_LEN_FROM,
    PHTFB.HEAT_TREAT_LEN_TO,
    PHTFB.HEAT_TREAT_WIDTH_FROM,
    PHTFB.HEAT_TREAT_WIDTH_TO,
    PHTFB.HEAT_TREAT_WT,
    PHTFB.TENANT_ID,
    PHTFB.ATTRIBUTE1,
    PHTFB.ATTRIBUTE2,
    PHTFB.ATTRIBUTE3,
    PHTFB.ATTRIBUTE4,
    PHTFB.ATTRIBUTE5,
    PHTFB.creation_date,    PHTFB.created_by,    PHTFB.last_updated_by,    PHTFB.last_update_date,    PHTFB.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmHeatTreatFurnaceBt">
        select
        <include refid = "BaseSql"/>
        from PM_HEAT_TREAT_FURNACE_BT PHTFB
        <where>
            <if test="phtfbId !=null">
                and PHTFB.PHTFB_ID = #{phtfbId,jdbcType = INTEGER}
            </if>
            <if test="heatTreatFurnaceNo !=null">
                and PHTFB.HEAT_TREAT_FURNACE_NO = #{heatTreatFurnaceNo,jdbcType = VARCHAR}
            </if>
            <if test="heatTreatLenFrom !=null">
                and PHTFB.HEAT_TREAT_LEN_FROM = #{heatTreatLenFrom,jdbcType = INTEGER}
            </if>
            <if test="heatTreatLenTo !=null">
                and PHTFB.HEAT_TREAT_LEN_TO = #{heatTreatLenTo,jdbcType = INTEGER}
            </if>
            <if test="heatTreatWidthFrom !=null">
                and PHTFB.HEAT_TREAT_WIDTH_FROM = #{heatTreatWidthFrom,jdbcType = INTEGER}
            </if>
            <if test="heatTreatWidthTo !=null">
                and PHTFB.HEAT_TREAT_WIDTH_TO = #{heatTreatWidthTo,jdbcType = INTEGER}
            </if>
            <if test="heatTreatWt !=null">
                and PHTFB.HEAT_TREAT_WT = #{heatTreatWt,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PHTFB.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PHTFB.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PHTFB.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PHTFB.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PHTFB.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PHTFB.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

