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


    <sql id = "BaseSql">
    PSSABT.TRA_ID,
    PSSABT.OPERATION_TYPE,
    PSSABT.OPERATION_USER,
    PSSABT.OPERATION_TIME,
    PSSABT.PSSAB_ID,
    PSSABT.MSC_LINE_NO,
    PSSABT.ST_NO,
    PSSABT.SG_SIGN,
    PSSABT.SLAB_THICK_FROM,
    PSSABT.SLAB_THICK_TO,
    PSSABT.PLATE_THICK_FROM,
    PSSABT.PLATE_THICK_TO,
    PSSABT.SLAB_ADDV,
    PSSABT.VALID_FLAG,
    PSSABT.TENANT_ID,
    PSSABT.ATTRIBUTE1,
    PSSABT.ATTRIBUTE2,
    PSSABT.ATTRIBUTE3,
    PSSABT.ATTRIBUTE4,
    PSSABT.ATTRIBUTE5,
    PSSABT.creation_date,    PSSABT.created_by,    PSSABT.last_updated_by,    PSSABT.last_update_date,    PSSABT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmSpeStAddvBtTra">
        select
        <include refid = "BaseSql"/>
        from PM_SPE_ST_ADDV_BT_TRA PSSABT
        <where>
            <if test="traId !=null">
                and PSSABT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PSSABT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PSSABT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PSSABT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="pssabId !=null">
                and PSSABT.PSSAB_ID = #{pssabId,jdbcType = INTEGER}
            </if>
            <if test="stNo !=null">
                and PSSABT.ST_NO = #{stNo,jdbcType = VARCHAR}
            </if>
            <if test="sgSign !=null">
                and PSSABT.SG_SIGN = #{sgSign,jdbcType = INTEGER}
            </if>
            <if test="slabThickFrom !=null">
                and PSSABT.SLAB_THICK_FROM = #{slabThickFrom,jdbcType = INTEGER}
            </if>
            <if test="slabThickTo !=null">
                and PSSABT.SLAB_THICK_TO = #{slabThickTo,jdbcType = INTEGER}
            </if>
            <if test="plateThickFrom !=null">
                and PSSABT.PLATE_THICK_FROM = #{plateThickFrom,jdbcType = INTEGER}
            </if>
            <if test="plateThickTo !=null">
                and PSSABT.PLATE_THICK_TO = #{plateThickTo,jdbcType = INTEGER}
            </if>
            <if test="slabAddv !=null">
                and PSSABT.SLAB_ADDV = #{slabAddv,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PSSABT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PSSABT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PSSABT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PSSABT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PSSABT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PSSABT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

