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


    <sql id = "BaseSql">
    PMSB.PMSB_ID,
    PMSB.CC_TYPE,
    PMSB.CC_DESC,
    PMSB.CAST_THICK,
    PMSB.CAST_WIDTH,
    PMSB.MSC_LINE_NO,
    PMSB.TENANT_ID,
    PMSB.creation_date,    PMSB.created_by,    PMSB.last_updated_by,    PMSB.last_update_date,    PMSB.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmMoldSpecBt">
        select
        <include refid = "BaseSql"/>
        from PM_MOLD_SPEC_BT PMSB
        <where>
            <if test="pmsbId !=null">
                and PMSB.PMSB_ID = #{pmsbId,jdbcType = INTEGER}
            </if>
            <if test="ccType !=null">
                and PMSB.CC_TYPE = #{ccType}
            </if>
            <if test="ccDesc !=null">
                and PMSB.CC_DESC = #{ccDesc}
            </if>
            <if test="castThick !=null">
                and PMSB.CAST_THICK = #{castThick}
            </if>
            <if test="castWidth !=null">
                and PMSB.CAST_WIDTH = #{castWidth}
            </if>
            <if test="mscLineNo !=null">
                and PMSB.MSC_LINE_NO = #{mscLineNo}
            </if>
            <if test="tenantId !=null">
                and PMSB.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
        </where>
    </select>
</mapper>

