<?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.StateDuratimeMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.StateDuratime">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="DECIMAL" property="id" />
    <result column="COUNTTTIME" jdbcType="TIMESTAMP" property="countttime" />
    <result column="RECENTFAULTTIME" jdbcType="TIMESTAMP" property="recentfaulttime" />
    <result column="DURAMINUTE" jdbcType="DECIMAL" property="duraminute" />
    <result column="STATIONID" jdbcType="VARCHAR" property="stationid" />
    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
    <result column="PROJECTID" jdbcType="VARCHAR" property="projectid" />
    <result column="LINEID" jdbcType="VARCHAR" property="lineid" />
    <result column="STATIONNAME" jdbcType="VARCHAR" property="stationname" />
    <result column="WINDTURBINENAME" jdbcType="VARCHAR" property="windturbinename" />
    <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
    <result column="SNAPID" jdbcType="DECIMAL" property="snapid" />
    <result column="MESSAGE" jdbcType="VARCHAR" property="message" />
  </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, COUNTTTIME, RECENTFAULTTIME, DURAMINUTE, STATIONID, WINDTURBINEID, PROJECTID, 
    LINEID, STATIONNAME, WINDTURBINENAME, MODELID, SNAPID, MESSAGE
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.StateDuratimeExample" 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 STATEDURATIME
    <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.Short" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from STATEDURATIME
    where ID = #{id,jdbcType=DECIMAL}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from STATEDURATIME
    where ID = #{id,jdbcType=DECIMAL}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.StateDuratimeExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from STATEDURATIME
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.StateDuratime">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into STATEDURATIME (ID, COUNTTTIME, RECENTFAULTTIME, 
      DURAMINUTE, STATIONID, WINDTURBINEID, 
      PROJECTID, LINEID, STATIONNAME, 
      WINDTURBINENAME, MODELID, SNAPID, 
      MESSAGE)
    values (#{id,jdbcType=DECIMAL}, #{countttime,jdbcType=TIMESTAMP}, #{recentfaulttime,jdbcType=TIMESTAMP}, 
      #{duraminute,jdbcType=DECIMAL}, #{stationid,jdbcType=VARCHAR}, #{windturbineid,jdbcType=VARCHAR}, 
      #{projectid,jdbcType=VARCHAR}, #{lineid,jdbcType=VARCHAR}, #{stationname,jdbcType=VARCHAR}, 
      #{windturbinename,jdbcType=VARCHAR}, #{modelid,jdbcType=VARCHAR}, #{snapid,jdbcType=DECIMAL}, 
      #{message,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.StateDuratime">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into STATEDURATIME
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="countttime != null">
        COUNTTTIME,
      </if>
      <if test="recentfaulttime != null">
        RECENTFAULTTIME,
      </if>
      <if test="duraminute != null">
        DURAMINUTE,
      </if>
      <if test="stationid != null">
        STATIONID,
      </if>
      <if test="windturbineid != null">
        WINDTURBINEID,
      </if>
      <if test="projectid != null">
        PROJECTID,
      </if>
      <if test="lineid != null">
        LINEID,
      </if>
      <if test="stationname != null">
        STATIONNAME,
      </if>
      <if test="windturbinename != null">
        WINDTURBINENAME,
      </if>
      <if test="modelid != null">
        MODELID,
      </if>
      <if test="snapid != null">
        SNAPID,
      </if>
      <if test="message != null">
        MESSAGE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=DECIMAL},
      </if>
      <if test="countttime != null">
        #{countttime,jdbcType=TIMESTAMP},
      </if>
      <if test="recentfaulttime != null">
        #{recentfaulttime,jdbcType=TIMESTAMP},
      </if>
      <if test="duraminute != null">
        #{duraminute,jdbcType=DECIMAL},
      </if>
      <if test="stationid != null">
        #{stationid,jdbcType=VARCHAR},
      </if>
      <if test="windturbineid != null">
        #{windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="projectid != null">
        #{projectid,jdbcType=VARCHAR},
      </if>
      <if test="lineid != null">
        #{lineid,jdbcType=VARCHAR},
      </if>
      <if test="stationname != null">
        #{stationname,jdbcType=VARCHAR},
      </if>
      <if test="windturbinename != null">
        #{windturbinename,jdbcType=VARCHAR},
      </if>
      <if test="modelid != null">
        #{modelid,jdbcType=VARCHAR},
      </if>
      <if test="snapid != null">
        #{snapid,jdbcType=DECIMAL},
      </if>
      <if test="message != null">
        #{message,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.StateDuratimeExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from STATEDURATIME
    <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 STATEDURATIME
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=DECIMAL},
      </if>
      <if test="record.countttime != null">
        COUNTTTIME = #{record.countttime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.recentfaulttime != null">
        RECENTFAULTTIME = #{record.recentfaulttime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.duraminute != null">
        DURAMINUTE = #{record.duraminute,jdbcType=DECIMAL},
      </if>
      <if test="record.stationid != null">
        STATIONID = #{record.stationid,jdbcType=VARCHAR},
      </if>
      <if test="record.windturbineid != null">
        WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="record.projectid != null">
        PROJECTID = #{record.projectid,jdbcType=VARCHAR},
      </if>
      <if test="record.lineid != null">
        LINEID = #{record.lineid,jdbcType=VARCHAR},
      </if>
      <if test="record.stationname != null">
        STATIONNAME = #{record.stationname,jdbcType=VARCHAR},
      </if>
      <if test="record.windturbinename != null">
        WINDTURBINENAME = #{record.windturbinename,jdbcType=VARCHAR},
      </if>
      <if test="record.modelid != null">
        MODELID = #{record.modelid,jdbcType=VARCHAR},
      </if>
      <if test="record.snapid != null">
        SNAPID = #{record.snapid,jdbcType=DECIMAL},
      </if>
      <if test="record.message != null">
        MESSAGE = #{record.message,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 STATEDURATIME
    set ID = #{record.id,jdbcType=DECIMAL},
      COUNTTTIME = #{record.countttime,jdbcType=TIMESTAMP},
      RECENTFAULTTIME = #{record.recentfaulttime,jdbcType=TIMESTAMP},
      DURAMINUTE = #{record.duraminute,jdbcType=DECIMAL},
      STATIONID = #{record.stationid,jdbcType=VARCHAR},
      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
      PROJECTID = #{record.projectid,jdbcType=VARCHAR},
      LINEID = #{record.lineid,jdbcType=VARCHAR},
      STATIONNAME = #{record.stationname,jdbcType=VARCHAR},
      WINDTURBINENAME = #{record.windturbinename,jdbcType=VARCHAR},
      MODELID = #{record.modelid,jdbcType=VARCHAR},
      SNAPID = #{record.snapid,jdbcType=DECIMAL},
      MESSAGE = #{record.message,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.StateDuratime">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update STATEDURATIME
    <set>
      <if test="countttime != null">
        COUNTTTIME = #{countttime,jdbcType=TIMESTAMP},
      </if>
      <if test="recentfaulttime != null">
        RECENTFAULTTIME = #{recentfaulttime,jdbcType=TIMESTAMP},
      </if>
      <if test="duraminute != null">
        DURAMINUTE = #{duraminute,jdbcType=DECIMAL},
      </if>
      <if test="stationid != null">
        STATIONID = #{stationid,jdbcType=VARCHAR},
      </if>
      <if test="windturbineid != null">
        WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
      </if>
      <if test="projectid != null">
        PROJECTID = #{projectid,jdbcType=VARCHAR},
      </if>
      <if test="lineid != null">
        LINEID = #{lineid,jdbcType=VARCHAR},
      </if>
      <if test="stationname != null">
        STATIONNAME = #{stationname,jdbcType=VARCHAR},
      </if>
      <if test="windturbinename != null">
        WINDTURBINENAME = #{windturbinename,jdbcType=VARCHAR},
      </if>
      <if test="modelid != null">
        MODELID = #{modelid,jdbcType=VARCHAR},
      </if>
      <if test="snapid != null">
        SNAPID = #{snapid,jdbcType=DECIMAL},
      </if>
      <if test="message != null">
        MESSAGE = #{message,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=DECIMAL}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.StateDuratime">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update STATEDURATIME
    set COUNTTTIME = #{countttime,jdbcType=TIMESTAMP},
      RECENTFAULTTIME = #{recentfaulttime,jdbcType=TIMESTAMP},
      DURAMINUTE = #{duraminute,jdbcType=DECIMAL},
      STATIONID = #{stationid,jdbcType=VARCHAR},
      WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
      PROJECTID = #{projectid,jdbcType=VARCHAR},
      LINEID = #{lineid,jdbcType=VARCHAR},
      STATIONNAME = #{stationname,jdbcType=VARCHAR},
      WINDTURBINENAME = #{windturbinename,jdbcType=VARCHAR},
      MODELID = #{modelid,jdbcType=VARCHAR},
      SNAPID = #{snapid,jdbcType=DECIMAL},
      MESSAGE = #{message,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=DECIMAL}
  </update>
</mapper>