<?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.ProjectMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Project">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="aname" jdbcType="VARCHAR" property="aname" />
    <result column="windPowerStationId" jdbcType="VARCHAR" property="windpowerstationid" />
    <result column="capacity" jdbcType="DOUBLE" property="capacity" />
    <result column="capacityUnit" jdbcType="VARCHAR" property="capacityunit" />
    <result column="quantity" jdbcType="INTEGER" property="quantity" />
    <result column="model" jdbcType="VARCHAR" property="model" />
    <result column="commissionDate" jdbcType="DATE" property="commissiondate" />
    <result column="masterPhone" jdbcType="VARCHAR" property="masterphone" />
    <result column="shiftForeman" jdbcType="VARCHAR" property="shiftforeman" />
    <result column="shiftForemanPhone" jdbcType="VARCHAR" property="shiftforemanphone" />
    <result column="orderNum" jdbcType="INTEGER" property="ordernum" />
  </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, code, name, aname, windPowerStationId, capacity, capacityUnit, quantity, model, 
    commissionDate, masterPhone, shiftForeman, shiftForemanPhone, orderNum
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.ProjectExample" 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 project
    <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 project
    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 project
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.ProjectExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from project
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Project">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into project (id, code, name, 
      aname, windPowerStationId, capacity, 
      capacityUnit, quantity, model, 
      commissionDate, masterPhone, shiftForeman, 
      shiftForemanPhone, orderNum)
    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
      #{aname,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR}, #{capacity,jdbcType=DOUBLE}, 
      #{capacityunit,jdbcType=VARCHAR}, #{quantity,jdbcType=INTEGER}, #{model,jdbcType=VARCHAR}, 
      #{commissiondate,jdbcType=DATE}, #{masterphone,jdbcType=VARCHAR}, #{shiftforeman,jdbcType=VARCHAR}, 
      #{shiftforemanphone,jdbcType=VARCHAR}, #{ordernum,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Project">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into project
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="code != null">
        code,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="aname != null">
        aname,
      </if>
      <if test="windpowerstationid != null">
        windPowerStationId,
      </if>
      <if test="capacity != null">
        capacity,
      </if>
      <if test="capacityunit != null">
        capacityUnit,
      </if>
      <if test="quantity != null">
        quantity,
      </if>
      <if test="model != null">
        model,
      </if>
      <if test="commissiondate != null">
        commissionDate,
      </if>
      <if test="masterphone != null">
        masterPhone,
      </if>
      <if test="shiftforeman != null">
        shiftForeman,
      </if>
      <if test="shiftforemanphone != null">
        shiftForemanPhone,
      </if>
      <if test="ordernum != null">
        orderNum,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="aname != null">
        #{aname,jdbcType=VARCHAR},
      </if>
      <if test="windpowerstationid != null">
        #{windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="capacity != null">
        #{capacity,jdbcType=DOUBLE},
      </if>
      <if test="capacityunit != null">
        #{capacityunit,jdbcType=VARCHAR},
      </if>
      <if test="quantity != null">
        #{quantity,jdbcType=INTEGER},
      </if>
      <if test="model != null">
        #{model,jdbcType=VARCHAR},
      </if>
      <if test="commissiondate != null">
        #{commissiondate,jdbcType=DATE},
      </if>
      <if test="masterphone != null">
        #{masterphone,jdbcType=VARCHAR},
      </if>
      <if test="shiftforeman != null">
        #{shiftforeman,jdbcType=VARCHAR},
      </if>
      <if test="shiftforemanphone != null">
        #{shiftforemanphone,jdbcType=VARCHAR},
      </if>
      <if test="ordernum != null">
        #{ordernum,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.ProjectExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from project
    <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 project
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.code != null">
        code = #{record.code,jdbcType=VARCHAR},
      </if>
      <if test="record.name != null">
        name = #{record.name,jdbcType=VARCHAR},
      </if>
      <if test="record.aname != null">
        aname = #{record.aname,jdbcType=VARCHAR},
      </if>
      <if test="record.windpowerstationid != null">
        windPowerStationId = #{record.windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="record.capacity != null">
        capacity = #{record.capacity,jdbcType=DOUBLE},
      </if>
      <if test="record.capacityunit != null">
        capacityUnit = #{record.capacityunit,jdbcType=VARCHAR},
      </if>
      <if test="record.quantity != null">
        quantity = #{record.quantity,jdbcType=INTEGER},
      </if>
      <if test="record.model != null">
        model = #{record.model,jdbcType=VARCHAR},
      </if>
      <if test="record.commissiondate != null">
        commissionDate = #{record.commissiondate,jdbcType=DATE},
      </if>
      <if test="record.masterphone != null">
        masterPhone = #{record.masterphone,jdbcType=VARCHAR},
      </if>
      <if test="record.shiftforeman != null">
        shiftForeman = #{record.shiftforeman,jdbcType=VARCHAR},
      </if>
      <if test="record.shiftforemanphone != null">
        shiftForemanPhone = #{record.shiftforemanphone,jdbcType=VARCHAR},
      </if>
      <if test="record.ordernum != null">
        orderNum = #{record.ordernum,jdbcType=INTEGER},
      </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 project
    set id = #{record.id,jdbcType=VARCHAR},
      code = #{record.code,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      aname = #{record.aname,jdbcType=VARCHAR},
      windPowerStationId = #{record.windpowerstationid,jdbcType=VARCHAR},
      capacity = #{record.capacity,jdbcType=DOUBLE},
      capacityUnit = #{record.capacityunit,jdbcType=VARCHAR},
      quantity = #{record.quantity,jdbcType=INTEGER},
      model = #{record.model,jdbcType=VARCHAR},
      commissionDate = #{record.commissiondate,jdbcType=DATE},
      masterPhone = #{record.masterphone,jdbcType=VARCHAR},
      shiftForeman = #{record.shiftforeman,jdbcType=VARCHAR},
      shiftForemanPhone = #{record.shiftforemanphone,jdbcType=VARCHAR},
      orderNum = #{record.ordernum,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Project">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update project
    <set>
      <if test="code != null">
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="aname != null">
        aname = #{aname,jdbcType=VARCHAR},
      </if>
      <if test="windpowerstationid != null">
        windPowerStationId = #{windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="capacity != null">
        capacity = #{capacity,jdbcType=DOUBLE},
      </if>
      <if test="capacityunit != null">
        capacityUnit = #{capacityunit,jdbcType=VARCHAR},
      </if>
      <if test="quantity != null">
        quantity = #{quantity,jdbcType=INTEGER},
      </if>
      <if test="model != null">
        model = #{model,jdbcType=VARCHAR},
      </if>
      <if test="commissiondate != null">
        commissionDate = #{commissiondate,jdbcType=DATE},
      </if>
      <if test="masterphone != null">
        masterPhone = #{masterphone,jdbcType=VARCHAR},
      </if>
      <if test="shiftforeman != null">
        shiftForeman = #{shiftforeman,jdbcType=VARCHAR},
      </if>
      <if test="shiftforemanphone != null">
        shiftForemanPhone = #{shiftforemanphone,jdbcType=VARCHAR},
      </if>
      <if test="ordernum != null">
        orderNum = #{ordernum,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Project">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update project
    set code = #{code,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      aname = #{aname,jdbcType=VARCHAR},
      windPowerStationId = #{windpowerstationid,jdbcType=VARCHAR},
      capacity = #{capacity,jdbcType=DOUBLE},
      capacityUnit = #{capacityunit,jdbcType=VARCHAR},
      quantity = #{quantity,jdbcType=INTEGER},
      model = #{model,jdbcType=VARCHAR},
      commissionDate = #{commissiondate,jdbcType=DATE},
      masterPhone = #{masterphone,jdbcType=VARCHAR},
      shiftForeman = #{shiftforeman,jdbcType=VARCHAR},
      shiftForemanPhone = #{shiftforemanphone,jdbcType=VARCHAR},
      orderNum = #{ordernum,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>