<?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.bailuntec.mapper.DcBaseOrderCommissonMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcBaseOrderCommisson">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="platform" jdbcType="VARCHAR" property="platform" />
    <result column="website" jdbcType="VARCHAR" property="website" />
    <result column="bailun_category_id" jdbcType="INTEGER" property="bailunCategoryId" />
    <result column="bailun_category_name" jdbcType="VARCHAR" property="bailunCategoryName" />
    <result column="commisson_minimum" jdbcType="DECIMAL" property="commissonMinimum" />
    <result column="commisson_rate" jdbcType="DECIMAL" property="commissonRate" />
    <result column="total_sales" jdbcType="DECIMAL" property="totalSales" />
    <result column="type" jdbcType="TINYINT" property="type" />
    <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
    <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
  </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, platform, website, bailun_category_id, bailun_category_name, commisson_minimum, 
    commisson_rate, total_sales, type, gmt_create, gmt_modified
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOrderCommissonExample" 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 dc_base_order_commisson
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    <if test="rows != null">
      <if test="offset != null">
        limit ${offset}, ${rows}
      </if>
      <if test="offset == null">
        limit ${rows}
      </if>
    </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 dc_base_order_commisson
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_order_commisson
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcBaseOrderCommissonExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_base_order_commisson
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcBaseOrderCommisson">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_order_commisson (id, platform, website, 
      bailun_category_id, bailun_category_name, commisson_minimum, 
      commisson_rate, total_sales, type, 
      gmt_create, gmt_modified)
    values (#{id,jdbcType=INTEGER}, #{platform,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, 
      #{bailunCategoryId,jdbcType=INTEGER}, #{bailunCategoryName,jdbcType=VARCHAR}, #{commissonMinimum,jdbcType=DECIMAL}, 
      #{commissonRate,jdbcType=DECIMAL}, #{totalSales,jdbcType=DECIMAL}, #{type,jdbcType=TINYINT}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOrderCommisson">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_base_order_commisson
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="platform != null">
        platform,
      </if>
      <if test="website != null">
        website,
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id,
      </if>
      <if test="bailunCategoryName != null">
        bailun_category_name,
      </if>
      <if test="commissonMinimum != null">
        commisson_minimum,
      </if>
      <if test="commissonRate != null">
        commisson_rate,
      </if>
      <if test="totalSales != null">
        total_sales,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="platform != null">
        #{platform,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        #{website,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="bailunCategoryName != null">
        #{bailunCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="commissonMinimum != null">
        #{commissonMinimum,jdbcType=DECIMAL},
      </if>
      <if test="commissonRate != null">
        #{commissonRate,jdbcType=DECIMAL},
      </if>
      <if test="totalSales != null">
        #{totalSales,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        #{type,jdbcType=TINYINT},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcBaseOrderCommissonExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_base_order_commisson
    <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 dc_base_order_commisson
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.platform != null">
        platform = #{record.platform,jdbcType=VARCHAR},
      </if>
      <if test="record.website != null">
        website = #{record.website,jdbcType=VARCHAR},
      </if>
      <if test="record.bailunCategoryId != null">
        bailun_category_id = #{record.bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="record.bailunCategoryName != null">
        bailun_category_name = #{record.bailunCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="record.commissonMinimum != null">
        commisson_minimum = #{record.commissonMinimum,jdbcType=DECIMAL},
      </if>
      <if test="record.commissonRate != null">
        commisson_rate = #{record.commissonRate,jdbcType=DECIMAL},
      </if>
      <if test="record.totalSales != null">
        total_sales = #{record.totalSales,jdbcType=DECIMAL},
      </if>
      <if test="record.type != null">
        type = #{record.type,jdbcType=TINYINT},
      </if>
      <if test="record.gmtCreate != null">
        gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.gmtModified != null">
        gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
      </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 dc_base_order_commisson
    set id = #{record.id,jdbcType=INTEGER},
      platform = #{record.platform,jdbcType=VARCHAR},
      website = #{record.website,jdbcType=VARCHAR},
      bailun_category_id = #{record.bailunCategoryId,jdbcType=INTEGER},
      bailun_category_name = #{record.bailunCategoryName,jdbcType=VARCHAR},
      commisson_minimum = #{record.commissonMinimum,jdbcType=DECIMAL},
      commisson_rate = #{record.commissonRate,jdbcType=DECIMAL},
      total_sales = #{record.totalSales,jdbcType=DECIMAL},
      type = #{record.type,jdbcType=TINYINT},
      gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcBaseOrderCommisson">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_order_commisson
    <set>
      <if test="platform != null">
        platform = #{platform,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        website = #{website,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="bailunCategoryName != null">
        bailun_category_name = #{bailunCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="commissonMinimum != null">
        commisson_minimum = #{commissonMinimum,jdbcType=DECIMAL},
      </if>
      <if test="commissonRate != null">
        commisson_rate = #{commissonRate,jdbcType=DECIMAL},
      </if>
      <if test="totalSales != null">
        total_sales = #{totalSales,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=TINYINT},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcBaseOrderCommisson">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_base_order_commisson
    set platform = #{platform,jdbcType=VARCHAR},
      website = #{website,jdbcType=VARCHAR},
      bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
      bailun_category_name = #{bailunCategoryName,jdbcType=VARCHAR},
      commisson_minimum = #{commissonMinimum,jdbcType=DECIMAL},
      commisson_rate = #{commissonRate,jdbcType=DECIMAL},
      total_sales = #{totalSales,jdbcType=DECIMAL},
      type = #{type,jdbcType=TINYINT},
      gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOrderCommisson">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_base_order_commisson
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="platform != null">
        platform,
      </if>
      <if test="website != null">
        website,
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id,
      </if>
      <if test="bailunCategoryName != null">
        bailun_category_name,
      </if>
      <if test="commissonMinimum != null">
        commisson_minimum,
      </if>
      <if test="commissonRate != null">
        commisson_rate,
      </if>
      <if test="totalSales != null">
        total_sales,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="platform != null">
        #{platform,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        #{website,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="bailunCategoryName != null">
        #{bailunCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="commissonMinimum != null">
        #{commissonMinimum,jdbcType=DECIMAL},
      </if>
      <if test="commissonRate != null">
        #{commissonRate,jdbcType=DECIMAL},
      </if>
      <if test="totalSales != null">
        #{totalSales,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        #{type,jdbcType=TINYINT},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="platform != null">
        platform = #{platform,jdbcType=VARCHAR},
      </if>
      <if test="website != null">
        website = #{website,jdbcType=VARCHAR},
      </if>
      <if test="bailunCategoryId != null">
        bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER},
      </if>
      <if test="bailunCategoryName != null">
        bailun_category_name = #{bailunCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="commissonMinimum != null">
        commisson_minimum = #{commissonMinimum,jdbcType=DECIMAL},
      </if>
      <if test="commissonRate != null">
        commisson_rate = #{commissonRate,jdbcType=DECIMAL},
      </if>
      <if test="totalSales != null">
        total_sales = #{totalSales,jdbcType=DECIMAL},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=TINYINT},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcBaseOrderCommisson">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_base_order_commisson
    (id, platform, website, bailun_category_id, bailun_category_name, commisson_minimum, 
      commisson_rate, total_sales, type, gmt_create, gmt_modified)
    values
    (#{id,jdbcType=INTEGER}, #{platform,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, 
      #{bailunCategoryId,jdbcType=INTEGER}, #{bailunCategoryName,jdbcType=VARCHAR}, #{commissonMinimum,jdbcType=DECIMAL}, 
      #{commissonRate,jdbcType=DECIMAL}, #{totalSales,jdbcType=DECIMAL}, #{type,jdbcType=TINYINT}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    platform = #{platform,jdbcType=VARCHAR}, 
    website = #{website,jdbcType=VARCHAR}, 
    bailun_category_id = #{bailunCategoryId,jdbcType=INTEGER}, 
    bailun_category_name = #{bailunCategoryName,jdbcType=VARCHAR}, 
    commisson_minimum = #{commissonMinimum,jdbcType=DECIMAL}, 
    commisson_rate = #{commissonRate,jdbcType=DECIMAL}, 
    total_sales = #{totalSales,jdbcType=DECIMAL}, 
    type = #{type,jdbcType=TINYINT}, 
    gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
    gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcBaseOrderCommissonExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <include refid="Base_Column_List" />
    from dc_base_order_commisson
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
</mapper>