<?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.EquipmentmodelMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Equipmentmodel">
    <!--
      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="description" jdbcType="VARCHAR" property="description" />
    <result column="powerProduction" jdbcType="DECIMAL" property="powerproduction" />
    <result column="cutinWindSpeed" jdbcType="DECIMAL" property="cutinwindspeed" />
    <result column="ratedWindSpeed" jdbcType="DECIMAL" property="ratedwindspeed" />
    <result column="cutoutWindSpeed" jdbcType="VARCHAR" property="cutoutwindspeed" />
    <result column="windTurbineManufacturerId" jdbcType="VARCHAR" property="windturbinemanufacturerid" />
    <result column="photo" jdbcType="VARCHAR" property="photo" />
    <result column="unit" jdbcType="VARCHAR" property="unit" />
    <result column="sweptArea" jdbcType="DECIMAL" property="sweptarea" />
    <result column="equipmentCategory" jdbcType="INTEGER" property="equipmentcategory" />
  </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, description, powerProduction, cutinWindSpeed, ratedWindSpeed, cutoutWindSpeed, 
    windTurbineManufacturerId, photo, unit, sweptArea, equipmentCategory
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.EquipmentmodelExample" 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 equipmentmodel
    <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 equipmentmodel
    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 equipmentmodel
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.EquipmentmodelExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from equipmentmodel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Equipmentmodel">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into equipmentmodel (id, code, name, 
      description, powerProduction, cutinWindSpeed, 
      ratedWindSpeed, cutoutWindSpeed, windTurbineManufacturerId, 
      photo, unit, sweptArea, 
      equipmentCategory)
    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
      #{description,jdbcType=VARCHAR}, #{powerproduction,jdbcType=DECIMAL}, #{cutinwindspeed,jdbcType=DECIMAL}, 
      #{ratedwindspeed,jdbcType=DECIMAL}, #{cutoutwindspeed,jdbcType=VARCHAR}, #{windturbinemanufacturerid,jdbcType=VARCHAR}, 
      #{photo,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{sweptarea,jdbcType=DECIMAL}, 
      #{equipmentcategory,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Equipmentmodel">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into equipmentmodel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="code != null">
        code,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="description != null">
        description,
      </if>
      <if test="powerproduction != null">
        powerProduction,
      </if>
      <if test="cutinwindspeed != null">
        cutinWindSpeed,
      </if>
      <if test="ratedwindspeed != null">
        ratedWindSpeed,
      </if>
      <if test="cutoutwindspeed != null">
        cutoutWindSpeed,
      </if>
      <if test="windturbinemanufacturerid != null">
        windTurbineManufacturerId,
      </if>
      <if test="photo != null">
        photo,
      </if>
      <if test="unit != null">
        unit,
      </if>
      <if test="sweptarea != null">
        sweptArea,
      </if>
      <if test="equipmentcategory != null">
        equipmentCategory,
      </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="description != null">
        #{description,jdbcType=VARCHAR},
      </if>
      <if test="powerproduction != null">
        #{powerproduction,jdbcType=DECIMAL},
      </if>
      <if test="cutinwindspeed != null">
        #{cutinwindspeed,jdbcType=DECIMAL},
      </if>
      <if test="ratedwindspeed != null">
        #{ratedwindspeed,jdbcType=DECIMAL},
      </if>
      <if test="cutoutwindspeed != null">
        #{cutoutwindspeed,jdbcType=VARCHAR},
      </if>
      <if test="windturbinemanufacturerid != null">
        #{windturbinemanufacturerid,jdbcType=VARCHAR},
      </if>
      <if test="photo != null">
        #{photo,jdbcType=VARCHAR},
      </if>
      <if test="unit != null">
        #{unit,jdbcType=VARCHAR},
      </if>
      <if test="sweptarea != null">
        #{sweptarea,jdbcType=DECIMAL},
      </if>
      <if test="equipmentcategory != null">
        #{equipmentcategory,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.EquipmentmodelExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from equipmentmodel
    <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 equipmentmodel
    <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.description != null">
        description = #{record.description,jdbcType=VARCHAR},
      </if>
      <if test="record.powerproduction != null">
        powerProduction = #{record.powerproduction,jdbcType=DECIMAL},
      </if>
      <if test="record.cutinwindspeed != null">
        cutinWindSpeed = #{record.cutinwindspeed,jdbcType=DECIMAL},
      </if>
      <if test="record.ratedwindspeed != null">
        ratedWindSpeed = #{record.ratedwindspeed,jdbcType=DECIMAL},
      </if>
      <if test="record.cutoutwindspeed != null">
        cutoutWindSpeed = #{record.cutoutwindspeed,jdbcType=VARCHAR},
      </if>
      <if test="record.windturbinemanufacturerid != null">
        windTurbineManufacturerId = #{record.windturbinemanufacturerid,jdbcType=VARCHAR},
      </if>
      <if test="record.photo != null">
        photo = #{record.photo,jdbcType=VARCHAR},
      </if>
      <if test="record.unit != null">
        unit = #{record.unit,jdbcType=VARCHAR},
      </if>
      <if test="record.sweptarea != null">
        sweptArea = #{record.sweptarea,jdbcType=DECIMAL},
      </if>
      <if test="record.equipmentcategory != null">
        equipmentCategory = #{record.equipmentcategory,jdbcType=INTEGER},
      </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 equipmentmodel
    set id = #{record.id,jdbcType=VARCHAR},
      code = #{record.code,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      description = #{record.description,jdbcType=VARCHAR},
      powerProduction = #{record.powerproduction,jdbcType=DECIMAL},
      cutinWindSpeed = #{record.cutinwindspeed,jdbcType=DECIMAL},
      ratedWindSpeed = #{record.ratedwindspeed,jdbcType=DECIMAL},
      cutoutWindSpeed = #{record.cutoutwindspeed,jdbcType=VARCHAR},
      windTurbineManufacturerId = #{record.windturbinemanufacturerid,jdbcType=VARCHAR},
      photo = #{record.photo,jdbcType=VARCHAR},
      unit = #{record.unit,jdbcType=VARCHAR},
      sweptArea = #{record.sweptarea,jdbcType=DECIMAL},
      equipmentCategory = #{record.equipmentcategory,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Equipmentmodel">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update equipmentmodel
    <set>
      <if test="code != null">
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        description = #{description,jdbcType=VARCHAR},
      </if>
      <if test="powerproduction != null">
        powerProduction = #{powerproduction,jdbcType=DECIMAL},
      </if>
      <if test="cutinwindspeed != null">
        cutinWindSpeed = #{cutinwindspeed,jdbcType=DECIMAL},
      </if>
      <if test="ratedwindspeed != null">
        ratedWindSpeed = #{ratedwindspeed,jdbcType=DECIMAL},
      </if>
      <if test="cutoutwindspeed != null">
        cutoutWindSpeed = #{cutoutwindspeed,jdbcType=VARCHAR},
      </if>
      <if test="windturbinemanufacturerid != null">
        windTurbineManufacturerId = #{windturbinemanufacturerid,jdbcType=VARCHAR},
      </if>
      <if test="photo != null">
        photo = #{photo,jdbcType=VARCHAR},
      </if>
      <if test="unit != null">
        unit = #{unit,jdbcType=VARCHAR},
      </if>
      <if test="sweptarea != null">
        sweptArea = #{sweptarea,jdbcType=DECIMAL},
      </if>
      <if test="equipmentcategory != null">
        equipmentCategory = #{equipmentcategory,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Equipmentmodel">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update equipmentmodel
    set code = #{code,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      description = #{description,jdbcType=VARCHAR},
      powerProduction = #{powerproduction,jdbcType=DECIMAL},
      cutinWindSpeed = #{cutinwindspeed,jdbcType=DECIMAL},
      ratedWindSpeed = #{ratedwindspeed,jdbcType=DECIMAL},
      cutoutWindSpeed = #{cutoutwindspeed,jdbcType=VARCHAR},
      windTurbineManufacturerId = #{windturbinemanufacturerid,jdbcType=VARCHAR},
      photo = #{photo,jdbcType=VARCHAR},
      unit = #{unit,jdbcType=VARCHAR},
      sweptArea = #{sweptarea,jdbcType=DECIMAL},
      equipmentCategory = #{equipmentcategory,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>