<?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="cn.cecep.talroad.mapper.OdsMeshingShStationHourIMapper">

    <resultMap type="cn.cecep.talroad.domain.OdsMeshingShStationHourI" id="OdsMeshingShStationHourIResult">
        <result property="id"    column="id"    />
        <result property="stationId"    column="station_id"    />
        <result property="stationCode"    column="station_code"    />
        <result property="receiveTime"    column="receive_time"    />
        <result property="so2Live"    column="so2_live"    />
        <result property="no2Live"    column="no2_live"    />
        <result property="coLive"    column="co_live"    />
        <result property="o3Live"    column="o3_live"    />
        <result property="pm10Live"    column="pm10_live"    />
        <result property="pm25Live"    column="pm25_live"    />
        <result property="temperature"    column="temperature"    />
        <result property="humidity"    column="humidity"    />
        <result property="apress"    column="apress"    />
        <result property="wdirect"    column="wdirect"    />
        <result property="wspeed"    column="wspeed"    />
        <result property="noise"    column="noise"    />
        <result property="maxId"    column="max_id"    />
        <result property="flag"    column="flag"    />
        <result property="pm10Bk"    column="pm10_bk"    />
        <result property="pm25Bk"    column="pm25_bk"    />
        <result property="so2Bk"    column="so2_bk"    />
        <result property="no2Bk"    column="no2_bk"    />
        <result property="coBk"    column="co_bk"    />
        <result property="o3Bk"    column="o3_bk"    />
        <result property="pmi"    column="pmi"    />
        <result property="pmiBk"    column="pmi_bk"    />
        <result property="tspLive"    column="tsp_live"    />
        <result property="tspBk"    column="tsp_bk"    />
        <result property="noLive"    column="no_live"    />
        <result property="tvoc"    column="tvoc"    />
        <result property="co2"    column="co2"    />
        <result property="nox"    column="nox"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>


    <sql id="selectOdsMeshingShStationHourIVo">
        select id, station_id, station_code, receive_time, so2_live, no2_live, co_live, o3_live, pm10_live, pm25_live, temperature, humidity, apress, wdirect, wspeed, noise, max_id, flag, pm10_bk, pm25_bk, so2_bk, no2_bk, co_bk, o3_bk, pmi, pmi_bk, tsp_live, tsp_bk, no_live, tvoc, co2, nox, create_time, update_time from ods_meshing_sh_station_hour_i
    </sql>

    <select id="selectOdsMeshingShStationHourIList" parameterType="cn.cecep.talroad.domain.OdsMeshingShStationHourI" resultMap="OdsMeshingShStationHourIResult">
        <include refid="selectOdsMeshingShStationHourIVo"/>
        <where>
            <if test="stationId != null  and stationId != ''"> and station_id = #{stationId}</if>
            <if test="stationCode != null  and stationCode != ''"> and station_code = #{stationCode}</if>
            <if test="receiveTime != null  and receiveTime != ''"> and receive_time = #{receiveTime}</if>
            <if test="so2Live != null  and so2Live != ''"> and so2_live = #{so2Live}</if>
            <if test="no2Live != null  and no2Live != ''"> and no2_live = #{no2Live}</if>
            <if test="coLive != null  and coLive != ''"> and co_live = #{coLive}</if>
            <if test="o3Live != null  and o3Live != ''"> and o3_live = #{o3Live}</if>
            <if test="pm10Live != null  and pm10Live != ''"> and pm10_live = #{pm10Live}</if>
            <if test="pm25Live != null  and pm25Live != ''"> and pm25_live = #{pm25Live}</if>
            <if test="temperature != null  and temperature != ''"> and temperature = #{temperature}</if>
            <if test="humidity != null  and humidity != ''"> and humidity = #{humidity}</if>
            <if test="apress != null  and apress != ''"> and apress = #{apress}</if>
            <if test="wdirect != null  and wdirect != ''"> and wdirect = #{wdirect}</if>
            <if test="wspeed != null  and wspeed != ''"> and wspeed = #{wspeed}</if>
            <if test="noise != null  and noise != ''"> and noise = #{noise}</if>
            <if test="maxId != null  and maxId != ''"> and max_id = #{maxId}</if>
            <if test="flag != null  and flag != ''"> and flag = #{flag}</if>
            <if test="pm10Bk != null  and pm10Bk != ''"> and pm10_bk = #{pm10Bk}</if>
            <if test="pm25Bk != null  and pm25Bk != ''"> and pm25_bk = #{pm25Bk}</if>
            <if test="so2Bk != null  and so2Bk != ''"> and so2_bk = #{so2Bk}</if>
            <if test="no2Bk != null  and no2Bk != ''"> and no2_bk = #{no2Bk}</if>
            <if test="coBk != null  and coBk != ''"> and co_bk = #{coBk}</if>
            <if test="o3Bk != null  and o3Bk != ''"> and o3_bk = #{o3Bk}</if>
            <if test="pmi != null  and pmi != ''"> and pmi = #{pmi}</if>
            <if test="pmiBk != null  and pmiBk != ''"> and pmi_bk = #{pmiBk}</if>
            <if test="tspLive != null  and tspLive != ''"> and tsp_live = #{tspLive}</if>
            <if test="tspBk != null  and tspBk != ''"> and tsp_bk = #{tspBk}</if>
            <if test="noLive != null  and noLive != ''"> and no_live = #{noLive}</if>
            <if test="tvoc != null  and tvoc != ''"> and tvoc = #{tvoc}</if>
            <if test="co2 != null  and co2 != ''"> and co2 = #{co2}</if>
            <if test="nox != null  and nox != ''"> and nox = #{nox}</if>
        </where>
    </select>

</mapper>
