<?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.gyee.frame.mapper.auto.WfnwpdataMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Wfnwpdata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="WINDPLANT_NO" jdbcType="DECIMAL" property="windplantNo" />
    <id column="NWP_TYPE" jdbcType="DECIMAL" property="nwpType" />
    <id column="FILE_TIME" jdbcType="DECIMAL" property="fileTime" />
    <id column="DATA_TIME" jdbcType="TIMESTAMP" property="dataTime" />
    <result column="WIND_SPEED" jdbcType="FLOAT" property="windSpeed" />
    <result column="TEMPERATURE" jdbcType="FLOAT" property="temperature" />
    <result column="WIND_DIR" jdbcType="FLOAT" property="windDir" />
    <result column="HUMIDITY" jdbcType="FLOAT" property="humidity" />
    <result column="AIR_PRESSURE" jdbcType="FLOAT" property="airPressure" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    WINDPLANT_NO, NWP_TYPE, FILE_TIME, DATA_TIME, WIND_SPEED, TEMPERATURE, WIND_DIR, 
    HUMIDITY, AIR_PRESSURE
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WfnwpdataExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from WF_NWP_DATA
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from WF_NWP_DATA
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from WF_NWP_DATA
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WfnwpdataExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from WF_NWP_DATA
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WF_NWP_DATA (WINDPLANT_NO, NWP_TYPE, FILE_TIME, 
      DATA_TIME, WIND_SPEED, TEMPERATURE, 
      WIND_DIR, HUMIDITY, AIR_PRESSURE
      )
    values (#{windplantNo,jdbcType=DECIMAL}, #{nwpType,jdbcType=DECIMAL}, #{fileTime,jdbcType=DECIMAL}, 
      #{dataTime,jdbcType=TIMESTAMP}, #{windSpeed,jdbcType=FLOAT}, #{temperature,jdbcType=FLOAT}, 
      #{windDir,jdbcType=FLOAT}, #{humidity,jdbcType=FLOAT}, #{airPressure,jdbcType=FLOAT}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WF_NWP_DATA
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="windplantNo != null">
        WINDPLANT_NO,
      </if>
      <if test="nwpType != null">
        NWP_TYPE,
      </if>
      <if test="fileTime != null">
        FILE_TIME,
      </if>
      <if test="dataTime != null">
        DATA_TIME,
      </if>
      <if test="windSpeed != null">
        WIND_SPEED,
      </if>
      <if test="temperature != null">
        TEMPERATURE,
      </if>
      <if test="windDir != null">
        WIND_DIR,
      </if>
      <if test="humidity != null">
        HUMIDITY,
      </if>
      <if test="airPressure != null">
        AIR_PRESSURE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="windplantNo != null">
        #{windplantNo,jdbcType=DECIMAL},
      </if>
      <if test="nwpType != null">
        #{nwpType,jdbcType=DECIMAL},
      </if>
      <if test="fileTime != null">
        #{fileTime,jdbcType=DECIMAL},
      </if>
      <if test="dataTime != null">
        #{dataTime,jdbcType=TIMESTAMP},
      </if>
      <if test="windSpeed != null">
        #{windSpeed,jdbcType=FLOAT},
      </if>
      <if test="temperature != null">
        #{temperature,jdbcType=FLOAT},
      </if>
      <if test="windDir != null">
        #{windDir,jdbcType=FLOAT},
      </if>
      <if test="humidity != null">
        #{humidity,jdbcType=FLOAT},
      </if>
      <if test="airPressure != null">
        #{airPressure,jdbcType=FLOAT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WfnwpdataExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from WF_NWP_DATA
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WF_NWP_DATA
    <set>
      <if test="record.windplantNo != null">
        WINDPLANT_NO = #{record.windplantNo,jdbcType=DECIMAL},
      </if>
      <if test="record.nwpType != null">
        NWP_TYPE = #{record.nwpType,jdbcType=DECIMAL},
      </if>
      <if test="record.fileTime != null">
        FILE_TIME = #{record.fileTime,jdbcType=DECIMAL},
      </if>
      <if test="record.dataTime != null">
        DATA_TIME = #{record.dataTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.windSpeed != null">
        WIND_SPEED = #{record.windSpeed,jdbcType=FLOAT},
      </if>
      <if test="record.temperature != null">
        TEMPERATURE = #{record.temperature,jdbcType=FLOAT},
      </if>
      <if test="record.windDir != null">
        WIND_DIR = #{record.windDir,jdbcType=FLOAT},
      </if>
      <if test="record.humidity != null">
        HUMIDITY = #{record.humidity,jdbcType=FLOAT},
      </if>
      <if test="record.airPressure != null">
        AIR_PRESSURE = #{record.airPressure,jdbcType=FLOAT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WF_NWP_DATA
    set WINDPLANT_NO = #{record.windplantNo,jdbcType=DECIMAL},
      NWP_TYPE = #{record.nwpType,jdbcType=DECIMAL},
      FILE_TIME = #{record.fileTime,jdbcType=DECIMAL},
      DATA_TIME = #{record.dataTime,jdbcType=TIMESTAMP},
      WIND_SPEED = #{record.windSpeed,jdbcType=FLOAT},
      TEMPERATURE = #{record.temperature,jdbcType=FLOAT},
      WIND_DIR = #{record.windDir,jdbcType=FLOAT},
      HUMIDITY = #{record.humidity,jdbcType=FLOAT},
      AIR_PRESSURE = #{record.airPressure,jdbcType=FLOAT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WF_NWP_DATA
    <set>
      <if test="windSpeed != null">
        WIND_SPEED = #{windSpeed,jdbcType=FLOAT},
      </if>
      <if test="temperature != null">
        TEMPERATURE = #{temperature,jdbcType=FLOAT},
      </if>
      <if test="windDir != null">
        WIND_DIR = #{windDir,jdbcType=FLOAT},
      </if>
      <if test="humidity != null">
        HUMIDITY = #{humidity,jdbcType=FLOAT},
      </if>
      <if test="airPressure != null">
        AIR_PRESSURE = #{airPressure,jdbcType=FLOAT},
      </if>
    </set>
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WF_NWP_DATA
    set WIND_SPEED = #{windSpeed,jdbcType=FLOAT},
      TEMPERATURE = #{temperature,jdbcType=FLOAT},
      WIND_DIR = #{windDir,jdbcType=FLOAT},
      HUMIDITY = #{humidity,jdbcType=FLOAT},
      AIR_PRESSURE = #{airPressure,jdbcType=FLOAT}
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </update>
</mapper>