<?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.huatek.busi.mapper.TransformerTotMapper">

    <sql id="Base_Column_List">
            phase as phase,
            site_id as siteId,
            oil_temperature as oilTemperature
    </sql>

    <select id="selectTransformerTotPage" parameterType="com.huatek.busi.dto.TransformerTotDto" resultType="com.huatek.busi.vo.TransformerTotVo">
        SELECT
        <include refid="Base_Column_List"/>
        FROM
        transformer_tot t
        WHERE 1=1
        <if test="phase != null and phase != ''">
             and t.phase = #{phase}
        </if>
        <if test="siteId != null and siteId != ''">
             and t.site_id = #{siteId}
        </if>
        <if test="oilTemperature != null and oilTemperature != ''">
             and t.oil_temperature = #{oilTemperature}
        </if>
    </select>

</mapper>