<?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.WindturbinetestingpointMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbinetestingpoint">
    <!--
      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="MODEL" jdbcType="VARCHAR" property="model" />
    <result column="VALUEUNIT" jdbcType="VARCHAR" property="valueunit" />
    <result column="ENGLISHNAME" jdbcType="VARCHAR" property="englishname" />
    <result column="TYPEID" jdbcType="VARCHAR" property="typeid" />
    <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
    <result column="MAXVAL" jdbcType="DECIMAL" property="maxval" />
    <result column="MINVAL" jdbcType="DECIMAL" property="minval" />
    <result column="REASONABLEMAXVAL" jdbcType="DECIMAL" property="reasonablemaxval" />
    <result column="REASONABLEMINVAL" jdbcType="DECIMAL" property="reasonableminval" />
    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
    <result column="UNIFORMCODE" jdbcType="VARCHAR" property="uniformcode" />
    <result column="SHORTID" jdbcType="VARCHAR" property="shortid" />
    <result column="LONGID" jdbcType="VARCHAR" property="longid" />
    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
    <result column="REALTIMEID" jdbcType="VARCHAR" property="realtimeid" />
  </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, MODEL, VALUEUNIT, ENGLISHNAME, TYPEID, MODELID, MAXVAL, MINVAL, REASONABLEMAXVAL, 
    REASONABLEMINVAL, WINDTURBINEID, UNIFORMCODE, SHORTID, LONGID, WINDPOWERSTATIONID, 
    REALTIMEID
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WindturbinetestingpointExample" 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 WINDTURBINETESTINGPOINT
    <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 WINDTURBINETESTINGPOINT
    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 WINDTURBINETESTINGPOINT
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WindturbinetestingpointExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from WINDTURBINETESTINGPOINT
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Windturbinetestingpoint">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WINDTURBINETESTINGPOINT (ID, CODE, NAME, 
      MODEL, VALUEUNIT, ENGLISHNAME, 
      TYPEID, MODELID, MAXVAL, 
      MINVAL, REASONABLEMAXVAL, REASONABLEMINVAL, 
      WINDTURBINEID, UNIFORMCODE, SHORTID, 
      LONGID, WINDPOWERSTATIONID, REALTIMEID
      )
    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
      #{model,jdbcType=VARCHAR}, #{valueunit,jdbcType=VARCHAR}, #{englishname,jdbcType=VARCHAR}, 
      #{typeid,jdbcType=VARCHAR}, #{modelid,jdbcType=VARCHAR}, #{maxval,jdbcType=DECIMAL}, 
      #{minval,jdbcType=DECIMAL}, #{reasonablemaxval,jdbcType=DECIMAL}, #{reasonableminval,jdbcType=DECIMAL}, 
      #{windturbineid,jdbcType=VARCHAR}, #{uniformcode,jdbcType=VARCHAR}, #{shortid,jdbcType=VARCHAR}, 
      #{longid,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR}, #{realtimeid,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Windturbinetestingpoint">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WINDTURBINETESTINGPOINT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="code != null">
        CODE,
      </if>
      <if test="name != null">
        NAME,
      </if>
      <if test="model != null">
        MODEL,
      </if>
      <if test="valueunit != null">
        VALUEUNIT,
      </if>
      <if test="englishname != null">
        ENGLISHNAME,
      </if>
      <if test="typeid != null">
        TYPEID,
      </if>
      <if test="modelid != null">
        MODELID,
      </if>
      <if test="maxval != null">
        MAXVAL,
      </if>
      <if test="minval != null">
        MINVAL,
      </if>
      <if test="reasonablemaxval != null">
        REASONABLEMAXVAL,
      </if>
      <if test="reasonableminval != null">
        REASONABLEMINVAL,
      </if>
      <if test="windturbineid != null">
        WINDTURBINEID,
      </if>
      <if test="uniformcode != null">
        UNIFORMCODE,
      </if>
      <if test="shortid != null">
        SHORTID,
      </if>
      <if test="longid != null">
        LONGID,
      </if>
      <if test="windpowerstationid != null">
        WINDPOWERSTATIONID,
      </if>
      <if test="realtimeid != null">
        REALTIMEID,
      </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="model != null">
        #{model,jdbcType=VARCHAR},
      </if>
      <if test="valueunit != null">
        #{valueunit,jdbcType=VARCHAR},
      </if>
      <if test="englishname != null">
        #{englishname,jdbcType=VARCHAR},
      </if>
      <if test="typeid != null">
        #{typeid,jdbcType=VARCHAR},
      </if>
      <if test="modelid != null">
        #{modelid,jdbcType=VARCHAR},
      </if>
      <if test="maxval != null">
        #{maxval,jdbcType=DECIMAL},
      </if>
      <if test="minval != null">
        #{minval,jdbcType=DECIMAL},
      </if>
      <if test="reasonablemaxval != null">
        #{reasonablemaxval,jdbcType=DECIMAL},
      </if>
      <if test="reasonableminval != null">
        #{reasonableminval,jdbcType=DECIMAL},
      </if>
      <if test="windturbineid != null">
        #{windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="uniformcode != null">
        #{uniformcode,jdbcType=VARCHAR},
      </if>
      <if test="shortid != null">
        #{shortid,jdbcType=VARCHAR},
      </if>
      <if test="longid != null">
        #{longid,jdbcType=VARCHAR},
      </if>
      <if test="windpowerstationid != null">
        #{windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="realtimeid != null">
        #{realtimeid,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WindturbinetestingpointExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from WINDTURBINETESTINGPOINT
    <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 WINDTURBINETESTINGPOINT
    <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.model != null">
        MODEL = #{record.model,jdbcType=VARCHAR},
      </if>
      <if test="record.valueunit != null">
        VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
      </if>
      <if test="record.englishname != null">
        ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
      </if>
      <if test="record.typeid != null">
        TYPEID = #{record.typeid,jdbcType=VARCHAR},
      </if>
      <if test="record.modelid != null">
        MODELID = #{record.modelid,jdbcType=VARCHAR},
      </if>
      <if test="record.maxval != null">
        MAXVAL = #{record.maxval,jdbcType=DECIMAL},
      </if>
      <if test="record.minval != null">
        MINVAL = #{record.minval,jdbcType=DECIMAL},
      </if>
      <if test="record.reasonablemaxval != null">
        REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
      </if>
      <if test="record.reasonableminval != null">
        REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
      </if>
      <if test="record.windturbineid != null">
        WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="record.uniformcode != null">
        UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
      </if>
      <if test="record.shortid != null">
        SHORTID = #{record.shortid,jdbcType=VARCHAR},
      </if>
      <if test="record.longid != null">
        LONGID = #{record.longid,jdbcType=VARCHAR},
      </if>
      <if test="record.windpowerstationid != null">
        WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="record.realtimeid != null">
        REALTIMEID = #{record.realtimeid,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 WINDTURBINETESTINGPOINT
    set ID = #{record.id,jdbcType=VARCHAR},
      CODE = #{record.code,jdbcType=VARCHAR},
      NAME = #{record.name,jdbcType=VARCHAR},
      MODEL = #{record.model,jdbcType=VARCHAR},
      VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
      ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
      TYPEID = #{record.typeid,jdbcType=VARCHAR},
      MODELID = #{record.modelid,jdbcType=VARCHAR},
      MAXVAL = #{record.maxval,jdbcType=DECIMAL},
      MINVAL = #{record.minval,jdbcType=DECIMAL},
      REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
      REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
      UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
      SHORTID = #{record.shortid,jdbcType=VARCHAR},
      LONGID = #{record.longid,jdbcType=VARCHAR},
      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
      REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Windturbinetestingpoint">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WINDTURBINETESTINGPOINT
    <set>
      <if test="code != null">
        CODE = #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        NAME = #{name,jdbcType=VARCHAR},
      </if>
      <if test="model != null">
        MODEL = #{model,jdbcType=VARCHAR},
      </if>
      <if test="valueunit != null">
        VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
      </if>
      <if test="englishname != null">
        ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
      </if>
      <if test="typeid != null">
        TYPEID = #{typeid,jdbcType=VARCHAR},
      </if>
      <if test="modelid != null">
        MODELID = #{modelid,jdbcType=VARCHAR},
      </if>
      <if test="maxval != null">
        MAXVAL = #{maxval,jdbcType=DECIMAL},
      </if>
      <if test="minval != null">
        MINVAL = #{minval,jdbcType=DECIMAL},
      </if>
      <if test="reasonablemaxval != null">
        REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
      </if>
      <if test="reasonableminval != null">
        REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
      </if>
      <if test="windturbineid != null">
        WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="uniformcode != null">
        UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
      </if>
      <if test="shortid != null">
        SHORTID = #{shortid,jdbcType=VARCHAR},
      </if>
      <if test="longid != null">
        LONGID = #{longid,jdbcType=VARCHAR},
      </if>
      <if test="windpowerstationid != null">
        WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
      </if>
      <if test="realtimeid != null">
        REALTIMEID = #{realtimeid,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Windturbinetestingpoint">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WINDTURBINETESTINGPOINT
    set CODE = #{code,jdbcType=VARCHAR},
      NAME = #{name,jdbcType=VARCHAR},
      MODEL = #{model,jdbcType=VARCHAR},
      VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
      ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
      TYPEID = #{typeid,jdbcType=VARCHAR},
      MODELID = #{modelid,jdbcType=VARCHAR},
      MAXVAL = #{maxval,jdbcType=DECIMAL},
      MINVAL = #{minval,jdbcType=DECIMAL},
      REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
      REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
      WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
      UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
      SHORTID = #{shortid,jdbcType=VARCHAR},
      LONGID = #{longid,jdbcType=VARCHAR},
      WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
      REALTIMEID = #{realtimeid,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=VARCHAR}
  </update>


  <delete id="deleteAll"  >

    delete from WINDTURBINETESTINGPOINT
  </delete>


  <insert id="insertBatch" parameterType="java.util.List" >

    insert into WINDTURBINETESTINGPOINT (ID,CODE,NAME,MODEL,VALUEUNIT,ENGLISHNAME,TYPEID,MODELID,MAXVAL,MINVAL,REASONABLEMAXVAL,REASONABLEMINVAL,WINDTURBINEID,UNIFORMCODE,SHORTID,LONGID,WINDPOWERSTATIONID,REALTIMEID)

    <foreach  collection="list" item="item" index="index" separator="union all">
      SELECT #{item.id,jdbcType=VARCHAR},#{item.code,jdbcType=VARCHAR},#{item.name,jdbcType=VARCHAR},#{item.model,jdbcType=VARCHAR},#{item.valueunit,jdbcType=VARCHAR},#{item.englishname,jdbcType=VARCHAR},#{item.typeid,jdbcType=VARCHAR},#{item.modelid,jdbcType=VARCHAR},#{item.maxval,jdbcType=DECIMAL},#{item.minval,jdbcType=DECIMAL},#{item.reasonablemaxval,jdbcType=DECIMAL},#{item.reasonableminval,jdbcType=DECIMAL},#{item.windturbineid,jdbcType=VARCHAR},#{item.uniformcode,jdbcType=VARCHAR},#{item.shortid,jdbcType=VARCHAR},#{item.longid,jdbcType=VARCHAR},#{item.windpowerstationid,jdbcType=VARCHAR},#{item.realtimeid,jdbcType=VARCHAR} from dual
    </foreach>

  </insert>


</mapper>