<?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.Windsubstationtestingpoint2Mapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windsubstationtestingpoint2">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id 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="UNIFORMCODE" jdbcType="VARCHAR" property="uniformcode" />
    <result column="SHORTID" jdbcType="VARCHAR" property="shortid" />
    <result column="LONGID" jdbcType="VARCHAR" property="longid" />
    <result column="WINDSUBSTATIONID" jdbcType="VARCHAR" property="windsubstationid" />
    <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.
    -->
    CODE, NAME, MODEL, VALUEUNIT, ENGLISHNAME, TYPEID, MODELID, MAXVAL, MINVAL, REASONABLEMAXVAL, 
    REASONABLEMINVAL, UNIFORMCODE, SHORTID, LONGID, WINDSUBSTATIONID, REALTIMEID
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.Windsubstationtestingpoint2Example" 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 WINDSUBSTATIONTESTINGPOINT2
    <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 WINDSUBSTATIONTESTINGPOINT2
    where CODE = #{code,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 WINDSUBSTATIONTESTINGPOINT2
    where CODE = #{code,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.Windsubstationtestingpoint2Example">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from WINDSUBSTATIONTESTINGPOINT2
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Windsubstationtestingpoint2">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WINDSUBSTATIONTESTINGPOINT2 (CODE, NAME, MODEL, 
      VALUEUNIT, ENGLISHNAME, TYPEID, 
      MODELID, MAXVAL, MINVAL, 
      REASONABLEMAXVAL, REASONABLEMINVAL, UNIFORMCODE, 
      SHORTID, LONGID, WINDSUBSTATIONID, 
      REALTIMEID)
    values (#{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}, #{uniformcode,jdbcType=VARCHAR}, 
      #{shortid,jdbcType=VARCHAR}, #{longid,jdbcType=VARCHAR}, #{windsubstationid,jdbcType=VARCHAR}, 
      #{realtimeid,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Windsubstationtestingpoint2">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into WINDSUBSTATIONTESTINGPOINT2
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <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="uniformcode != null">
        UNIFORMCODE,
      </if>
      <if test="shortid != null">
        SHORTID,
      </if>
      <if test="longid != null">
        LONGID,
      </if>
      <if test="windsubstationid != null">
        WINDSUBSTATIONID,
      </if>
      <if test="realtimeid != null">
        REALTIMEID,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <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="uniformcode != null">
        #{uniformcode,jdbcType=VARCHAR},
      </if>
      <if test="shortid != null">
        #{shortid,jdbcType=VARCHAR},
      </if>
      <if test="longid != null">
        #{longid,jdbcType=VARCHAR},
      </if>
      <if test="windsubstationid != null">
        #{windsubstationid,jdbcType=VARCHAR},
      </if>
      <if test="realtimeid != null">
        #{realtimeid,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.Windsubstationtestingpoint2Example" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from WINDSUBSTATIONTESTINGPOINT2
    <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 WINDSUBSTATIONTESTINGPOINT2
    <set>
      <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.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.windsubstationid != null">
        WINDSUBSTATIONID = #{record.windsubstationid,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 WINDSUBSTATIONTESTINGPOINT2
    set 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},
      UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
      SHORTID = #{record.shortid,jdbcType=VARCHAR},
      LONGID = #{record.longid,jdbcType=VARCHAR},
      WINDSUBSTATIONID = #{record.windsubstationid,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.Windsubstationtestingpoint2">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WINDSUBSTATIONTESTINGPOINT2
    <set>
      <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="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="windsubstationid != null">
        WINDSUBSTATIONID = #{windsubstationid,jdbcType=VARCHAR},
      </if>
      <if test="realtimeid != null">
        REALTIMEID = #{realtimeid,jdbcType=VARCHAR},
      </if>
    </set>
    where CODE = #{code,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Windsubstationtestingpoint2">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update WINDSUBSTATIONTESTINGPOINT2
    set 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},
      UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
      SHORTID = #{shortid,jdbcType=VARCHAR},
      LONGID = #{longid,jdbcType=VARCHAR},
      WINDSUBSTATIONID = #{windsubstationid,jdbcType=VARCHAR},
      REALTIMEID = #{realtimeid,jdbcType=VARCHAR}
    where CODE = #{code,jdbcType=VARCHAR}
  </update>



  <delete id="deleteAll"  >

    delete from WINDSUBSTATIONTESTINGPOINT2
  </delete>


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

    insert into WINDSUBSTATIONTESTINGPOINT2 (CODE,NAME,MODEL,VALUEUNIT,ENGLISHNAME,TYPEID,MODELID,MAXVAL,MINVAL,REASONABLEMAXVAL,REASONABLEMINVAL,UNIFORMCODE,SHORTID,LONGID,WINDSUBSTATIONID,REALTIMEID)

    <foreach  collection="list" item="item" index="index" separator="union all">
      SELECT #{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.uniformcode,jdbcType=VARCHAR},#{item.shortid,jdbcType=VARCHAR},#{item.longid,jdbcType=VARCHAR},#{item.windsubstationid,jdbcType=VARCHAR},#{item.realtimeid,jdbcType=VARCHAR} from dual
    </foreach>

  </insert>
</mapper>