<?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.FaultEliminateDefectsMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.FaultEliminateDefects">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="DECIMAL" property="id" />
    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
    <result column="PROJECTID" jdbcType="VARCHAR" property="projectid" />
    <result column="LINEID" jdbcType="VARCHAR" property="lineid" />
    <result column="DATETIME" jdbcType="TIMESTAMP" property="datetime" />
    <result column="CLASSIFYID" jdbcType="VARCHAR" property="classifyid" />
    <result column="faultCount" jdbcType="DECIMAL" property="faultcount" />
    <result column="rate" jdbcType="DECIMAL" property="rate" />
    <result column="RIGHTCOUNT" jdbcType="DECIMAL" property="rightcount" />
    <result column="cause" jdbcType="VARCHAR" property="cause" />
  </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, WINDPOWERSTATIONID, WINDTURBINEID, PROJECTID, LINEID, DATETIME, CLASSIFYID, faultCount, 
    rate, RIGHTCOUNT, cause
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.FaultEliminateDefectsExample" 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 faulteliminatedefects
    <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.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from faulteliminatedefects
    where id = #{id,jdbcType=DECIMAL}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from faulteliminatedefects
    where id = #{id,jdbcType=DECIMAL}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.FaultEliminateDefectsExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from faulteliminatedefects
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.FaultEliminateDefects">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into faulteliminatedefects (id, WINDPOWERSTATIONID, WINDTURBINEID, 
      PROJECTID, LINEID, DATETIME, 
      CLASSIFYID, faultCount, rate, 
      RIGHTCOUNT, cause)
    values (#{id,jdbcType=DECIMAL}, #{windpowerstationid,jdbcType=VARCHAR}, #{windturbineid,jdbcType=VARCHAR}, 
      #{projectid,jdbcType=VARCHAR}, #{lineid,jdbcType=VARCHAR}, #{datetime,jdbcType=TIMESTAMP}, 
      #{classifyid,jdbcType=VARCHAR}, #{faultcount,jdbcType=DECIMAL}, #{rate,jdbcType=DECIMAL}, 
      #{rightcount,jdbcType=DECIMAL}, #{cause,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.FaultEliminateDefects">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into faulteliminatedefects
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="windpowerstationid != null">
        WINDPOWERSTATIONID,
      </if>
      <if test="windturbineid != null">
        WINDTURBINEID,
      </if>
      <if test="projectid != null">
        PROJECTID,
      </if>
      <if test="lineid != null">
        LINEID,
      </if>
      <if test="datetime != null">
        DATETIME,
      </if>
      <if test="classifyid != null">
        CLASSIFYID,
      </if>
      <if test="faultcount != null">
        faultCount,
      </if>
      <if test="rate != null">
        rate,
      </if>
      <if test="rightcount != null">
        RIGHTCOUNT,
      </if>
      <if test="cause != null">
        cause,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=DECIMAL},
      </if>
      <if test="windpowerstationid != null">
        #{windpowerstationid,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="datetime != null">
        #{datetime,jdbcType=TIMESTAMP},
      </if>
      <if test="classifyid != null">
        #{classifyid,jdbcType=VARCHAR},
      </if>
      <if test="faultcount != null">
        #{faultcount,jdbcType=DECIMAL},
      </if>
      <if test="rate != null">
        #{rate,jdbcType=DECIMAL},
      </if>
      <if test="rightcount != null">
        #{rightcount,jdbcType=DECIMAL},
      </if>
      <if test="cause != null">
        #{cause,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.FaultEliminateDefectsExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from faulteliminatedefects
    <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 faulteliminatedefects
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=DECIMAL},
      </if>
      <if test="record.windpowerstationid != null">
        WINDPOWERSTATIONID = #{record.windpowerstationid,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.datetime != null">
        DATETIME = #{record.datetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.classifyid != null">
        CLASSIFYID = #{record.classifyid,jdbcType=VARCHAR},
      </if>
      <if test="record.faultcount != null">
        faultCount = #{record.faultcount,jdbcType=DECIMAL},
      </if>
      <if test="record.rate != null">
        rate = #{record.rate,jdbcType=DECIMAL},
      </if>
      <if test="record.rightcount != null">
        RIGHTCOUNT = #{record.rightcount,jdbcType=DECIMAL},
      </if>
      <if test="record.cause != null">
        cause = #{record.cause,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 faulteliminatedefects
    set id = #{record.id,jdbcType=DECIMAL},
      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
      PROJECTID = #{record.projectid,jdbcType=VARCHAR},
      LINEID = #{record.lineid,jdbcType=VARCHAR},
      DATETIME = #{record.datetime,jdbcType=TIMESTAMP},
      CLASSIFYID = #{record.classifyid,jdbcType=VARCHAR},
      faultCount = #{record.faultcount,jdbcType=DECIMAL},
      rate = #{record.rate,jdbcType=DECIMAL},
      RIGHTCOUNT = #{record.rightcount,jdbcType=DECIMAL},
      cause = #{record.cause,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.FaultEliminateDefects">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update faulteliminatedefects
    <set>
      <if test="windpowerstationid != null">
        WINDPOWERSTATIONID = #{windpowerstationid,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="datetime != null">
        DATETIME = #{datetime,jdbcType=TIMESTAMP},
      </if>
      <if test="classifyid != null">
        CLASSIFYID = #{classifyid,jdbcType=VARCHAR},
      </if>
      <if test="faultcount != null">
        faultCount = #{faultcount,jdbcType=DECIMAL},
      </if>
      <if test="rate != null">
        rate = #{rate,jdbcType=DECIMAL},
      </if>
      <if test="rightcount != null">
        RIGHTCOUNT = #{rightcount,jdbcType=DECIMAL},
      </if>
      <if test="cause != null">
        cause = #{cause,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=DECIMAL}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.FaultEliminateDefects">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update faulteliminatedefects
    set WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
      WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
      PROJECTID = #{projectid,jdbcType=VARCHAR},
      LINEID = #{lineid,jdbcType=VARCHAR},
      DATETIME = #{datetime,jdbcType=TIMESTAMP},
      CLASSIFYID = #{classifyid,jdbcType=VARCHAR},
      faultCount = #{faultcount,jdbcType=DECIMAL},
      rate = #{rate,jdbcType=DECIMAL},
      RIGHTCOUNT = #{rightcount,jdbcType=DECIMAL},
      cause = #{cause,jdbcType=VARCHAR}
    where id = #{id,jdbcType=DECIMAL}
  </update>
</mapper>