<?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.ssm.manage.mapper.CourseListMemberInitMapper">
  <resultMap id="BaseResultMap" type="com.ssm.manage.entity.CourseList">
    <!--
      WARNING - @mbg.generated
    -->
    <result column="is_cooperation" property="isCooperation" jdbcType="INTEGER"/>
    <result column="brokerage" property="brokerage" jdbcType="DECIMAL"/>
    <result column="id" jdbcType="BIGINT" property="id" />
    <result column="course_reatment_num" jdbcType="VARCHAR" property="courseReatmentNum" />
    <result column="date" jdbcType="TIMESTAMP" property="date" />
    <result column="member_id" jdbcType="BIGINT" property="memberId" />
    <result column="member_name" jdbcType="VARCHAR" property="memberName" />
    <result column="mobile_phone" jdbcType="VARCHAR" property="mobilePhone" />
    <result column="member_identity" jdbcType="VARCHAR" property="memberIdentity" />
    <result column="card" jdbcType="VARCHAR" property="card" />
    <result column="projct_id" jdbcType="BIGINT" property="projctId" />
    <result column="project_name" jdbcType="VARCHAR" property="projectName" />
    <result column="store_id" jdbcType="BIGINT" property="storeId" />
    <result column="store_name" jdbcType="VARCHAR" property="storeName" />
    <result column="minumum_times" jdbcType="INTEGER" property="minumumTimes" />
    <result column="price" jdbcType="DECIMAL" property="price" />
    <result column="minumum_price" jdbcType="DECIMAL" property="minumumPrice" />
    <result column="price_member" jdbcType="DECIMAL" property="priceMember" />
    <result column="minumum_price_member" jdbcType="DECIMAL" property="minumumPriceMember" />
    <result column="sales_price" jdbcType="DECIMAL" property="salesPrice" />
    <result column="number_times" jdbcType="INTEGER" property="numberTimes" />
    <result column="amount" jdbcType="DECIMAL" property="amount" />
    <result column="collection_cash_amount" jdbcType="DECIMAL" property="collectionCashAmount" />
    <result column="collection_integral_amount" jdbcType="DECIMAL" property="collectionIntegralAmount" />
    <result column="integral" jdbcType="INTEGER" property="integral" />
    <result column="collection_recharge_amount" jdbcType="DECIMAL" property="collectionRechargeAmount" />
    <result column="course_reatment_amount" jdbcType="DECIMAL" property="courseReatmentAmount" />
    <result column="sales_achievement" jdbcType="DECIMAL" property="salesAchievement" />
    <result column="sales_commission" jdbcType="DECIMAL" property="salesCommission" />
    <result column="card_sales_achievement" jdbcType="DECIMAL" property="cardSalesAchievement" />
    <result column="card_sales_commission" jdbcType="DECIMAL" property="cardSalesCommission" />
    <result column="achievement_amount" jdbcType="DECIMAL" property="achievementAmount" />
    <result column="commission_amount" jdbcType="DECIMAL" property="commissionAmount" />
    <result column="card_achievement_amount" jdbcType="DECIMAL" property="cardAchievementAmount" />
    <result column="card_commission_amount" jdbcType="DECIMAL" property="cardCommissionAmount" />
    <result column="sale_one_number" jdbcType="VARCHAR" property="saleOneNumber" />
    <result column="sale_two_number" jdbcType="VARCHAR" property="saleTwoNumber" />
    <result column="sale_three_number" jdbcType="VARCHAR" property="saleThreeNumber" />
    <result column="sale_four_number" jdbcType="VARCHAR" property="saleFourNumber" />
    <result column="sale_one_staff_id" jdbcType="BIGINT" property="saleOneStaffId" />
    <result column="sale_two_staff_id" jdbcType="BIGINT" property="saleTwoStaffId" />
    <result column="sale_three_staff_id" jdbcType="BIGINT" property="saleThreeStaffId" />
    <result column="sale_four_staff_id" jdbcType="BIGINT" property="saleFourStaffId" />
    <result column="sale_one_staff_name" jdbcType="VARCHAR" property="saleOneStaffName" />
    <result column="sale_two_staff_name" jdbcType="VARCHAR" property="saleTwoStaffName" />
    <result column="sale_three_staff_name" jdbcType="VARCHAR" property="saleThreeStaffName" />
    <result column="sale_four_staff_name" jdbcType="VARCHAR" property="saleFourStaffName" />
    <result column="sale_one_identity" jdbcType="VARCHAR" property="saleOneIdentity" />
    <result column="sale_two_identity" jdbcType="VARCHAR" property="saleTwoIdentity" />
    <result column="sale_three_identity" jdbcType="VARCHAR" property="saleThreeIdentity" />
    <result column="sale_four_identity" jdbcType="VARCHAR" property="saleFourIdentity" />
    <result column="sale_one_ratio" jdbcType="DECIMAL" property="saleOneRatio" />
    <result column="sale_two_ratio" jdbcType="DECIMAL" property="saleTwoRatio" />
    <result column="sale_three_ratio" jdbcType="DECIMAL" property="saleThreeRatio" />
    <result column="sale_four_ratio" jdbcType="DECIMAL" property="saleFourRatio" />
    <result column="manage_staff_id" jdbcType="BIGINT" property="manageStaffId" />
    <result column="manage_staff_name" jdbcType="VARCHAR" property="manageStaffName" />
    <result column="manage_identity" jdbcType="VARCHAR" property="manageIdentity" />
    <result column="manage_number" jdbcType="VARCHAR" property="manageNumber" />
    <result column="is_debt" jdbcType="INTEGER" property="isDebt" />
    <result column="cancel_date" jdbcType="TIMESTAMP" property="cancelDate" />
    <result column="debt_money" jdbcType="DECIMAL" property="debtMoney" />
    <result column="is_cancel" jdbcType="INTEGER" property="isCancel" />
    <result column="sale_one_achievement_amount" jdbcType="DECIMAL" property="saleOneAchievementAmount" />
    <result column="sale_two_achievement_amount" jdbcType="DECIMAL" property="saleTwoAchievementAmount" />
    <result column="sale_three_achievement_amount" jdbcType="DECIMAL" property="saleThreeAchievementAmount" />
    <result column="sale_four_achievement_amount" jdbcType="DECIMAL" property="saleFourAchievementAmount" />
    <result column="sale_one_commission_amount" jdbcType="DECIMAL" property="saleOneCommissionAmount" />
    <result column="sale_two_commission_amount" jdbcType="DECIMAL" property="saleTwoCommissionAmount" />
    <result column="sale_three_commission_amount" jdbcType="DECIMAL" property="saleThreeCommissionAmount" />
    <result column="sale_four_commission_amount" jdbcType="DECIMAL" property="saleFourCommissionAmount" />


    <result column="sale_five_number" jdbcType="VARCHAR" property="saleFiveNumber" />

    <result column="sale_five_staff_id" jdbcType="BIGINT" property="saleFiveStaffId" />

    <result column="sale_five_staff_name" jdbcType="VARCHAR" property="saleFiveStaffName" />

    <result column="sale_five_identity" jdbcType="VARCHAR" property="saleFiveIdentity" />

    <result column="sale_five_ratio" jdbcType="DECIMAL" property="saleFiveRatio" />

    <result column="sale_five_achievement_amount" jdbcType="DECIMAL" property="saleFiveAchievementAmount" />

    <result column="sale_five_commission_amount" jdbcType="DECIMAL" property="saleFiveCommissionAmount" />




    <result column="sale_seven_number" jdbcType="VARCHAR" property="saleSevenNumber" />

    <result column="sale_seven_staff_id" jdbcType="BIGINT" property="saleSevenStaffId" />

    <result column="sale_seven_staff_name" jdbcType="VARCHAR" property="saleSevenStaffName" />

    <result column="sale_seven_identity" jdbcType="VARCHAR" property="saleSevenIdentity" />

    <result column="sale_seven_ratio" jdbcType="DECIMAL" property="saleSevenRatio" />

    <result column="sale_seven_achievement_amount" jdbcType="DECIMAL" property="saleSevenAchievementAmount" />

    <result column="sale_seven_commission_amount" jdbcType="DECIMAL" property="saleSevenCommissionAmount" />



    <result column="sale_six_number" jdbcType="VARCHAR" property="saleSixNumber" />

    <result column="sale_six_staff_id" jdbcType="BIGINT" property="saleSixStaffId" />

    <result column="sale_six_staff_name" jdbcType="VARCHAR" property="saleSixStaffName" />

    <result column="sale_six_identity" jdbcType="VARCHAR" property="saleSixIdentity" />

    <result column="sale_six_ratio" jdbcType="DECIMAL" property="saleSixRatio" />

    <result column="sale_six_achievement_amount" jdbcType="DECIMAL" property="saleSixAchievementAmount" />

    <result column="sale_six_commission_amount" jdbcType="DECIMAL" property="saleSixCommissionAmount" />



    <result column="sale_eight_number" jdbcType="VARCHAR" property="saleEightNumber" />

    <result column="sale_eight_staff_id" jdbcType="BIGINT" property="saleEightStaffId" />

    <result column="sale_eight_staff_name" jdbcType="VARCHAR" property="saleEightStaffName" />

    <result column="sale_eight_identity" jdbcType="VARCHAR" property="saleEightIdentity" />

    <result column="sale_eight_ratio" jdbcType="DECIMAL" property="saleEightRatio" />

    <result column="sale_eight_achievement_amount" jdbcType="DECIMAL" property="saleEightAchievementAmount" />

    <result column="sale_eight_commission_amount" jdbcType="DECIMAL" property="saleEightCommissionAmount" />




    <result column="course_account_id" jdbcType="BIGINT" property="courseAccountId" />
    <result column="input_id" jdbcType="BIGINT" property="inputId" />
    <result column="input_by" jdbcType="VARCHAR" property="inputBy" />
    <result column="cancel_id" jdbcType="BIGINT" property="cancelId" />
    <result column="cancel_by" jdbcType="VARCHAR" property="cancelBy" />
    <result column="addition_date" jdbcType="DATE" property="additionDate" />
    <result column="is_addition" jdbcType="INTEGER" property="isAddition" />
    <result column="description" jdbcType="LONGVARCHAR" property="description" />
    <result column="project_num" jdbcType="VARCHAR" property="projectNum" />
  </resultMap>


  <resultMap id="StoreDailyMap" type="com.ssm.manage.extendEntity.StoreDaily">
    <!--
      WARNING - @mbg.generated
    -->
    <result column="date" property="date" jdbcType="TIMESTAMP"/>
    <result column="cash_people_num" jdbcType="INTEGER" property="cashPeopleNum" />
    <result column="cash_money" jdbcType="DECIMAL" property="cashMoney" />
    <result column="course_money" jdbcType="DECIMAL" property="courseMoney" />
    <result column="course_order_num" jdbcType="INTEGER" property="courseOrderNum" />
    <result column="recharge_money" jdbcType="DECIMAL" property="rechargeMoney" />
    <result column="recharge_order_num" jdbcType="INTEGER" property="rechargeOrderNum" />
    <result column="repay_money" jdbcType="DECIMAL" property="repayMoney" />
    <result column="refund_money" jdbcType="DECIMAL" property="refundMoney" />
    <result column="rec_negative_money" jdbcType="BIGINT" property="recNegativeMoney" />
    <result column="member_num" jdbcType="INTEGER" property="memberNum" />
    <result column="new_member_num" jdbcType="INTEGER" property="newMemberNum" />

    <result column="coursex_money" jdbcType="DECIMAL" property="coursexMoney" />
    <result column="coursek_money" jdbcType="DECIMAL" property="coursekMoney" />
    <result column="id" jdbcType="VARCHAR" property="id" />
    <result column="cash_cooperation" property="cooperateAmount"/>
    <result column="change_inpaymoney" jdbcType="DECIMAL" property="changeInPayMoney" />

  </resultMap>

  <sql id="BaseColumnList">
    a.id,
    a.course_reatment_num,
    a.date,
    a.member_id,
    a.member_name,
    a.mobile_phone,
    a.member_identity,
    a.card,
    a.projct_id,
    a.project_name,
    a.store_id,
    a.store_name,
    a.minumum_times,
    a.price,
    a.minumum_price,
    a.price_member,
    a.minumum_price_member,
    a.sales_price,
    a.number_times,
    a.amount,
    a.collection_cash_amount,
    a.collection_integral_amount,
    a.integral,
    a.collection_recharge_amount,
    a.course_reatment_amount,
    a.sales_achievement,
    a.sales_commission,
    a.card_sales_achievement,
    a.card_sales_commission,
    a.achievement_amount,
    a.commission_amount,
    a.card_achievement_amount,
    a.card_commission_amount,
    a.sale_one_number,
    a.sale_two_number,
    a.sale_three_number,
    a.sale_four_number,
    a.sale_one_staff_id,
    a.sale_two_staff_id,
    a.sale_three_staff_id,
    a.sale_four_staff_id,
    a.sale_one_staff_name,
    a.sale_two_staff_name,
    a.sale_three_staff_name,
    a.sale_four_staff_name,
    a.sale_one_identity,
    a.sale_two_identity,
    a.sale_three_identity,
    a.sale_four_identity,
    a.sale_one_ratio,
    a.sale_two_ratio,
    a.sale_three_ratio,
    a.sale_four_ratio,
    a.manage_staff_id,
    a.manage_staff_name,
    a.manage_identity,
    a.manage_number,
    a.is_debt,
    a.debt_money,
    a.is_cancel,
    a.cancel_date,
    a.sale_one_achievement_amount,
    a.sale_two_achievement_amount,
    a.sale_three_achievement_amount,
    a.sale_four_achievement_amount,
    a.sale_one_commission_amount,
    a.sale_two_commission_amount,
    a.sale_three_commission_amount,
    a.sale_four_commission_amount,

    a.sale_five_number,
    a.sale_five_staff_id,
    a.sale_five_staff_name,
    a.sale_five_identity,
    a.sale_five_ratio,
    a.sale_five_achievement_amount,
    a.sale_five_commission_amount,

    a.sale_six_number,
    a.sale_six_staff_id,
    a.sale_six_staff_name,
    a.sale_six_identity,
    a.sale_six_ratio,
    a.sale_six_achievement_amount,
    a.sale_six_commission_amount,

    a.sale_seven_number,
    a.sale_seven_staff_id,
    a.sale_seven_staff_name,
    a.sale_seven_identity,
    a.sale_seven_ratio,
    a.sale_seven_achievement_amount,
    a.sale_seven_commission_amount,


    a.sale_eight_number,
    a.sale_eight_staff_id,
    a.sale_eight_staff_name,
    a.sale_eight_identity,
    a.sale_eight_ratio,
    a.sale_eight_achievement_amount,
    a.sale_eight_commission_amount,


    a.course_account_id,
    a.description,
    a.input_id,
    a.input_by,
    a.cancel_id,
    a.cancel_by,
    a.addition_date,
    a.is_addition,
    a.project_num
  </sql>
  <select id="selectPage" parameterType="com.ssm.manage.query.CourseListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_member_init a
    <where>
      <if test="id != null">
        and a.id = #{id,jdbcType = BIGINT}
      </if>
      <if test="storeId != null">
        and a.store_id = #{storeId,jdbcType = BIGINT}
      </if>
      <if test="isCancel != null">
        and a.is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and a.date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>

      <if test="courseReatmentNum != null">
        and a.course_reatment_num like concat('%',concat( #{courseReatmentNum, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="memberName != null">
        and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="mobilePhone != null">
        and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
      </if>

      <if test="startTime != null and endTime != null">
        and a.date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
      </if>
    </where>
    order by id desc
  </select>

  <select id="selectPageNew" parameterType="com.ssm.manage.query.CourseListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_member_init a
    <where>
      <if test="id != null">
        and a.id = #{id,jdbcType = BIGINT}
      </if>
      <if test="storeList!= null and storeList.size() >0">
        and a.store_id  in
        <foreach collection="storeList" item="storeId" index="index" open="(" close=")" separator=",">
          #{storeId}
        </foreach>
      </if>
      <if test="isCancel != null">
        and a.is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and a.date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>

      <if test="courseReatmentNum != null">
        and a.course_reatment_num like concat('%',concat( #{courseReatmentNum, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="memberName != null">
        and a.member_name like concat('%',concat( #{memberName, jdbcType = VARCHAR}, '%'))
      </if>
      <if test="mobilePhone != null">
        and a.mobile_phone like concat('%',concat( #{mobilePhone, jdbcType = VARCHAR}, '%'))
      </if>

      <if test="startTime != null and endTime != null">
        and a.date between #{startTime, jdbcType = TIMESTAMP} and #{endTime, jdbcType = TIMESTAMP}
      </if>
      <if test="collectionRechargeAmount != null">
        and a.collection_recharge_amount >0
      </if>
    </where>
    order by course_reatment_num desc
  </select>

  <select id="selectPages" parameterType="com.ssm.manage.query.CourseListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_member_init a
    <where>
      id=#{id}
    </where>
  </select>
  <select id="selectCourseOne" parameterType="com.ssm.manage.query.CourseListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_member_init a
    <where>
      course_reatment_num=#{docId}
    <if test="projctId!=null">
      and projct_id = #{projctId}
    </if>
    </where>
  </select>

  <select id="createTable">
    create table IF NOT EXISTS course_list_${tab} like course_list
  </select>

  <select id="getDocNum" parameterType="com.ssm.manage.query.CourseListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_${tab} a
    where store_id = #{storeId,jdbcType = BIGINT} and course_reatment_num like concat(#{selectDate,jdbcType = VARCHAR},'%')
    order by course_reatment_num desc
  </select>

  <insert id="addCourse" parameterType="com.ssm.manage.entity.CourseList">
    insert into course_list_member_init
    (id,
    course_reatment_num,
    date,
    member_id,
    member_name,
    mobile_phone,
    member_identity,
    card,
    projct_id,
    project_name,
    store_id,
    store_name,
    minumum_times,
    price,
    minumum_price,
    price_member,
    minumum_price_member,
    sales_price,
    number_times,
    amount,
    collection_cash_amount,
    collection_integral_amount,
    integral,
    collection_recharge_amount,
    course_reatment_amount,
    sales_achievement,
    sales_commission,
    card_sales_achievement,
    card_sales_commission,
    <if test="isCooperation != null">
      is_cooperation,
    </if>
     <if test="brokerage != null">
       brokerage,
     </if>
    <if test="achievementAmount != null">
      achievement_amount,
    </if>
    <if test="commissionAmount != null">
      commission_amount,
    </if>
    <if test="cardAchievementAmount != null">
      card_achievement_amount,
    </if>
    <if test="cardCommissionAmount != null">
      card_commission_amount,
    </if>
    sale_one_number,
    sale_two_number,
    sale_three_number,
    sale_four_number,
    sale_one_staff_id,
    sale_two_staff_id,
    sale_three_staff_id,
    sale_four_staff_id,
    sale_one_staff_name,
    sale_two_staff_name,
    sale_three_staff_name,
    sale_four_staff_name,
    sale_one_identity,
    sale_two_identity,
    sale_three_identity,
    sale_four_identity,
    sale_one_ratio,
    sale_two_ratio,
    sale_three_ratio,
    sale_four_ratio,
    manage_staff_id,
    manage_staff_name,
    manage_identity,
    manage_number,
    is_debt,
    debt_money,
    is_cancel,
    cancel_date,
    sale_one_achievement_amount,
    sale_two_achievement_amount,
    sale_three_achievement_amount,
    sale_four_achievement_amount,
    sale_one_commission_amount,
    sale_two_commission_amount,
    sale_three_commission_amount,
    sale_four_commission_amount,

    sale_five_number,
    sale_five_staff_id,
    sale_five_staff_name,
    sale_five_identity,
    sale_five_ratio,
    sale_five_achievement_amount,
    sale_five_commission_amount,

    sale_six_number,
    sale_six_staff_id,
    sale_six_staff_name,
    sale_six_identity,
    sale_six_ratio,
    sale_six_achievement_amount,
    sale_six_commission_amount,

    sale_seven_number,
    sale_seven_staff_id,
    sale_seven_staff_name,
    sale_seven_identity,
    sale_seven_ratio,
    sale_seven_achievement_amount,
    sale_seven_commission_amount,

    sale_eight_number,
    sale_eight_staff_id,
    sale_eight_staff_name,
    sale_eight_identity,
    sale_eight_ratio,
    sale_eight_achievement_amount,
    sale_eight_commission_amount,



    course_account_id,
    description,
    input_id,
    input_by,
    cancel_id,
    cancel_by,
    addition_date,
    is_addition,
    project_num
    )values (
    #{id, jdbcType=BIGINT},
    #{courseReatmentNum, jdbcType=VARCHAR},
    #{date, jdbcType=TIMESTAMP},
    #{memberId, jdbcType=BIGINT},
    #{memberName, jdbcType=VARCHAR},
    #{mobilePhone, jdbcType=VARCHAR},
    #{memberIdentity, jdbcType=VARCHAR},
    #{card, jdbcType=VARCHAR},
    #{projctId, jdbcType=BIGINT},
    #{projectName, jdbcType=VARCHAR},
    #{storeId, jdbcType=BIGINT},
    #{storeName, jdbcType=VARCHAR},
    #{minumumTimes, jdbcType=INTEGER},
    #{price, jdbcType=DECIMAL},
    #{minumumPrice, jdbcType=DECIMAL},
    #{priceMember, jdbcType=DECIMAL},
    #{minumumPriceMember, jdbcType=DECIMAL},
    #{salesPrice, jdbcType=DECIMAL},
    #{numberTimes, jdbcType=INTEGER},
    #{amount, jdbcType=DECIMAL},
    #{collectionCashAmount, jdbcType=DECIMAL},
    #{collectionIntegralAmount, jdbcType=DECIMAL},
    #{integral, jdbcType=INTEGER},
    #{collectionRechargeAmount, jdbcType=DECIMAL},
    #{courseReatmentAmount, jdbcType=DECIMAL},
    #{salesAchievement, jdbcType=DECIMAL},
    #{salesCommission, jdbcType=DECIMAL},
    #{cardSalesAchievement, jdbcType=DECIMAL},
    #{cardSalesCommission, jdbcType=DECIMAL},
    <if test="isCooperation != null">
      #{isCooperation,jdbcType=INTEGER},
    </if>
    <if test="brokerage != null">
      #{brokerage,jdbcType=DECIMAL},
    </if>
    <if test="achievementAmount != null">
      #{achievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="commissionAmount != null">
      #{commissionAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardAchievementAmount != null">
      #{cardAchievementAmount, jdbcType=DECIMAL},
    </if>
    <if test="cardCommissionAmount != null">
      #{cardCommissionAmount, jdbcType=DECIMAL},
    </if>
    #{saleOneNumber, jdbcType=VARCHAR},
    #{saleTwoNumber, jdbcType=VARCHAR},
    #{saleThreeNumber, jdbcType=VARCHAR},
    #{saleFourNumber, jdbcType=VARCHAR},
    #{saleOneStaffId, jdbcType=BIGINT},
    #{saleTwoStaffId, jdbcType=BIGINT},
    #{saleThreeStaffId, jdbcType=BIGINT},
    #{saleFourStaffId, jdbcType=BIGINT},
    #{saleOneStaffName, jdbcType=VARCHAR},
    #{saleTwoStaffName, jdbcType=VARCHAR},
    #{saleThreeStaffName, jdbcType=VARCHAR},
    #{saleFourStaffName, jdbcType=VARCHAR},
    #{saleOneIdentity, jdbcType=VARCHAR},
    #{saleTwoIdentity, jdbcType=VARCHAR},
    #{saleThreeIdentity, jdbcType=VARCHAR},
    #{saleFourIdentity, jdbcType=VARCHAR},
    #{saleOneRatio, jdbcType=DECIMAL},
    #{saleTwoRatio, jdbcType=DECIMAL},
    #{saleThreeRatio, jdbcType=DECIMAL},
    #{saleFourRatio, jdbcType=DECIMAL},
    #{manageStaffId, jdbcType=BIGINT},
    #{manageStaffName, jdbcType=VARCHAR},
    #{manageIdentity, jdbcType=VARCHAR},
    #{manageNumber, jdbcType=VARCHAR},
    #{isDebt, jdbcType=INTEGER},
    #{debtMoney, jdbcType=DECIMAL},
    #{isCancel, jdbcType=INTEGER},
    #{cancelDate, jdbcType=TIMESTAMP},
    #{saleOneAchievementAmount, jdbcType=DECIMAL},
    #{saleTwoAchievementAmount, jdbcType=DECIMAL},
    #{saleThreeAchievementAmount, jdbcType=DECIMAL},
    #{saleFourAchievementAmount, jdbcType=DECIMAL},
    #{saleOneCommissionAmount, jdbcType=DECIMAL},
    #{saleTwoCommissionAmount, jdbcType=DECIMAL},
    #{saleThreeCommissionAmount, jdbcType=DECIMAL},
    #{saleFourCommissionAmount, jdbcType=DECIMAL},

    #{saleFiveNumber, jdbcType=VARCHAR},
    #{saleFiveStaffId, jdbcType=BIGINT},
    #{saleFiveStaffName, jdbcType=VARCHAR},
    #{saleFiveIdentity, jdbcType=VARCHAR},
    #{saleFiveRatio, jdbcType=DECIMAL},
    #{saleFiveAchievementAmount, jdbcType=DECIMAL},
    #{saleFiveCommissionAmount, jdbcType=DECIMAL},

    #{saleSixNumber, jdbcType=VARCHAR},
    #{saleSixStaffId, jdbcType=BIGINT},
    #{saleSixStaffName, jdbcType=VARCHAR},
    #{saleSixIdentity, jdbcType=VARCHAR},
    #{saleSixRatio, jdbcType=DECIMAL},
    #{saleSixAchievementAmount, jdbcType=DECIMAL},
    #{saleSixCommissionAmount, jdbcType=DECIMAL},

    #{saleSevenNumber, jdbcType=VARCHAR},
    #{saleSevenStaffId, jdbcType=BIGINT},
    #{saleSevenStaffName, jdbcType=VARCHAR},
    #{saleSevenIdentity, jdbcType=VARCHAR},
    #{saleSevenRatio, jdbcType=DECIMAL},
    #{saleSevenAchievementAmount, jdbcType=DECIMAL},
    #{saleSevenCommissionAmount, jdbcType=DECIMAL},

    #{saleEightNumber, jdbcType=VARCHAR},
    #{saleEightStaffId, jdbcType=BIGINT},
    #{saleEightStaffName, jdbcType=VARCHAR},
    #{saleEightIdentity, jdbcType=VARCHAR},
    #{saleEightRatio, jdbcType=DECIMAL},
    #{saleEightAchievementAmount, jdbcType=DECIMAL},
    #{saleEightCommissionAmount, jdbcType=DECIMAL},



    #{courseAccountId, jdbcType=BIGINT},
    #{description, jdbcType=LONGVARCHAR},
    #{inputId, jdbcType=BIGINT},
    #{inputBy, jdbcType=VARCHAR},
    #{cancelId, jdbcType=BIGINT},
    #{cancelBy, jdbcType=VARCHAR},
    #{additionDate, jdbcType=TIMESTAMP},
    #{isAddition,jdbcType = INTEGER},
    #{projectNum,jdbcType = VARCHAR}
    )
  </insert>

  <update id="cancel" parameterType="com.ssm.manage.entity.CourseList">
    update course_list_member_init
    <set>
      <if test="isCancel != null">
        is_cancel = #{isCancel, jdbcType = INTEGER},
      </if>
      <if test="cancelDate != null">
        cancel_date = #{cancelDate, jdbcType=TIMESTAMP},
      </if>
      <if test="cancelId != null">
        cancel_id = #{cancelId, jdbcType = BIGINT},
      </if>
      <if test="cancelBy != null">
        cancel_by = #{cancelBy, jdbcType = VARCHAR},
      </if>
      <if test="achievementAmount != null">
        achievement_amount = #{achievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="commissionAmount != null">
        commission_amount = #{commissionAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardAchievementAmount != null">
        card_achievement_amount = #{cardAchievementAmount, jdbcType = DECIMAL},
      </if>
      <if test="cardCommissionAmount != null">
        card_commission_amount = #{cardCommissionAmount, jdbcType = DECIMAL}
      </if>
      <where>
        id = #{id, jdbcType = BIGINT}
      </where>
    </set>
  </update>

  <update id="updateStaff" parameterType="com.ssm.manage.entity.CourseList">
    update course_list_member_init
    <set>
      <!--&lt;if test="saleOneNumber != null"&gt;-->
      sale_one_number = #{saleOneNumber, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleTwoNumber != null"&gt;-->
      sale_two_number = #{saleTwoNumber, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleThreeNumber != null"&gt;-->
      sale_three_number = #{saleThreeNumber, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleFourNumber != null"&gt;-->
      sale_four_number = #{saleFourNumber, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleOneStaffId != null"&gt;-->
      sale_one_staff_id = #{saleOneStaffId, jdbcType = BIGINT},
      <!--&lt;/if&gt;
      &lt;if test="saleTwoStaffId != null"&gt;-->
      sale_two_staff_id = #{saleTwoStaffId, jdbcType = BIGINT},
      <!--&lt;/if&gt;
      &lt;if test="saleThreeStaffId != null"&gt;-->
      sale_three_staff_id = #{saleThreeStaffId, jdbcType = BIGINT},
      <!--&lt;/if&gt;
      &lt;if test="saleFourStaffId != null"&gt;-->
      sale_four_staff_id = #{saleFourStaffId, jdbcType = BIGINT},
      <!--&lt;/if&gt;
      &lt;if test="saleOneStaffName != null"&gt;-->
      sale_one_staff_name = #{saleOneStaffName, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleTwoStaffName != null"&gt;-->
      sale_two_staff_name = #{saleTwoStaffName, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleThreeStaffName != null"&gt;-->
      sale_three_staff_name = #{saleThreeStaffName, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleFourStaffName != null"&gt;-->
      sale_four_staff_name = #{saleFourStaffName, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleOneIdentity != null"&gt;-->
      sale_one_identity = #{saleOneIdentity, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleTwoIdentity != null"&gt;-->
      sale_two_identity = #{saleTwoIdentity, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleThreeIdentity != null"&gt;-->
      sale_three_identity = #{saleThreeIdentity, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleFourIdentity != null"&gt;-->
      sale_four_identity = #{saleFourIdentity, jdbcType = VARCHAR},
      <!--&lt;/if&gt;
      &lt;if test="saleOneRatio != null"&gt;-->
      sale_one_ratio = #{saleOneRatio, jdbcType = DECIMAL},
      <!--&lt;/if&gt;
      &lt;if test="saleTwoRatio != null"&gt;-->
      sale_two_ratio = #{saleTwoRatio, jdbcType = DECIMAL},
      <!--&lt;/if&gt;
      &lt;if test="saleThreeRatio != null"&gt;-->
      sale_three_ratio = #{saleThreeRatio, jdbcType = DECIMAL},
      <!--&lt;/if&gt;
      &lt;if test="saleFourRatio != null"&gt; &lt;/if&gt;-->
      sale_four_ratio = #{saleFourRatio, jdbcType = DECIMAL},

      sale_five_number = #{saleFiveNumber, jdbcType = VARCHAR},
      sale_five_staff_id = #{saleFiveStaffId, jdbcType = BIGINT},
      sale_five_staff_name = #{saleFiveStaffName, jdbcType = VARCHAR},
      sale_five_identity = #{saleFiveIdentity, jdbcType = VARCHAR},
      sale_five_ratio = #{saleFiveRatio, jdbcType = DECIMAL},

      sale_six_number = #{saleSixNumber, jdbcType = VARCHAR},
      sale_six_staff_id = #{saleSixStaffId, jdbcType = BIGINT},
      sale_six_staff_name = #{saleSixStaffName, jdbcType = VARCHAR},
      sale_six_identity = #{saleSixIdentity, jdbcType = VARCHAR},
      sale_six_ratio = #{saleSixRatio, jdbcType = DECIMAL},

      sale_seven_number = #{saleSevenNumber, jdbcType = VARCHAR},
      sale_seven_staff_id = #{saleSevenStaffId, jdbcType = BIGINT},
      sale_seven_staff_name = #{saleSevenStaffName, jdbcType = VARCHAR},
      sale_seven_identity = #{saleSevenIdentity, jdbcType = VARCHAR},
      sale_seven_ratio = #{saleSevenRatio, jdbcType = DECIMAL},

      sale_eight_number = #{saleEightNumber, jdbcType = VARCHAR},
      sale_eight_staff_id = #{saleEightStaffId, jdbcType = BIGINT},
      sale_eight_staff_name = #{saleEightStaffName, jdbcType = VARCHAR},
      sale_eight_identity = #{saleEightIdentity, jdbcType = VARCHAR},
      sale_eight_ratio = #{saleEightRatio, jdbcType = DECIMAL}

    </set>
    <where>
      id = #{id, jdbcType = BIGINT}
    </where>
  </update>

  <select id="selectDayRecordAndAmount" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select count(course_reatment_amount) as course_order_num, sum(course_reatment_amount) as course_money,
    sum(collection_cash_amount) as coursex_money,sum(collection_recharge_amount) as coursek_money,
    sum(achievement_amount) as achievementAmount,sum(card_achievement_amount) as cardAcievementAmount,
    (SUM(case WHEN is_cooperation=1 THEN brokerage/100*collection_cash_amount ELSE 0 END)+
    SUM(case WHEN is_cooperation=2 THEN brokerage/amount*collection_cash_amount ELSE 0 END))AS cash_cooperation
    from course_list_${tab}
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>
  <select id="selectDayRecord" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select count(course_reatment_amount) as course_order_num, sum(course_reatment_amount) as course_money,
    sum(collection_cash_amount) as coursex_money,sum(collection_recharge_amount) as coursek_money
    from course_list_${tab}
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>

  <select id="selectDayRecord1" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select id
    from course_list_${tab}
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>
  <resultMap id="selectDocId" type="com.ssm.manage.extendEntity.StoreDaily">
    <!--
      WARNING - @mbg.generated
    -->
    <result column="course_reatment_num" jdbcType="VARCHAR" property="docId"/>
    <result column="cash_people_num" jdbcType="INTEGER" property="cashPeopleNum" />
    <result column="cash_money" jdbcType="DECIMAL" property="cashMoney" />
    <result column="course_money" jdbcType="DECIMAL" property="courseMoney" />
    <result column="course_order_num" jdbcType="INTEGER" property="courseOrderNum" />
    <result column="recharge_money" jdbcType="DECIMAL" property="rechargeMoney" />
    <result column="recharge_order_num" jdbcType="INTEGER" property="rechargeOrderNum" />
    <result column="repay_money" jdbcType="DECIMAL" property="repayMoney" />
    <result column="refund_money" jdbcType="DECIMAL" property="refundMoney" />
    <result column="rec_negative_money" jdbcType="BIGINT" property="recNegativeMoney" />
    <result column="member_num" jdbcType="INTEGER" property="memberNum" />
    <result column="new_member_num" jdbcType="INTEGER" property="newMemberNum" />

    <result column="coursex_money" jdbcType="DECIMAL" property="coursexMoney" />
    <result column="coursek_money" jdbcType="DECIMAL" property="coursekMoney" />
    <result column="id" jdbcType="VARCHAR" property="id" />

    <result column="change_inpaymoney" jdbcType="DECIMAL" property="changeInPayMoney" />
  </resultMap>

  <select id="selectDocId" resultMap="selectDocId" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select distinct course_reatment_num
    from course_list_${tab}
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>

  <select id="selectOutcourse" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select sum(change_in_pay_money) as change_inpaymoney from card_change_list
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      and state = 3
      <if test="dateStr != null">
        and doc_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>

  <select id="selectOutcourse1" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select doc_num as id from card_change_list
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      and state = 3
      <if test="dateStr != null">
        and doc_date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>


  <select id="NegativeKazin" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select sum(course_reatment_amount) as course_money,sum(collection_recharge_amount) as recharge_money from course_list_${tab}
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="dateStr != null">
        and date like concat( #{dateStr, jdbcType = VARCHAR}, '%')
      </if>
    </where>
  </select>

  <select id="selectListSalem" parameterType="com.ssm.manage.entity.CourseList" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_member_init a
    <where>
      <if test="id != null">
        and a.id = #{id,jdbcType = BIGINT}
      </if>
      <if test="projctId != null">
        and a.projct_id = #{projctId,jdbcType = BIGINT}
      </if>
      <if test="storeId != null">
        and a.store_id = #{storeId,jdbcType = BIGINT}
      </if>
      <if test="courseReatmentNum != null">
        and a.course_reatment_num like concat( #{courseReatmentNum, jdbcType = VARCHAR}, '%')
      </if>
      <if test="isCancel != null">
        and a.is_cancel = #{isCancel,jdbcType = BIGINT}
      </if>
      <if test="memberId != null">
        and member_id = #{memberId, jdbcType = BIGINT}
      </if>
    </where>
  </select>

  <select id="selectOneS" parameterType="com.ssm.manage.entity.CourseList" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_${tab} a
    <where>
      <if test="id != null">
        and a.id = #{id,jdbcType = BIGINT}
      </if>
    </where>
  </select>
  <select id="selectList" parameterType="com.ssm.manage.query.CourseListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_member_init a
    <where>
      <if test="id != null">
        and a.id = #{id,jdbcType = BIGINT}
      </if>
      <if test="projctId != null">
        and a.projct_id = #{projctId,jdbcType = BIGINT}
      </if>
      <if test="storeId != null">
        and a.store_id = #{storeId,jdbcType = BIGINT}
      </if>
      <if test="courseReatmentNum != null">
        and a.course_reatment_num like concat( #{courseReatmentNum, jdbcType = VARCHAR}, '%')
      </if>
      <if test="isCancel != null">
        and a.is_cancel = #{isCancel,jdbcType = BIGINT}
      </if>
      <if test="memberId != null">
        and a.member_id = #{memberId, jdbcType = BIGINT}
      </if>
    </where>
  </select>

  <select id="selectList2" parameterType="com.ssm.manage.query.CourseListRequest" resultMap="BaseResultMap">
    select <include refid="BaseColumnList" /> from course_list_${tab} a
    <where>
      <if test="courseReatmentNum != null">
        and a.course_reatment_num = #{id,jdbcType = BIGINT}
      </if>

    </where>
  </select>
    <select id="selectByDay" resultMap="selectByDay">
      select store_id,date,sum(ifnull(course_reatment_amount,0)) as course_reatment_amount, sum(ifnull(debt_money,0)) as debt_money,count(*) as course_rows,
          sum(ifnull(collection_recharge_amount,0)) as collection_recharge_amount
      from(
        select store_id,date(date) as date,course_reatment_num,sum(ifnull(collection_cash_amount,0)) as course_reatment_amount, sum(ifnull(debt_money,0)) as debt_money,
          sum(ifnull(collection_recharge_amount,0)) as collection_recharge_amount
      from course_list_${tab}
        where is_cancel = '0' and store_id in
      <foreach collection="storeIds" close=")" open="(" item="item" separator=",">
        #{item}
      </foreach>
      and date between #{startTime} and #{endTime}
        group by store_id,date(date),course_reatment_num) course group by store_id,date

    </select>
  <select id="selectCourseCoopation" resultMap="selectByDay">
    SELECT store_id,date(date) as date,
      (SUM(case WHEN is_cooperation=1 THEN brokerage/100*collection_cash_amount ELSE 0 END)+
      SUM(case WHEN is_cooperation=2 THEN brokerage/amount*collection_cash_amount ELSE 0 END))AS cash_cooperation
    from course_list_${tab}
    WHERE is_cancel = '0'
    AND date between #{startTime} AND #{endTime}
    AND store_id IN
    <foreach collection="storeIds" close=")" open="(" separator="," item="item">
        #{item}
    </foreach>
    GROUP BY store_id,date(date)
  </select>
  <select id="selectCourseByProjectAndDocId" resultMap="BaseResultMap">
    select *
    from course_list_${tab}
    where projct_id = #{projctId} and course_reatment_num = #{courseReatmentNum}
  </select>
  <select id="selectByDayGroupByDateAndStoreId" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select SUBSTRING( date, 1, 10 ) as date,store_id,store_name,count(course_reatment_amount) as course_order_num, sum(course_reatment_amount) as course_money,
    sum(collection_cash_amount) as coursex_money,sum(collection_recharge_amount) as coursek_money
    from course_list_${tab}
    where is_cancel = 0
    and date between #{startDate} and #{endDate}
    GROUP BY
      SUBSTRING( date, 1, 10 ),
      store_id
  </select>
  <select id="selectByDate" resultMap="BaseResultMap" parameterType="com.ssm.manage.query.CourseListRequest">
    select * from course_list_member_init where store_id in
    <foreach collection="storeIds" item="item" separator="," close=")" open="(">
      #{item}
    </foreach>
    <if test="memberInitList!=null">
      and SUBSTR(date,1,7) = #{memberInitList}
    </if>
  </select>
  <select id="selectGroupCourse" resultMap="BaseResultMap">
    select * from course_list_${tab} where date between #{startTime} and #{endTime}  and store_id in
    <foreach collection="storeIds" item="item" separator="," close=")" open="(">
      #{item}
    </foreach>
    <if test="isCancel != null ">
      and is_cancel = #{isCancel}
    </if>
  </select>
  <select id="NegativeKazinByDate" resultMap="StoreDailyMap" parameterType="com.ssm.manage.query.StoreDailyRequest">
    select sum(course_reatment_amount) as course_money,sum(collection_recharge_amount) as recharge_money from course_list_member_init
    <where>
      store_id = #{storeId, jdbcType = BIGINT}
      <if test="isCancel != null">
        and is_cancel = #{isCancel, jdbcType = INTEGER}
      </if>
      <if test="startTime != null">
        and date between #{startTime} and #{endTime}
      </if>
    </where>

  </select>


  <resultMap id="selectByDay" type="com.ssm.manage.response.CourseDayVo">
    <result column="store_id" property="storeId"/>
    <result column="date" property="date"/>
    <result column="course_reatment_amount" property="courseReatmentAmount"/>
    <result column="debt_money" property="debtMoney"/>
    <result column="collection_recharge_amount" property="collectionRechargeAmount"/>
    <result column="course_rows" property="courseRows"/>
    <result column="cash_cooperation" property="cashCooperation"/>
  </resultMap>


    <update id="updateOne" parameterType="com.ssm.manage.entity.CourseList">
    update course_list_${tab}
    <set>
      sales_achievement = #{salesAchievement, jdbcType = DECIMAL},
      sales_commission = #{salesCommission, jdbcType = DECIMAL},
      card_sales_achievement = #{cardSalesAchievement, jdbcType = DECIMAL},
      card_sales_commission = #{cardSalesCommission, jdbcType = DECIMAL},
      achievement_amount = #{achievementAmount, jdbcType = DECIMAL},
      commission_amount = #{commissionAmount, jdbcType = DECIMAL},
      card_achievement_amount = #{cardAchievementAmount, jdbcType = DECIMAL},
      card_commission_amount = #{cardCommissionAmount, jdbcType = DECIMAL},
      is_cooperation = #{isCooperation,jdbcType=INTEGER},
      brokerage = #{brokerage,jdbcType=DECIMAL}
    </set>
    <where>
      id = #{id, jdbcType = BIGINT}
    </where>
  </update>
  <update id="updateProjectAchi">
    update course_list_member_init
    <set>
      sales_achievement = #{salesAchievement, jdbcType = DECIMAL},
      sales_commission = #{salesCommission, jdbcType = DECIMAL},
      card_sales_achievement = #{cardSalesAchievement, jdbcType = DECIMAL},
      card_sales_commission = #{cardSalesCommission, jdbcType = DECIMAL},
      achievement_amount = #{achievementAmount, jdbcType = DECIMAL},
      commission_amount = #{commissionAmount, jdbcType = DECIMAL},
      card_achievement_amount = #{cardAchievementAmount, jdbcType = DECIMAL},
      card_commission_amount = #{cardCommissionAmount, jdbcType = DECIMAL},
      is_cooperation = #{isCooperation,jdbcType=INTEGER},
      brokerage = #{brokerage,jdbcType=DECIMAL}
    </set>
    <where>
      id = #{id, jdbcType = BIGINT}
    </where>
  </update>
</mapper>