<?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.ProjectPlanMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.ProjectPlan">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="PROJECTID" jdbcType="VARCHAR" property="projectid" />
    <result column="GENERATINGCAPACITY" jdbcType="VARCHAR" property="generatingcapacity" />
    <result column="OUTAGEHOURS" jdbcType="DECIMAL" property="outagehours" />
    <result column="YEAR" jdbcType="VARCHAR" property="year" />
    <result column="MONTH" jdbcType="VARCHAR" property="month" />
    <result column="WINDPOWER" jdbcType="VARCHAR" property="windpower" />
  </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, PROJECTID, GENERATINGCAPACITY, OUTAGEHOURS, YEAR, MONTH, WINDPOWER
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.ProjectPlanExample" 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 PROJECTPLAN
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from PROJECTPLAN
    where ID = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from PROJECTPLAN
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.ProjectPlanExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from PROJECTPLAN
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.ProjectPlan">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into PROJECTPLAN (ID, PROJECTID, GENERATINGCAPACITY, 
      OUTAGEHOURS, YEAR, MONTH, 
      WINDPOWER)
    values (#{id,jdbcType=VARCHAR}, #{projectid,jdbcType=VARCHAR}, #{generatingcapacity,jdbcType=VARCHAR}, 
      #{outagehours,jdbcType=DECIMAL}, #{year,jdbcType=VARCHAR}, #{month,jdbcType=VARCHAR}, 
      #{windpower,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.ProjectPlan">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into PROJECTPLAN
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="projectid != null">
        PROJECTID,
      </if>
      <if test="generatingcapacity != null">
        GENERATINGCAPACITY,
      </if>
      <if test="outagehours != null">
        OUTAGEHOURS,
      </if>
      <if test="year != null">
        YEAR,
      </if>
      <if test="month != null">
        MONTH,
      </if>
      <if test="windpower != null">
        WINDPOWER,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="projectid != null">
        #{projectid,jdbcType=VARCHAR},
      </if>
      <if test="generatingcapacity != null">
        #{generatingcapacity,jdbcType=VARCHAR},
      </if>
      <if test="outagehours != null">
        #{outagehours,jdbcType=DECIMAL},
      </if>
      <if test="year != null">
        #{year,jdbcType=VARCHAR},
      </if>
      <if test="month != null">
        #{month,jdbcType=VARCHAR},
      </if>
      <if test="windpower != null">
        #{windpower,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.ProjectPlanExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from PROJECTPLAN
    <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 PROJECTPLAN
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.projectid != null">
        PROJECTID = #{record.projectid,jdbcType=VARCHAR},
      </if>
      <if test="record.generatingcapacity != null">
        GENERATINGCAPACITY = #{record.generatingcapacity,jdbcType=VARCHAR},
      </if>
      <if test="record.outagehours != null">
        OUTAGEHOURS = #{record.outagehours,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.windpower != null">
        WINDPOWER = #{record.windpower,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 PROJECTPLAN
    set ID = #{record.id,jdbcType=VARCHAR},
      PROJECTID = #{record.projectid,jdbcType=VARCHAR},
      GENERATINGCAPACITY = #{record.generatingcapacity,jdbcType=VARCHAR},
      OUTAGEHOURS = #{record.outagehours,jdbcType=DECIMAL},
      YEAR = #{record.year,jdbcType=VARCHAR},
      MONTH = #{record.month,jdbcType=VARCHAR},
      WINDPOWER = #{record.windpower,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.ProjectPlan">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update PROJECTPLAN
    <set>
      <if test="projectid != null">
        PROJECTID = #{projectid,jdbcType=VARCHAR},
      </if>
      <if test="generatingcapacity != null">
        GENERATINGCAPACITY = #{generatingcapacity,jdbcType=VARCHAR},
      </if>
      <if test="outagehours != null">
        OUTAGEHOURS = #{outagehours,jdbcType=DECIMAL},
      </if>
      <if test="year != null">
        YEAR = #{year,jdbcType=VARCHAR},
      </if>
      <if test="month != null">
        MONTH = #{month,jdbcType=VARCHAR},
      </if>
      <if test="windpower != null">
        WINDPOWER = #{windpower,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.ProjectPlan">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update PROJECTPLAN
    set PROJECTID = #{projectid,jdbcType=VARCHAR},
      GENERATINGCAPACITY = #{generatingcapacity,jdbcType=VARCHAR},
      OUTAGEHOURS = #{outagehours,jdbcType=DECIMAL},
      YEAR = #{year,jdbcType=VARCHAR},
      MONTH = #{month,jdbcType=VARCHAR},
      WINDPOWER = #{windpower,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
</mapper>