<?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.WeatherfdMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Weatherfd">
    <result column="id" jdbcType="VARCHAR" 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="maximumtem" jdbcType="DOUBLE" property="maximumtem" />
    <result column="minimumtem" jdbcType="DOUBLE" property="minimumtem" />
    <result column="sunrise" jdbcType="VARCHAR" property="sunrise" />
    <result column="sunset" jdbcType="VARCHAR" property="sunset" />
    <result column="sunduration" jdbcType="DOUBLE" property="sunduration" />
    <result column="weather1" jdbcType="VARCHAR" property="weather1" />
    <result column="temperature1" jdbcType="DOUBLE" property="temperature1" />
    <result column="realfeel1" jdbcType="DOUBLE" property="realfeel1" />
    <result column="precipitation1" jdbcType="DOUBLE" property="precipitation1" />
    <result column="winddirection1" jdbcType="VARCHAR" property="winddirection1" />
    <result column="speed1" jdbcType="DOUBLE" property="speed1" />
    <result column="gust1" jdbcType="DOUBLE" property="gust1" />
    <result column="weather2" jdbcType="VARCHAR" property="weather2" />
    <result column="temperature2" jdbcType="DOUBLE" property="temperature2" />
    <result column="realfeel2" jdbcType="DOUBLE" property="realfeel2" />
    <result column="precipitation2" jdbcType="DOUBLE" property="precipitation2" />
    <result column="winddirection2" jdbcType="VARCHAR" property="winddirection2" />
    <result column="speed2" jdbcType="DOUBLE" property="speed2" />
    <result column="gust2" jdbcType="DOUBLE" property="gust2" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <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">
    <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">
	  	  	      	id,
       	  	      	recodedata,
       	  	      	region,
       	  	      	windpowerstationid,
       	  	      	weather,
       	  	      	maximumtem,
       	  	      	minimumtem,
       	  	      	sunrise,
       	  	      	sunset,
       	  	      	sunduration,
       	  	      	weather1,
       	  	      	temperature1,
       	  	      	realfeel1,
       	  	      	precipitation1,
       	  	      	winddirection1,
       	  	      	speed1,
       	  	      	gust1,
       	  	      	weather2,
       	  	      	temperature2,
       	  	      	realfeel2,
       	  	      	precipitation2,
       	  	      	winddirection2,
       	  	      	speed2,
       	  	    	  	gust2
       	</sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WeatherfdExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from weatherfd
    <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.String" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from weatherfd
    where id = #{id,jdbcType=VARCHAR}
  </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from weatherfd
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WeatherfdExample">
    delete from weatherfd
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Weatherfd">
    insert into weatherfd (
      	  	       id,
       	  	       recodedata,
       	  	       region,
       	  	       windpowerstationid,
       	  	       weather,
       	  	       maximumtem,
       	  	       minimumtem,
       	  	       sunrise,
       	  	       sunset,
       	  	       sunduration,
       	  	       weather1,
       	  	       temperature1,
       	  	       realfeel1,
       	  	       precipitation1,
       	  	       winddirection1,
       	  	       speed1,
       	  	       gust1,
       	  	       weather2,
       	  	       temperature2,
       	  	       realfeel2,
       	  	       precipitation2,
       	  	       winddirection2,
       	  	       speed2,
       	  	    	  gust2
       	    )
    values (
	  	  	      	#{id,jdbcType=VARCHAR},
       	  	      	#{recodedata,jdbcType=TIMESTAMP},
       	  	      	#{region,jdbcType=VARCHAR},
       	  	      	#{windpowerstationid,jdbcType=VARCHAR},
       	  	      	#{weather,jdbcType=VARCHAR},
       	  	      	#{maximumtem,jdbcType=DOUBLE},
       	  	      	#{minimumtem,jdbcType=DOUBLE},
       	  	      	#{sunrise,jdbcType=VARCHAR},
       	  	      	#{sunset,jdbcType=VARCHAR},
       	  	      	#{sunduration,jdbcType=DOUBLE},
       	  	      	#{weather1,jdbcType=VARCHAR},
       	  	      	#{temperature1,jdbcType=DOUBLE},
       	  	      	#{realfeel1,jdbcType=DOUBLE},
       	  	      	#{precipitation1,jdbcType=DOUBLE},
       	  	      	#{winddirection1,jdbcType=VARCHAR},
       	  	      	#{speed1,jdbcType=DOUBLE},
       	  	      	#{gust1,jdbcType=DOUBLE},
       	  	      	#{weather2,jdbcType=VARCHAR},
       	  	      	#{temperature2,jdbcType=DOUBLE},
       	  	      	#{realfeel2,jdbcType=DOUBLE},
       	  	      	#{precipitation2,jdbcType=DOUBLE},
       	  	      	#{winddirection2,jdbcType=VARCHAR},
       	  	      	#{speed2,jdbcType=DOUBLE},
       	  	    	  #{gust2,jdbcType=DOUBLE}
       	    )
  </insert>
  
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Weatherfd">
    insert into weatherfd
    <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="maximumtem != null">
        maximumtem,
      </if>
      
         
      <if test="minimumtem != null">
        minimumtem,
      </if>
      
         
      <if test="sunrise != null">
        sunrise,
      </if>
      
         
      <if test="sunset != null">
        sunset,
      </if>
      
         
      <if test="sunduration != null">
        sunduration,
      </if>
      
         
      <if test="weather1 != null">
        weather1,
      </if>
      
         
      <if test="temperature1 != null">
        temperature1,
      </if>
      
         
      <if test="realfeel1 != null">
        realfeel1,
      </if>
      
         
      <if test="precipitation1 != null">
        precipitation1,
      </if>
      
         
      <if test="winddirection1 != null">
        winddirection1,
      </if>
      
         
      <if test="speed1 != null">
        speed1,
      </if>
      
         
      <if test="gust1 != null">
        gust1,
      </if>
      
         
      <if test="weather2 != null">
        weather2,
      </if>
      
         
      <if test="temperature2 != null">
        temperature2,
      </if>
      
         
      <if test="realfeel2 != null">
        realfeel2,
      </if>
      
         
      <if test="precipitation2 != null">
        precipitation2,
      </if>
      
         
      <if test="winddirection2 != null">
        winddirection2,
      </if>
      
         
      <if test="speed2 != null">
        speed2,
      </if>
      
         
      <if test="gust2 != null">
        gust2,
      </if>
      
         </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
          <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </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="maximumtem != null">
        #{maximumtem,jdbcType=DOUBLE},
      </if>
          <if test="minimumtem != null">
        #{minimumtem,jdbcType=DOUBLE},
      </if>
          <if test="sunrise != null">
        #{sunrise,jdbcType=VARCHAR},
      </if>
          <if test="sunset != null">
        #{sunset,jdbcType=VARCHAR},
      </if>
          <if test="sunduration != null">
        #{sunduration,jdbcType=DOUBLE},
      </if>
          <if test="weather1 != null">
        #{weather1,jdbcType=VARCHAR},
      </if>
          <if test="temperature1 != null">
        #{temperature1,jdbcType=DOUBLE},
      </if>
          <if test="realfeel1 != null">
        #{realfeel1,jdbcType=DOUBLE},
      </if>
          <if test="precipitation1 != null">
        #{precipitation1,jdbcType=DOUBLE},
      </if>
          <if test="winddirection1 != null">
        #{winddirection1,jdbcType=VARCHAR},
      </if>
          <if test="speed1 != null">
        #{speed1,jdbcType=DOUBLE},
      </if>
          <if test="gust1 != null">
        #{gust1,jdbcType=DOUBLE},
      </if>
          <if test="weather2 != null">
        #{weather2,jdbcType=VARCHAR},
      </if>
          <if test="temperature2 != null">
        #{temperature2,jdbcType=DOUBLE},
      </if>
          <if test="realfeel2 != null">
        #{realfeel2,jdbcType=DOUBLE},
      </if>
          <if test="precipitation2 != null">
        #{precipitation2,jdbcType=DOUBLE},
      </if>
          <if test="winddirection2 != null">
        #{winddirection2,jdbcType=VARCHAR},
      </if>
          <if test="speed2 != null">
        #{speed2,jdbcType=DOUBLE},
      </if>
          <if test="gust2 != null">
        #{gust2,jdbcType=DOUBLE},
      </if>
        </trim>
  </insert>
  
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WeatherfdExample" resultType="java.lang.Long">
    select count(*) from weatherfd
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  
  <update id="updateByExampleSelective" parameterType="map">
    update weatherfd
    <set>
          <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </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.maximumtem != null">
        maximumtem = #{record.maximumtem,jdbcType=DOUBLE},
      </if>
          <if test="record.minimumtem != null">
        minimumtem = #{record.minimumtem,jdbcType=DOUBLE},
      </if>
          <if test="record.sunrise != null">
        sunrise = #{record.sunrise,jdbcType=VARCHAR},
      </if>
          <if test="record.sunset != null">
        sunset = #{record.sunset,jdbcType=VARCHAR},
      </if>
          <if test="record.sunduration != null">
        sunduration = #{record.sunduration,jdbcType=DOUBLE},
      </if>
          <if test="record.weather1 != null">
        weather1 = #{record.weather1,jdbcType=VARCHAR},
      </if>
          <if test="record.temperature1 != null">
        temperature1 = #{record.temperature1,jdbcType=DOUBLE},
      </if>
          <if test="record.realfeel1 != null">
        realfeel1 = #{record.realfeel1,jdbcType=DOUBLE},
      </if>
          <if test="record.precipitation1 != null">
        precipitation1 = #{record.precipitation1,jdbcType=DOUBLE},
      </if>
          <if test="record.winddirection1 != null">
        winddirection1 = #{record.winddirection1,jdbcType=VARCHAR},
      </if>
          <if test="record.speed1 != null">
        speed1 = #{record.speed1,jdbcType=DOUBLE},
      </if>
          <if test="record.gust1 != null">
        gust1 = #{record.gust1,jdbcType=DOUBLE},
      </if>
          <if test="record.weather2 != null">
        weather2 = #{record.weather2,jdbcType=VARCHAR},
      </if>
          <if test="record.temperature2 != null">
        temperature2 = #{record.temperature2,jdbcType=DOUBLE},
      </if>
          <if test="record.realfeel2 != null">
        realfeel2 = #{record.realfeel2,jdbcType=DOUBLE},
      </if>
          <if test="record.precipitation2 != null">
        precipitation2 = #{record.precipitation2,jdbcType=DOUBLE},
      </if>
          <if test="record.winddirection2 != null">
        winddirection2 = #{record.winddirection2,jdbcType=VARCHAR},
      </if>
          <if test="record.speed2 != null">
        speed2 = #{record.speed2,jdbcType=DOUBLE},
      </if>
          <if test="record.gust2 != null">
        gust2 = #{record.gust2,jdbcType=DOUBLE},
      </if>
         
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
  <update id="updateByExample" parameterType="map">
    update weatherfd
    set
            	     	 id = #{record.id,jdbcType=VARCHAR},
    	         	     	 recodedata = #{record.recodedata,jdbcType=TIMESTAMP},
    	         	     	 region = #{record.region,jdbcType=VARCHAR},
    	         	     	 windpowerstationid = #{record.windpowerstationid,jdbcType=VARCHAR},
    	         	     	 weather = #{record.weather,jdbcType=VARCHAR},
    	         	     	 maximumtem = #{record.maximumtem,jdbcType=DOUBLE},
    	         	     	 minimumtem = #{record.minimumtem,jdbcType=DOUBLE},
    	         	     	 sunrise = #{record.sunrise,jdbcType=VARCHAR},
    	         	     	 sunset = #{record.sunset,jdbcType=VARCHAR},
    	         	     	 sunduration = #{record.sunduration,jdbcType=DOUBLE},
    	         	     	 weather1 = #{record.weather1,jdbcType=VARCHAR},
    	         	     	 temperature1 = #{record.temperature1,jdbcType=DOUBLE},
    	         	     	 realfeel1 = #{record.realfeel1,jdbcType=DOUBLE},
    	         	     	 precipitation1 = #{record.precipitation1,jdbcType=DOUBLE},
    	         	     	 winddirection1 = #{record.winddirection1,jdbcType=VARCHAR},
    	         	     	 speed1 = #{record.speed1,jdbcType=DOUBLE},
    	         	     	 gust1 = #{record.gust1,jdbcType=DOUBLE},
    	         	     	 weather2 = #{record.weather2,jdbcType=VARCHAR},
    	         	     	 temperature2 = #{record.temperature2,jdbcType=DOUBLE},
    	         	     	 realfeel2 = #{record.realfeel2,jdbcType=DOUBLE},
    	         	     	 precipitation2 = #{record.precipitation2,jdbcType=DOUBLE},
    	         	     	 winddirection2 = #{record.winddirection2,jdbcType=VARCHAR},
    	         	     	 speed2 = #{record.speed2,jdbcType=DOUBLE},
    	         	     	 gust2 = #{record.gust2,jdbcType=DOUBLE}
    	         <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
      <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Weatherfd">
    update weatherfd
    <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="maximumtem != null">
        maximumtem = #{maximumtem,jdbcType=DOUBLE},
      </if>
                      <if test="minimumtem != null">
        minimumtem = #{minimumtem,jdbcType=DOUBLE},
      </if>
                      <if test="sunrise != null">
        sunrise = #{sunrise,jdbcType=VARCHAR},
      </if>
                      <if test="sunset != null">
        sunset = #{sunset,jdbcType=VARCHAR},
      </if>
                      <if test="sunduration != null">
        sunduration = #{sunduration,jdbcType=DOUBLE},
      </if>
                      <if test="weather1 != null">
        weather1 = #{weather1,jdbcType=VARCHAR},
      </if>
                      <if test="temperature1 != null">
        temperature1 = #{temperature1,jdbcType=DOUBLE},
      </if>
                      <if test="realfeel1 != null">
        realfeel1 = #{realfeel1,jdbcType=DOUBLE},
      </if>
                      <if test="precipitation1 != null">
        precipitation1 = #{precipitation1,jdbcType=DOUBLE},
      </if>
                      <if test="winddirection1 != null">
        winddirection1 = #{winddirection1,jdbcType=VARCHAR},
      </if>
                      <if test="speed1 != null">
        speed1 = #{speed1,jdbcType=DOUBLE},
      </if>
                      <if test="gust1 != null">
        gust1 = #{gust1,jdbcType=DOUBLE},
      </if>
                      <if test="weather2 != null">
        weather2 = #{weather2,jdbcType=VARCHAR},
      </if>
                      <if test="temperature2 != null">
        temperature2 = #{temperature2,jdbcType=DOUBLE},
      </if>
                      <if test="realfeel2 != null">
        realfeel2 = #{realfeel2,jdbcType=DOUBLE},
      </if>
                      <if test="precipitation2 != null">
        precipitation2 = #{precipitation2,jdbcType=DOUBLE},
      </if>
                      <if test="winddirection2 != null">
        winddirection2 = #{winddirection2,jdbcType=VARCHAR},
      </if>
                      <if test="speed2 != null">
        speed2 = #{speed2,jdbcType=DOUBLE},
      </if>
                      <if test="gust2 != null">
        gust2 = #{gust2,jdbcType=DOUBLE},
      </if>
              </set>
    where 
            id = #{id,jdbcType=VARCHAR}
                                                                                                                                                                                                  
  </update>

      	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	

  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Weatherfd">
    update weatherfd
    set 
             	        	    	 			recodedata = #{recodedata,jdbcType=TIMESTAMP},
		     	        	    	 			region = #{region,jdbcType=VARCHAR},
		     	        	    	 			windpowerstationid = #{windpowerstationid,jdbcType=VARCHAR},
		     	        	    	 			weather = #{weather,jdbcType=VARCHAR},
		     	        	    	 			maximumtem = #{maximumtem,jdbcType=DOUBLE},
		     	        	    	 			minimumtem = #{minimumtem,jdbcType=DOUBLE},
		     	        	    	 			sunrise = #{sunrise,jdbcType=VARCHAR},
		     	        	    	 			sunset = #{sunset,jdbcType=VARCHAR},
		     	        	    	 			sunduration = #{sunduration,jdbcType=DOUBLE},
		     	        	    	 			weather1 = #{weather1,jdbcType=VARCHAR},
		     	        	    	 			temperature1 = #{temperature1,jdbcType=DOUBLE},
		     	        	    	 			realfeel1 = #{realfeel1,jdbcType=DOUBLE},
		     	        	    	 			precipitation1 = #{precipitation1,jdbcType=DOUBLE},
		     	        	    	 			winddirection1 = #{winddirection1,jdbcType=VARCHAR},
		     	        	    	 			speed1 = #{speed1,jdbcType=DOUBLE},
		     	        	    	 			gust1 = #{gust1,jdbcType=DOUBLE},
		     	        	    	 			weather2 = #{weather2,jdbcType=VARCHAR},
		     	        	    	 			temperature2 = #{temperature2,jdbcType=DOUBLE},
		     	        	    	 			realfeel2 = #{realfeel2,jdbcType=DOUBLE},
		     	        	    	 			precipitation2 = #{precipitation2,jdbcType=DOUBLE},
		     	        	    	 			winddirection2 = #{winddirection2,jdbcType=VARCHAR},
		     	        	    	 			speed2 = #{speed2,jdbcType=DOUBLE},
		     	        	    	 			gust2 = #{gust2,jdbcType=DOUBLE}
		     	        where 
            id = #{id,jdbcType=VARCHAR}
                                                                                                                                                                                                    
  </update>
  
                                                                                                                            
</mapper>