<?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="org.linlinjava.jz.db.dao.ContractSubMapper">
  <resultMap id="BaseResultMap" type="org.linlinjava.jz.db.domain.ContractSub">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="master_contract_id" jdbcType="BIGINT" property="masterContractId" />
    <result column="master_contract_no" jdbcType="VARCHAR" property="masterContractNo" />
    <result column="sub_contract_no" jdbcType="VARCHAR" property="subContractNo" />
    <result column="sub_order_no" jdbcType="VARCHAR" property="subOrderNo" />
    <result column="clue_no" jdbcType="VARCHAR" property="clueNo" />
    <result column="customer_client_id" jdbcType="BIGINT" property="customerClientId" />
    <result column="servant_id" jdbcType="BIGINT" property="servantId" />
    <result column="servant_name" jdbcType="VARCHAR" property="servantName" />
    <result column="worker_fra_id" jdbcType="BIGINT" property="workerFraId" />
    <result column="worker_no" jdbcType="VARCHAR" property="workerNo" />
    <result column="rest_day" jdbcType="VARCHAR" property="restDay" />
    <result column="contract_state" jdbcType="INTEGER" property="contractState" />
    <result column="contract_type" jdbcType="INTEGER" property="contractType" />
    <result column="file_id" jdbcType="VARCHAR" property="fileId" />
    <result column="service_type" jdbcType="INTEGER" property="serviceType" />
    <result column="service_model" jdbcType="INTEGER" property="serviceModel" />
    <result column="payable_intermediary_cost" jdbcType="DOUBLE" property="payableIntermediaryCost" />
    <result column="actual_intermediary_cost" jdbcType="DOUBLE" property="actualIntermediaryCost" />
    <result column="firstmonth_salary" jdbcType="DOUBLE" property="firstmonthSalary" />
    <result column="payable_firstmonth_salary" jdbcType="DOUBLE" property="payableFirstmonthSalary" />
    <result column="payment_firstmonth_salary" jdbcType="DOUBLE" property="paymentFirstmonthSalary" />
    <result column="obligations_firstmonth_salary" jdbcType="DOUBLE" property="obligationsFirstmonthSalary" />
    <result column="surplus_salary" jdbcType="DOUBLE" property="surplusSalary" />
    <result column="service_start_time" jdbcType="VARCHAR" property="serviceStartTime" />
    <result column="service_end_time" jdbcType="VARCHAR" property="serviceEndTime" />
    <result column="contract_start_date" jdbcType="DATE" property="contractStartDate" />
    <result column="contract_end_date" jdbcType="DATE" property="contractEndDate" />
    <result column="shanghu_date" jdbcType="DATE" property="shanghuDate" />
    <result column="xiahu_date" jdbcType="DATE" property="xiahuDate" />
    <result column="actual_service_days" jdbcType="VARCHAR" property="actualServiceDays" />
    <result column="service_duration" jdbcType="DOUBLE" property="serviceDuration" />
    <result column="hourly_salary" jdbcType="DOUBLE" property="hourlySalary" />
    <result column="settlement" jdbcType="BIT" property="settlement" />
    <result column="accept_orders" jdbcType="INTEGER" property="acceptOrders" />
    <result column="review_type" jdbcType="INTEGER" property="reviewType" />
    <result column="cancel_file_id" jdbcType="VARCHAR" property="cancelFileId" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
    <result column="reject_reason" jdbcType="VARCHAR" property="rejectReason" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </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, master_contract_id, master_contract_no, sub_contract_no, sub_order_no, clue_no, 
    customer_client_id, servant_id, servant_name, worker_fra_id, worker_no, rest_day, 
    contract_state, contract_type, file_id, service_type, service_model, payable_intermediary_cost, 
    actual_intermediary_cost, firstmonth_salary, payable_firstmonth_salary, payment_firstmonth_salary, 
    obligations_firstmonth_salary, surplus_salary, service_start_time, service_end_time, 
    contract_start_date, contract_end_date, shanghu_date, xiahu_date, actual_service_days, 
    service_duration, hourly_salary, settlement, accept_orders, review_type, cancel_file_id, 
    create_time, create_user_id, update_time, update_user_id, reject_reason, remark
  </sql>
  <select id="selectByExample" parameterType="org.linlinjava.jz.db.domain.ContractSubExample" 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 contract_sub
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="example != null and example.distinct">
      distinct
    </if>
    <choose>
      <when test="selective != null and selective.length > 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from contract_sub
    <if test="example != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example != null and example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from contract_sub
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <choose>
      <when test="selective != null and selective.length > 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from contract_sub
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from contract_sub
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="org.linlinjava.jz.db.domain.ContractSubExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from contract_sub
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="org.linlinjava.jz.db.domain.ContractSub">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into contract_sub (master_contract_id, master_contract_no, 
      sub_contract_no, sub_order_no, clue_no, 
      customer_client_id, servant_id, servant_name, 
      worker_fra_id, worker_no, rest_day, 
      contract_state, contract_type, file_id, 
      service_type, service_model, payable_intermediary_cost, 
      actual_intermediary_cost, firstmonth_salary, 
      payable_firstmonth_salary, payment_firstmonth_salary, 
      obligations_firstmonth_salary, surplus_salary, 
      service_start_time, service_end_time, contract_start_date, 
      contract_end_date, shanghu_date, xiahu_date, 
      actual_service_days, service_duration, hourly_salary, 
      settlement, accept_orders, review_type, 
      cancel_file_id, create_time, create_user_id, 
      update_time, update_user_id, reject_reason, 
      remark)
    values (#{masterContractId,jdbcType=BIGINT}, #{masterContractNo,jdbcType=VARCHAR}, 
      #{subContractNo,jdbcType=VARCHAR}, #{subOrderNo,jdbcType=VARCHAR}, #{clueNo,jdbcType=VARCHAR}, 
      #{customerClientId,jdbcType=BIGINT}, #{servantId,jdbcType=BIGINT}, #{servantName,jdbcType=VARCHAR}, 
      #{workerFraId,jdbcType=BIGINT}, #{workerNo,jdbcType=VARCHAR}, #{restDay,jdbcType=VARCHAR}, 
      #{contractState,jdbcType=INTEGER}, #{contractType,jdbcType=INTEGER}, #{fileId,jdbcType=VARCHAR}, 
      #{serviceType,jdbcType=INTEGER}, #{serviceModel,jdbcType=INTEGER}, #{payableIntermediaryCost,jdbcType=DOUBLE}, 
      #{actualIntermediaryCost,jdbcType=DOUBLE}, #{firstmonthSalary,jdbcType=DOUBLE}, 
      #{payableFirstmonthSalary,jdbcType=DOUBLE}, #{paymentFirstmonthSalary,jdbcType=DOUBLE}, 
      #{obligationsFirstmonthSalary,jdbcType=DOUBLE}, #{surplusSalary,jdbcType=DOUBLE}, 
      #{serviceStartTime,jdbcType=VARCHAR}, #{serviceEndTime,jdbcType=VARCHAR}, #{contractStartDate,jdbcType=DATE}, 
      #{contractEndDate,jdbcType=DATE}, #{shanghuDate,jdbcType=DATE}, #{xiahuDate,jdbcType=DATE}, 
      #{actualServiceDays,jdbcType=VARCHAR}, #{serviceDuration,jdbcType=DOUBLE}, #{hourlySalary,jdbcType=DOUBLE}, 
      #{settlement,jdbcType=BIT}, #{acceptOrders,jdbcType=INTEGER}, #{reviewType,jdbcType=INTEGER}, 
      #{cancelFileId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT}, #{rejectReason,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="org.linlinjava.jz.db.domain.ContractSub">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into contract_sub
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="masterContractId != null">
        master_contract_id,
      </if>
      <if test="masterContractNo != null">
        master_contract_no,
      </if>
      <if test="subContractNo != null">
        sub_contract_no,
      </if>
      <if test="subOrderNo != null">
        sub_order_no,
      </if>
      <if test="clueNo != null">
        clue_no,
      </if>
      <if test="customerClientId != null">
        customer_client_id,
      </if>
      <if test="servantId != null">
        servant_id,
      </if>
      <if test="servantName != null">
        servant_name,
      </if>
      <if test="workerFraId != null">
        worker_fra_id,
      </if>
      <if test="workerNo != null">
        worker_no,
      </if>
      <if test="restDay != null">
        rest_day,
      </if>
      <if test="contractState != null">
        contract_state,
      </if>
      <if test="contractType != null">
        contract_type,
      </if>
      <if test="fileId != null">
        file_id,
      </if>
      <if test="serviceType != null">
        service_type,
      </if>
      <if test="serviceModel != null">
        service_model,
      </if>
      <if test="payableIntermediaryCost != null">
        payable_intermediary_cost,
      </if>
      <if test="actualIntermediaryCost != null">
        actual_intermediary_cost,
      </if>
      <if test="firstmonthSalary != null">
        firstmonth_salary,
      </if>
      <if test="payableFirstmonthSalary != null">
        payable_firstmonth_salary,
      </if>
      <if test="paymentFirstmonthSalary != null">
        payment_firstmonth_salary,
      </if>
      <if test="obligationsFirstmonthSalary != null">
        obligations_firstmonth_salary,
      </if>
      <if test="surplusSalary != null">
        surplus_salary,
      </if>
      <if test="serviceStartTime != null">
        service_start_time,
      </if>
      <if test="serviceEndTime != null">
        service_end_time,
      </if>
      <if test="contractStartDate != null">
        contract_start_date,
      </if>
      <if test="contractEndDate != null">
        contract_end_date,
      </if>
      <if test="shanghuDate != null">
        shanghu_date,
      </if>
      <if test="xiahuDate != null">
        xiahu_date,
      </if>
      <if test="actualServiceDays != null">
        actual_service_days,
      </if>
      <if test="serviceDuration != null">
        service_duration,
      </if>
      <if test="hourlySalary != null">
        hourly_salary,
      </if>
      <if test="settlement != null">
        settlement,
      </if>
      <if test="acceptOrders != null">
        accept_orders,
      </if>
      <if test="reviewType != null">
        review_type,
      </if>
      <if test="cancelFileId != null">
        cancel_file_id,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createUserId != null">
        create_user_id,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="updateUserId != null">
        update_user_id,
      </if>
      <if test="rejectReason != null">
        reject_reason,
      </if>
      <if test="remark != null">
        remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="masterContractId != null">
        #{masterContractId,jdbcType=BIGINT},
      </if>
      <if test="masterContractNo != null">
        #{masterContractNo,jdbcType=VARCHAR},
      </if>
      <if test="subContractNo != null">
        #{subContractNo,jdbcType=VARCHAR},
      </if>
      <if test="subOrderNo != null">
        #{subOrderNo,jdbcType=VARCHAR},
      </if>
      <if test="clueNo != null">
        #{clueNo,jdbcType=VARCHAR},
      </if>
      <if test="customerClientId != null">
        #{customerClientId,jdbcType=BIGINT},
      </if>
      <if test="servantId != null">
        #{servantId,jdbcType=BIGINT},
      </if>
      <if test="servantName != null">
        #{servantName,jdbcType=VARCHAR},
      </if>
      <if test="workerFraId != null">
        #{workerFraId,jdbcType=BIGINT},
      </if>
      <if test="workerNo != null">
        #{workerNo,jdbcType=VARCHAR},
      </if>
      <if test="restDay != null">
        #{restDay,jdbcType=VARCHAR},
      </if>
      <if test="contractState != null">
        #{contractState,jdbcType=INTEGER},
      </if>
      <if test="contractType != null">
        #{contractType,jdbcType=INTEGER},
      </if>
      <if test="fileId != null">
        #{fileId,jdbcType=VARCHAR},
      </if>
      <if test="serviceType != null">
        #{serviceType,jdbcType=INTEGER},
      </if>
      <if test="serviceModel != null">
        #{serviceModel,jdbcType=INTEGER},
      </if>
      <if test="payableIntermediaryCost != null">
        #{payableIntermediaryCost,jdbcType=DOUBLE},
      </if>
      <if test="actualIntermediaryCost != null">
        #{actualIntermediaryCost,jdbcType=DOUBLE},
      </if>
      <if test="firstmonthSalary != null">
        #{firstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="payableFirstmonthSalary != null">
        #{payableFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="paymentFirstmonthSalary != null">
        #{paymentFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="obligationsFirstmonthSalary != null">
        #{obligationsFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="surplusSalary != null">
        #{surplusSalary,jdbcType=DOUBLE},
      </if>
      <if test="serviceStartTime != null">
        #{serviceStartTime,jdbcType=VARCHAR},
      </if>
      <if test="serviceEndTime != null">
        #{serviceEndTime,jdbcType=VARCHAR},
      </if>
      <if test="contractStartDate != null">
        #{contractStartDate,jdbcType=DATE},
      </if>
      <if test="contractEndDate != null">
        #{contractEndDate,jdbcType=DATE},
      </if>
      <if test="shanghuDate != null">
        #{shanghuDate,jdbcType=DATE},
      </if>
      <if test="xiahuDate != null">
        #{xiahuDate,jdbcType=DATE},
      </if>
      <if test="actualServiceDays != null">
        #{actualServiceDays,jdbcType=VARCHAR},
      </if>
      <if test="serviceDuration != null">
        #{serviceDuration,jdbcType=DOUBLE},
      </if>
      <if test="hourlySalary != null">
        #{hourlySalary,jdbcType=DOUBLE},
      </if>
      <if test="settlement != null">
        #{settlement,jdbcType=BIT},
      </if>
      <if test="acceptOrders != null">
        #{acceptOrders,jdbcType=INTEGER},
      </if>
      <if test="reviewType != null">
        #{reviewType,jdbcType=INTEGER},
      </if>
      <if test="cancelFileId != null">
        #{cancelFileId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="rejectReason != null">
        #{rejectReason,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="org.linlinjava.jz.db.domain.ContractSubExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from contract_sub
    <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 contract_sub
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.masterContractId != null">
        master_contract_id = #{record.masterContractId,jdbcType=BIGINT},
      </if>
      <if test="record.masterContractNo != null">
        master_contract_no = #{record.masterContractNo,jdbcType=VARCHAR},
      </if>
      <if test="record.subContractNo != null">
        sub_contract_no = #{record.subContractNo,jdbcType=VARCHAR},
      </if>
      <if test="record.subOrderNo != null">
        sub_order_no = #{record.subOrderNo,jdbcType=VARCHAR},
      </if>
      <if test="record.clueNo != null">
        clue_no = #{record.clueNo,jdbcType=VARCHAR},
      </if>
      <if test="record.customerClientId != null">
        customer_client_id = #{record.customerClientId,jdbcType=BIGINT},
      </if>
      <if test="record.servantId != null">
        servant_id = #{record.servantId,jdbcType=BIGINT},
      </if>
      <if test="record.servantName != null">
        servant_name = #{record.servantName,jdbcType=VARCHAR},
      </if>
      <if test="record.workerFraId != null">
        worker_fra_id = #{record.workerFraId,jdbcType=BIGINT},
      </if>
      <if test="record.workerNo != null">
        worker_no = #{record.workerNo,jdbcType=VARCHAR},
      </if>
      <if test="record.restDay != null">
        rest_day = #{record.restDay,jdbcType=VARCHAR},
      </if>
      <if test="record.contractState != null">
        contract_state = #{record.contractState,jdbcType=INTEGER},
      </if>
      <if test="record.contractType != null">
        contract_type = #{record.contractType,jdbcType=INTEGER},
      </if>
      <if test="record.fileId != null">
        file_id = #{record.fileId,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceType != null">
        service_type = #{record.serviceType,jdbcType=INTEGER},
      </if>
      <if test="record.serviceModel != null">
        service_model = #{record.serviceModel,jdbcType=INTEGER},
      </if>
      <if test="record.payableIntermediaryCost != null">
        payable_intermediary_cost = #{record.payableIntermediaryCost,jdbcType=DOUBLE},
      </if>
      <if test="record.actualIntermediaryCost != null">
        actual_intermediary_cost = #{record.actualIntermediaryCost,jdbcType=DOUBLE},
      </if>
      <if test="record.firstmonthSalary != null">
        firstmonth_salary = #{record.firstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="record.payableFirstmonthSalary != null">
        payable_firstmonth_salary = #{record.payableFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="record.paymentFirstmonthSalary != null">
        payment_firstmonth_salary = #{record.paymentFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="record.obligationsFirstmonthSalary != null">
        obligations_firstmonth_salary = #{record.obligationsFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="record.surplusSalary != null">
        surplus_salary = #{record.surplusSalary,jdbcType=DOUBLE},
      </if>
      <if test="record.serviceStartTime != null">
        service_start_time = #{record.serviceStartTime,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceEndTime != null">
        service_end_time = #{record.serviceEndTime,jdbcType=VARCHAR},
      </if>
      <if test="record.contractStartDate != null">
        contract_start_date = #{record.contractStartDate,jdbcType=DATE},
      </if>
      <if test="record.contractEndDate != null">
        contract_end_date = #{record.contractEndDate,jdbcType=DATE},
      </if>
      <if test="record.shanghuDate != null">
        shanghu_date = #{record.shanghuDate,jdbcType=DATE},
      </if>
      <if test="record.xiahuDate != null">
        xiahu_date = #{record.xiahuDate,jdbcType=DATE},
      </if>
      <if test="record.actualServiceDays != null">
        actual_service_days = #{record.actualServiceDays,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceDuration != null">
        service_duration = #{record.serviceDuration,jdbcType=DOUBLE},
      </if>
      <if test="record.hourlySalary != null">
        hourly_salary = #{record.hourlySalary,jdbcType=DOUBLE},
      </if>
      <if test="record.settlement != null">
        settlement = #{record.settlement,jdbcType=BIT},
      </if>
      <if test="record.acceptOrders != null">
        accept_orders = #{record.acceptOrders,jdbcType=INTEGER},
      </if>
      <if test="record.reviewType != null">
        review_type = #{record.reviewType,jdbcType=INTEGER},
      </if>
      <if test="record.cancelFileId != null">
        cancel_file_id = #{record.cancelFileId,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createUserId != null">
        create_user_id = #{record.createUserId,jdbcType=BIGINT},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateUserId != null">
        update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      </if>
      <if test="record.rejectReason != null">
        reject_reason = #{record.rejectReason,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,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 contract_sub
    set id = #{record.id,jdbcType=BIGINT},
      master_contract_id = #{record.masterContractId,jdbcType=BIGINT},
      master_contract_no = #{record.masterContractNo,jdbcType=VARCHAR},
      sub_contract_no = #{record.subContractNo,jdbcType=VARCHAR},
      sub_order_no = #{record.subOrderNo,jdbcType=VARCHAR},
      clue_no = #{record.clueNo,jdbcType=VARCHAR},
      customer_client_id = #{record.customerClientId,jdbcType=BIGINT},
      servant_id = #{record.servantId,jdbcType=BIGINT},
      servant_name = #{record.servantName,jdbcType=VARCHAR},
      worker_fra_id = #{record.workerFraId,jdbcType=BIGINT},
      worker_no = #{record.workerNo,jdbcType=VARCHAR},
      rest_day = #{record.restDay,jdbcType=VARCHAR},
      contract_state = #{record.contractState,jdbcType=INTEGER},
      contract_type = #{record.contractType,jdbcType=INTEGER},
      file_id = #{record.fileId,jdbcType=VARCHAR},
      service_type = #{record.serviceType,jdbcType=INTEGER},
      service_model = #{record.serviceModel,jdbcType=INTEGER},
      payable_intermediary_cost = #{record.payableIntermediaryCost,jdbcType=DOUBLE},
      actual_intermediary_cost = #{record.actualIntermediaryCost,jdbcType=DOUBLE},
      firstmonth_salary = #{record.firstmonthSalary,jdbcType=DOUBLE},
      payable_firstmonth_salary = #{record.payableFirstmonthSalary,jdbcType=DOUBLE},
      payment_firstmonth_salary = #{record.paymentFirstmonthSalary,jdbcType=DOUBLE},
      obligations_firstmonth_salary = #{record.obligationsFirstmonthSalary,jdbcType=DOUBLE},
      surplus_salary = #{record.surplusSalary,jdbcType=DOUBLE},
      service_start_time = #{record.serviceStartTime,jdbcType=VARCHAR},
      service_end_time = #{record.serviceEndTime,jdbcType=VARCHAR},
      contract_start_date = #{record.contractStartDate,jdbcType=DATE},
      contract_end_date = #{record.contractEndDate,jdbcType=DATE},
      shanghu_date = #{record.shanghuDate,jdbcType=DATE},
      xiahu_date = #{record.xiahuDate,jdbcType=DATE},
      actual_service_days = #{record.actualServiceDays,jdbcType=VARCHAR},
      service_duration = #{record.serviceDuration,jdbcType=DOUBLE},
      hourly_salary = #{record.hourlySalary,jdbcType=DOUBLE},
      settlement = #{record.settlement,jdbcType=BIT},
      accept_orders = #{record.acceptOrders,jdbcType=INTEGER},
      review_type = #{record.reviewType,jdbcType=INTEGER},
      cancel_file_id = #{record.cancelFileId,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_user_id = #{record.createUserId,jdbcType=BIGINT},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      reject_reason = #{record.rejectReason,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.jz.db.domain.ContractSub">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update contract_sub
    <set>
      <if test="masterContractId != null">
        master_contract_id = #{masterContractId,jdbcType=BIGINT},
      </if>
      <if test="masterContractNo != null">
        master_contract_no = #{masterContractNo,jdbcType=VARCHAR},
      </if>
      <if test="subContractNo != null">
        sub_contract_no = #{subContractNo,jdbcType=VARCHAR},
      </if>
      <if test="subOrderNo != null">
        sub_order_no = #{subOrderNo,jdbcType=VARCHAR},
      </if>
      <if test="clueNo != null">
        clue_no = #{clueNo,jdbcType=VARCHAR},
      </if>
      <if test="customerClientId != null">
        customer_client_id = #{customerClientId,jdbcType=BIGINT},
      </if>
      <if test="servantId != null">
        servant_id = #{servantId,jdbcType=BIGINT},
      </if>
      <if test="servantName != null">
        servant_name = #{servantName,jdbcType=VARCHAR},
      </if>
      <if test="workerFraId != null">
        worker_fra_id = #{workerFraId,jdbcType=BIGINT},
      </if>
      <if test="workerNo != null">
        worker_no = #{workerNo,jdbcType=VARCHAR},
      </if>
      <if test="restDay != null">
        rest_day = #{restDay,jdbcType=VARCHAR},
      </if>
      <if test="contractState != null">
        contract_state = #{contractState,jdbcType=INTEGER},
      </if>
      <if test="contractType != null">
        contract_type = #{contractType,jdbcType=INTEGER},
      </if>
      <if test="fileId != null">
        file_id = #{fileId,jdbcType=VARCHAR},
      </if>
      <if test="serviceType != null">
        service_type = #{serviceType,jdbcType=INTEGER},
      </if>
      <if test="serviceModel != null">
        service_model = #{serviceModel,jdbcType=INTEGER},
      </if>
      <if test="payableIntermediaryCost != null">
        payable_intermediary_cost = #{payableIntermediaryCost,jdbcType=DOUBLE},
      </if>
      <if test="actualIntermediaryCost != null">
        actual_intermediary_cost = #{actualIntermediaryCost,jdbcType=DOUBLE},
      </if>
      <if test="firstmonthSalary != null">
        firstmonth_salary = #{firstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="payableFirstmonthSalary != null">
        payable_firstmonth_salary = #{payableFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="paymentFirstmonthSalary != null">
        payment_firstmonth_salary = #{paymentFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="obligationsFirstmonthSalary != null">
        obligations_firstmonth_salary = #{obligationsFirstmonthSalary,jdbcType=DOUBLE},
      </if>
      <if test="surplusSalary != null">
        surplus_salary = #{surplusSalary,jdbcType=DOUBLE},
      </if>
      <if test="serviceStartTime != null">
        service_start_time = #{serviceStartTime,jdbcType=VARCHAR},
      </if>
      <if test="serviceEndTime != null">
        service_end_time = #{serviceEndTime,jdbcType=VARCHAR},
      </if>
      <if test="contractStartDate != null">
        contract_start_date = #{contractStartDate,jdbcType=DATE},
      </if>
      <if test="contractEndDate != null">
        contract_end_date = #{contractEndDate,jdbcType=DATE},
      </if>
      <if test="shanghuDate != null">
        shanghu_date = #{shanghuDate,jdbcType=DATE},
      </if>
      <if test="xiahuDate != null">
        xiahu_date = #{xiahuDate,jdbcType=DATE},
      </if>
      <if test="actualServiceDays != null">
        actual_service_days = #{actualServiceDays,jdbcType=VARCHAR},
      </if>
      <if test="serviceDuration != null">
        service_duration = #{serviceDuration,jdbcType=DOUBLE},
      </if>
      <if test="hourlySalary != null">
        hourly_salary = #{hourlySalary,jdbcType=DOUBLE},
      </if>
      <if test="settlement != null">
        settlement = #{settlement,jdbcType=BIT},
      </if>
      <if test="acceptOrders != null">
        accept_orders = #{acceptOrders,jdbcType=INTEGER},
      </if>
      <if test="reviewType != null">
        review_type = #{reviewType,jdbcType=INTEGER},
      </if>
      <if test="cancelFileId != null">
        cancel_file_id = #{cancelFileId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        update_user_id = #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="rejectReason != null">
        reject_reason = #{rejectReason,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="org.linlinjava.jz.db.domain.ContractSub">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update contract_sub
    set master_contract_id = #{masterContractId,jdbcType=BIGINT},
      master_contract_no = #{masterContractNo,jdbcType=VARCHAR},
      sub_contract_no = #{subContractNo,jdbcType=VARCHAR},
      sub_order_no = #{subOrderNo,jdbcType=VARCHAR},
      clue_no = #{clueNo,jdbcType=VARCHAR},
      customer_client_id = #{customerClientId,jdbcType=BIGINT},
      servant_id = #{servantId,jdbcType=BIGINT},
      servant_name = #{servantName,jdbcType=VARCHAR},
      worker_fra_id = #{workerFraId,jdbcType=BIGINT},
      worker_no = #{workerNo,jdbcType=VARCHAR},
      rest_day = #{restDay,jdbcType=VARCHAR},
      contract_state = #{contractState,jdbcType=INTEGER},
      contract_type = #{contractType,jdbcType=INTEGER},
      file_id = #{fileId,jdbcType=VARCHAR},
      service_type = #{serviceType,jdbcType=INTEGER},
      service_model = #{serviceModel,jdbcType=INTEGER},
      payable_intermediary_cost = #{payableIntermediaryCost,jdbcType=DOUBLE},
      actual_intermediary_cost = #{actualIntermediaryCost,jdbcType=DOUBLE},
      firstmonth_salary = #{firstmonthSalary,jdbcType=DOUBLE},
      payable_firstmonth_salary = #{payableFirstmonthSalary,jdbcType=DOUBLE},
      payment_firstmonth_salary = #{paymentFirstmonthSalary,jdbcType=DOUBLE},
      obligations_firstmonth_salary = #{obligationsFirstmonthSalary,jdbcType=DOUBLE},
      surplus_salary = #{surplusSalary,jdbcType=DOUBLE},
      service_start_time = #{serviceStartTime,jdbcType=VARCHAR},
      service_end_time = #{serviceEndTime,jdbcType=VARCHAR},
      contract_start_date = #{contractStartDate,jdbcType=DATE},
      contract_end_date = #{contractEndDate,jdbcType=DATE},
      shanghu_date = #{shanghuDate,jdbcType=DATE},
      xiahu_date = #{xiahuDate,jdbcType=DATE},
      actual_service_days = #{actualServiceDays,jdbcType=VARCHAR},
      service_duration = #{serviceDuration,jdbcType=DOUBLE},
      hourly_salary = #{hourlySalary,jdbcType=DOUBLE},
      settlement = #{settlement,jdbcType=BIT},
      accept_orders = #{acceptOrders,jdbcType=INTEGER},
      review_type = #{reviewType,jdbcType=INTEGER},
      cancel_file_id = #{cancelFileId,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      reject_reason = #{rejectReason,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectOneByExample" parameterType="org.linlinjava.jz.db.domain.ContractSubExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <include refid="Base_Column_List" />
    from contract_sub
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
  <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <choose>
      <when test="selective != null and selective.length > 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from contract_sub
    <if test="example != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example != null and example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
    limit 1
  </select>
</mapper>