<?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.NoscaledataMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Noscaledata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="WINDPLANT_NO" jdbcType="DECIMAL" property="windplantNo" />
    <id column="MODEL_NO" jdbcType="DECIMAL" property="modelNo" />
    <id column="DATA_TIME" jdbcType="TIMESTAMP" property="dataTime" />
    <result column="VALUE" jdbcType="FLOAT" property="value" />
    <result column="DATA_FLAG" jdbcType="DECIMAL" property="dataFlag" />
    <result column="MODSPEED" jdbcType="FLOAT" property="modspeed" />
  </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.
    -->
    WINDPLANT_NO, MODEL_NO, DATA_TIME, VALUE, DATA_FLAG, MODSPEED
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.NoscaledataExample" 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 NOSCALE_WF_DA_PF_PERIOD_DATA
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from NOSCALE_WF_DA_PF_PERIOD_DATA
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and MODEL_NO = #{modelNo,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from NOSCALE_WF_DA_PF_PERIOD_DATA
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and MODEL_NO = #{modelNo,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.NoscaledataExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from NOSCALE_WF_DA_PF_PERIOD_DATA
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Noscaledata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into NOSCALE_WF_DA_PF_PERIOD_DATA (WINDPLANT_NO, MODEL_NO, DATA_TIME, 
      VALUE, DATA_FLAG, MODSPEED
      )
    values (#{windplantNo,jdbcType=DECIMAL}, #{modelNo,jdbcType=DECIMAL}, #{dataTime,jdbcType=TIMESTAMP}, 
      #{value,jdbcType=FLOAT}, #{dataFlag,jdbcType=DECIMAL}, #{modspeed,jdbcType=FLOAT}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Noscaledata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into NOSCALE_WF_DA_PF_PERIOD_DATA
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="windplantNo != null">
        WINDPLANT_NO,
      </if>
      <if test="modelNo != null">
        MODEL_NO,
      </if>
      <if test="dataTime != null">
        DATA_TIME,
      </if>
      <if test="value != null">
        VALUE,
      </if>
      <if test="dataFlag != null">
        DATA_FLAG,
      </if>
      <if test="modspeed != null">
        MODSPEED,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="windplantNo != null">
        #{windplantNo,jdbcType=DECIMAL},
      </if>
      <if test="modelNo != null">
        #{modelNo,jdbcType=DECIMAL},
      </if>
      <if test="dataTime != null">
        #{dataTime,jdbcType=TIMESTAMP},
      </if>
      <if test="value != null">
        #{value,jdbcType=FLOAT},
      </if>
      <if test="dataFlag != null">
        #{dataFlag,jdbcType=DECIMAL},
      </if>
      <if test="modspeed != null">
        #{modspeed,jdbcType=FLOAT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.NoscaledataExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from NOSCALE_WF_DA_PF_PERIOD_DATA
    <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 NOSCALE_WF_DA_PF_PERIOD_DATA
    <set>
      <if test="record.windplantNo != null">
        WINDPLANT_NO = #{record.windplantNo,jdbcType=DECIMAL},
      </if>
      <if test="record.modelNo != null">
        MODEL_NO = #{record.modelNo,jdbcType=DECIMAL},
      </if>
      <if test="record.dataTime != null">
        DATA_TIME = #{record.dataTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.value != null">
        VALUE = #{record.value,jdbcType=FLOAT},
      </if>
      <if test="record.dataFlag != null">
        DATA_FLAG = #{record.dataFlag,jdbcType=DECIMAL},
      </if>
      <if test="record.modspeed != null">
        MODSPEED = #{record.modspeed,jdbcType=FLOAT},
      </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 NOSCALE_WF_DA_PF_PERIOD_DATA
    set WINDPLANT_NO = #{record.windplantNo,jdbcType=DECIMAL},
      MODEL_NO = #{record.modelNo,jdbcType=DECIMAL},
      DATA_TIME = #{record.dataTime,jdbcType=TIMESTAMP},
      VALUE = #{record.value,jdbcType=FLOAT},
      DATA_FLAG = #{record.dataFlag,jdbcType=DECIMAL},
      MODSPEED = #{record.modspeed,jdbcType=FLOAT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Noscaledata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update NOSCALE_WF_DA_PF_PERIOD_DATA
    <set>
      <if test="value != null">
        VALUE = #{value,jdbcType=FLOAT},
      </if>
      <if test="dataFlag != null">
        DATA_FLAG = #{dataFlag,jdbcType=DECIMAL},
      </if>
      <if test="modspeed != null">
        MODSPEED = #{modspeed,jdbcType=FLOAT},
      </if>
    </set>
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and MODEL_NO = #{modelNo,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Noscaledata">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update NOSCALE_WF_DA_PF_PERIOD_DATA
    set VALUE = #{value,jdbcType=FLOAT},
      DATA_FLAG = #{dataFlag,jdbcType=DECIMAL},
      MODSPEED = #{modspeed,jdbcType=FLOAT}
    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
      and MODEL_NO = #{modelNo,jdbcType=DECIMAL}
      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
  </update>
</mapper>