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


    <sql id = "BaseSql">
    PHC.ID,
    PHC.HEAT_TREAT_MODE,
    PHC.DEFAULT_DEST,
    PHC.TENANT_ID,
    PHC.ATTRIBUTE1,
    PHC.ATTRIBUTE2,
    PHC.ATTRIBUTE3,
    PHC.ATTRIBUTE4,
    PHC.ATTRIBUTE5,
    PHC.PLATE_THICK_FROM,
    PHC.PLATE_THICK_TO,
    PHC.PLATE_WID_FROM,
    PHC.PLATE_WID_TO,
    PHC.PLATE_LEN_FROM,
    PHC.PLATE_LEN_TO,
    PHC.MSC_LINE_NO,
    PHC.creation_date,    PHC.created_by,    PHC.last_updated_by,    PHC.last_update_date,    PHC.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmHotConfig">
        select
        <include refid = "BaseSql"/>
        from PM_HOT_CONFIG PHC
        <where>
            <if test="id !=null">
                and PHC.ID = #{id,jdbcType = INTEGER}
            </if>
            <if test="mscLineNo !=null">
                and PHC.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="heatTreatMode !=null">
                and PHC.HEAT_TREAT_MODE = #{heatTreatMode,jdbcType = VARCHAR}
            </if>
            <if test="defaultDest !=null">
                and PHC.DEFAULT_DEST = #{defaultDest,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PHC.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PHC.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PHC.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PHC.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PHC.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PHC.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
            <if test="plateThickFrom !=null">
                and PHC.PLATE_THICK_FROM = #{plateThickFrom,jdbcType = INTEGER}
            </if>
            <if test="plateThickTo !=null">
                and PHC.PLATE_THICK_TO = #{plateThickTo,jdbcType = INTEGER}
            </if>
            <if test="plateWidFrom !=null">
                and PHC.PLATE_WID_FROM = #{plateWidFrom,jdbcType = INTEGER}
            </if>
            <if test="plateWidTo !=null">
                and PHC.PLATE_WID_TO = #{plateWidTo,jdbcType = INTEGER}
            </if>
            <if test="plateLenFrom !=null">
                and PHC.PLATE_LEN_FROM = #{plateLenFrom,jdbcType = INTEGER}
            </if>
            <if test="plateLenTo !=null">
                and PHC.PLATE_LEN_TO = #{plateLenTo,jdbcType = INTEGER}
            </if>
        </where>
    </select>
</mapper>

