<?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.WindturbinecurvefittingmonthMapper">
<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
<!--  </cache>-->
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbinecurvefittingmonth">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="windturbineId" jdbcType="VARCHAR" property="windturbineid" />
    <result column="speed" jdbcType="DECIMAL" property="speed" />
    <result column="actualPower" jdbcType="DECIMAL" property="actualpower" />
    <result column="optimalPower" jdbcType="DECIMAL" property="optimalpower" />
    <result column="year" jdbcType="VARCHAR" property="year" />
    <result column="month" jdbcType="VARCHAR" property="month" />
    <result column="mainId" jdbcType="VARCHAR" property="mainid" />
  </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, windturbineId, speed, actualPower, optimalPower, year, month, mainId
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WindturbinecurvefittingmonthExample" 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 windturbinecurvefittingmonth
    <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.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from windturbinecurvefittingmonth
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from windturbinecurvefittingmonth
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WindturbinecurvefittingmonthExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from windturbinecurvefittingmonth
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Windturbinecurvefittingmonth">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into windturbinecurvefittingmonth (id, windturbineId, speed, 
      actualPower, optimalPower, year, 
      month, mainId)
    values (#{id,jdbcType=INTEGER}, #{windturbineid,jdbcType=VARCHAR}, #{speed,jdbcType=DECIMAL}, 
      #{actualpower,jdbcType=DECIMAL}, #{optimalpower,jdbcType=DECIMAL}, #{year,jdbcType=VARCHAR}, 
      #{month,jdbcType=VARCHAR}, #{mainid,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Windturbinecurvefittingmonth">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into windturbinecurvefittingmonth
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="windturbineid != null">
        windturbineId,
      </if>
      <if test="speed != null">
        speed,
      </if>
      <if test="actualpower != null">
        actualPower,
      </if>
      <if test="optimalpower != null">
        optimalPower,
      </if>
      <if test="year != null">
        year,
      </if>
      <if test="month != null">
        month,
      </if>
      <if test="mainid != null">
        mainId,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="windturbineid != null">
        #{windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="speed != null">
        #{speed,jdbcType=DECIMAL},
      </if>
      <if test="actualpower != null">
        #{actualpower,jdbcType=DECIMAL},
      </if>
      <if test="optimalpower != null">
        #{optimalpower,jdbcType=DECIMAL},
      </if>
      <if test="year != null">
        #{year,jdbcType=VARCHAR},
      </if>
      <if test="month != null">
        #{month,jdbcType=VARCHAR},
      </if>
      <if test="mainid != null">
        #{mainid,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WindturbinecurvefittingmonthExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from windturbinecurvefittingmonth
    <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 windturbinecurvefittingmonth
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.windturbineid != null">
        windturbineId = #{record.windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="record.speed != null">
        speed = #{record.speed,jdbcType=DECIMAL},
      </if>
      <if test="record.actualpower != null">
        actualPower = #{record.actualpower,jdbcType=DECIMAL},
      </if>
      <if test="record.optimalpower != null">
        optimalPower = #{record.optimalpower,jdbcType=DECIMAL},
      </if>
      <if test="record.year != null">
        year = #{record.year,jdbcType=VARCHAR},
      </if>
      <if test="record.month != null">
        month = #{record.month,jdbcType=VARCHAR},
      </if>
      <if test="record.mainid != null">
        mainId = #{record.mainid,jdbcType=VARCHAR},
      </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 windturbinecurvefittingmonth
    set id = #{record.id,jdbcType=INTEGER},
      windturbineId = #{record.windturbineid,jdbcType=VARCHAR},
      speed = #{record.speed,jdbcType=DECIMAL},
      actualPower = #{record.actualpower,jdbcType=DECIMAL},
      optimalPower = #{record.optimalpower,jdbcType=DECIMAL},
      year = #{record.year,jdbcType=VARCHAR},
      month = #{record.month,jdbcType=VARCHAR},
      mainId = #{record.mainid,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Windturbinecurvefittingmonth">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update windturbinecurvefittingmonth
    <set>
      <if test="windturbineid != null">
        windturbineId = #{windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="speed != null">
        speed = #{speed,jdbcType=DECIMAL},
      </if>
      <if test="actualpower != null">
        actualPower = #{actualpower,jdbcType=DECIMAL},
      </if>
      <if test="optimalpower != null">
        optimalPower = #{optimalpower,jdbcType=DECIMAL},
      </if>
      <if test="year != null">
        year = #{year,jdbcType=VARCHAR},
      </if>
      <if test="month != null">
        month = #{month,jdbcType=VARCHAR},
      </if>
      <if test="mainid != null">
        mainId = #{mainid,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Windturbinecurvefittingmonth">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update windturbinecurvefittingmonth
    set windturbineId = #{windturbineid,jdbcType=VARCHAR},
      speed = #{speed,jdbcType=DECIMAL},
      actualPower = #{actualpower,jdbcType=DECIMAL},
      optimalPower = #{optimalpower,jdbcType=DECIMAL},
      year = #{year,jdbcType=VARCHAR},
      month = #{month,jdbcType=VARCHAR},
      mainId = #{mainid,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>