<?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.WeatherfhMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Weatherfh">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="DECIMAL" property="id" />
    <result column="RECODEDATA" jdbcType="TIMESTAMP" property="recodedata" />
    <result column="REGION" jdbcType="VARCHAR" property="region" />
    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
    <result column="WEATHER" jdbcType="VARCHAR" property="weather" />
    <result column="TEMPERATURE" jdbcType="DECIMAL" property="temperature" />
    <result column="REALFEEL" jdbcType="DECIMAL" property="realfeel" />
    <result column="WINDDIRECTION" jdbcType="VARCHAR" property="winddirection" />
    <result column="SPEED" jdbcType="DECIMAL" property="speed" />
  </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.
    -->
    ID, RECODEDATA, REGION, WINDPOWERSTATIONID, WEATHER, TEMPERATURE, REALFEEL, WINDDIRECTION, 
    SPEED
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WeatherfhExample" 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 WEATHERFH
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from WEATHERFH
    where ID = #{id,jdbcType=DECIMAL}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from WEATHERFH
    where ID = #{id,jdbcType=DECIMAL}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WeatherfhExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from WEATHERFH
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Weatherfh">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WEATHERFH (ID, RECODEDATA, REGION, 
      WINDPOWERSTATIONID, WEATHER, TEMPERATURE, 
      REALFEEL, WINDDIRECTION, SPEED
      )
    values (#{id,jdbcType=DECIMAL}, #{recodedata,jdbcType=TIMESTAMP}, #{region,jdbcType=VARCHAR}, 
      #{windpowerstationid,jdbcType=VARCHAR}, #{weather,jdbcType=VARCHAR}, #{temperature,jdbcType=DECIMAL}, 
      #{realfeel,jdbcType=DECIMAL}, #{winddirection,jdbcType=VARCHAR}, #{speed,jdbcType=DECIMAL}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Weatherfh">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WEATHERFH
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="recodedata != null">
        RECODEDATA,
      </if>
      <if test="region != null">
        REGION,
      </if>
      <if test="windpowerstationid != null">
        WINDPOWERSTATIONID,
      </if>
      <if test="weather != null">
        WEATHER,
      </if>
      <if test="temperature != null">
        TEMPERATURE,
      </if>
      <if test="realfeel != null">
        REALFEEL,
      </if>
      <if test="winddirection != null">
        WINDDIRECTION,
      </if>
      <if test="speed != null">
        SPEED,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=DECIMAL},
      </if>
      <if test="recodedata != null">
        #{recodedata,jdbcType=TIMESTAMP},
      </if>
      <if test="region != null">
        #{region,jdbcType=VARCHAR},
      </if>
      <if test="windpowerstationid != null">
        #{windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="weather != null">
        #{weather,jdbcType=VARCHAR},
      </if>
      <if test="temperature != null">
        #{temperature,jdbcType=DECIMAL},
      </if>
      <if test="realfeel != null">
        #{realfeel,jdbcType=DECIMAL},
      </if>
      <if test="winddirection != null">
        #{winddirection,jdbcType=VARCHAR},
      </if>
      <if test="speed != null">
        #{speed,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WeatherfhExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from WEATHERFH
    <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 WEATHERFH
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=DECIMAL},
      </if>
      <if test="record.recodedata != null">
        RECODEDATA = #{record.recodedata,jdbcType=TIMESTAMP},
      </if>
      <if test="record.region != null">
        REGION = #{record.region,jdbcType=VARCHAR},
      </if>
      <if test="record.windpowerstationid != null">
        WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="record.weather != null">
        WEATHER = #{record.weather,jdbcType=VARCHAR},
      </if>
      <if test="record.temperature != null">
        TEMPERATURE = #{record.temperature,jdbcType=DECIMAL},
      </if>
      <if test="record.realfeel != null">
        REALFEEL = #{record.realfeel,jdbcType=DECIMAL},
      </if>
      <if test="record.winddirection != null">
        WINDDIRECTION = #{record.winddirection,jdbcType=VARCHAR},
      </if>
      <if test="record.speed != null">
        SPEED = #{record.speed,jdbcType=DECIMAL},
      </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 WEATHERFH
    set ID = #{record.id,jdbcType=DECIMAL},
      RECODEDATA = #{record.recodedata,jdbcType=TIMESTAMP},
      REGION = #{record.region,jdbcType=VARCHAR},
      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
      WEATHER = #{record.weather,jdbcType=VARCHAR},
      TEMPERATURE = #{record.temperature,jdbcType=DECIMAL},
      REALFEEL = #{record.realfeel,jdbcType=DECIMAL},
      WINDDIRECTION = #{record.winddirection,jdbcType=VARCHAR},
      SPEED = #{record.speed,jdbcType=DECIMAL}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Weatherfh">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WEATHERFH
    <set>
      <if test="recodedata != null">
        RECODEDATA = #{recodedata,jdbcType=TIMESTAMP},
      </if>
      <if test="region != null">
        REGION = #{region,jdbcType=VARCHAR},
      </if>
      <if test="windpowerstationid != null">
        WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="weather != null">
        WEATHER = #{weather,jdbcType=VARCHAR},
      </if>
      <if test="temperature != null">
        TEMPERATURE = #{temperature,jdbcType=DECIMAL},
      </if>
      <if test="realfeel != null">
        REALFEEL = #{realfeel,jdbcType=DECIMAL},
      </if>
      <if test="winddirection != null">
        WINDDIRECTION = #{winddirection,jdbcType=VARCHAR},
      </if>
      <if test="speed != null">
        SPEED = #{speed,jdbcType=DECIMAL},
      </if>
    </set>
    where ID = #{id,jdbcType=DECIMAL}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Weatherfh">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WEATHERFH
    set RECODEDATA = #{recodedata,jdbcType=TIMESTAMP},
      REGION = #{region,jdbcType=VARCHAR},
      WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
      WEATHER = #{weather,jdbcType=VARCHAR},
      TEMPERATURE = #{temperature,jdbcType=DECIMAL},
      REALFEEL = #{realfeel,jdbcType=DECIMAL},
      WINDDIRECTION = #{winddirection,jdbcType=VARCHAR},
      SPEED = #{speed,jdbcType=DECIMAL}
    where ID = #{id,jdbcType=DECIMAL}
  </update>
</mapper>