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

    <sql id="Base_Column_List">
            id as id,
            d_time as dTime,
            phase as phase,
            h2 as h2,
            ch4 as ch4,
            c2h6 as c2h6,
            c2h4 as c2h4,
            c2h2 as c2h2,
            co as co,
            co2 as co2,
            o2 as o2,
            n2 as n2,
            h2o as h2o,
            total_hydrocarbon as totalHydrocarbon,
            site_id as siteId,
            equipment_id as equipmentId,
            sub_equipment_id as subEquipmentId,
            main_equipment_id as mainEquipmentId,
            main_tree_id as mainTreeId,
            sub_tree_id as subTreeId,
            sensor_code as sensorCode
    </sql>
    <select id="getTransformerEpaAbsIncreaseCache" resultType="com.huatek.busi.entity.TransformerEpaAbsIncreaseCache">
    	SELECT
		  <include refid="Base_Column_List"></include>
		FROM transformer_epa_abs_increase_cache t
		WHERE t.site_id = #{siteId}
		AND t.main_equipment_id = #{mainEquipmentId}
		AND t.sub_equipment_id = #{subEquipmentId}
		LIMIT 1
    </select>
</mapper>