<?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.reptileclient.jlifeapp.dao.jz.CustomerClueMapper">
  <resultMap id="BaseResultMap" type="com.reptileclient.jlifeapp.entity.hm.CustomerClue">
    <!--@mbg.generated-->
    <!--@Table customer_clue-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="clue_no" jdbcType="VARCHAR" property="clueNo" />
    <result column="clue_priority" jdbcType="VARCHAR" property="cluePriority" />
    <result column="source_no" jdbcType="VARCHAR" property="sourceNo" />
    <result column="resource" jdbcType="VARCHAR" property="resource" />
    <result column="provider" jdbcType="VARCHAR" property="provider" />
    <result column="service_city" jdbcType="BIGINT" property="serviceCity" />
    <result column="flag_state" jdbcType="INTEGER" property="flagState" />
    <result column="franchisee_no" jdbcType="VARCHAR" property="franchiseeNo" />
    <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
    <result column="customer_tel" jdbcType="VARCHAR" property="customerTel" />
    <result column="customer_client_id" jdbcType="BIGINT" property="customerClientId" />
    <result column="customer_addr" jdbcType="VARCHAR" property="customerAddr" />
    <result column="house_structure" jdbcType="VARCHAR" property="houseStructure" />
    <result column="house_area" jdbcType="DOUBLE" property="houseArea" />
    <result column="service_type" jdbcType="INTEGER" property="serviceType" />
    <result column="service_model" jdbcType="INTEGER" property="serviceModel" />
    <result column="expect_interview_time" jdbcType="TIMESTAMP" property="expectInterviewTime" />
    <result column="expect_arrival_time" jdbcType="TIMESTAMP" property="expectArrivalTime" />
    <result column="expect_service_date" jdbcType="VARCHAR" property="expectServiceDate" />
    <result column="start_service_time" jdbcType="VARCHAR" property="startServiceTime" />
    <result column="end_service_time" jdbcType="VARCHAR" property="endServiceTime" />
    <result column="budget_amount" jdbcType="DOUBLE" property="budgetAmount" />
    <result column="rest_day" jdbcType="VARCHAR" property="restDay" />
    <result column="service_content" jdbcType="VARCHAR" property="serviceContent" />
    <result column="state" jdbcType="INTEGER" property="state" />
    <result column="loss_times" jdbcType="INTEGER" property="lossTimes" />
    <result column="candidate_id" jdbcType="BIGINT" property="candidateId" />
    <result column="candidate_name" jdbcType="VARCHAR" property="candidateName" />
    <result column="follow_id" jdbcType="BIGINT" property="followId" />
    <result column="follow_person" jdbcType="VARCHAR" property="followPerson" />
    <result column="next_visit_time" jdbcType="TIMESTAMP" property="nextVisitTime" />
    <result column="region_id" jdbcType="BIGINT" property="regionId" />
    <result column="allocation_time" jdbcType="TIMESTAMP" property="allocationTime" />
    <result column="need_contact_time" jdbcType="TIMESTAMP" property="needContactTime" />
    <result column="franchisee_remark" jdbcType="VARCHAR" property="franchiseeRemark" />
    <result column="circulation_times" jdbcType="INTEGER" property="circulationTimes" />
    <result column="clue_flag" jdbcType="VARCHAR" property="clueFlag" />
    <result column="create_id" jdbcType="BIGINT" property="createId" />
    <result column="create_user" jdbcType="VARCHAR" property="createUser" />
    <result column="user_code" jdbcType="VARCHAR" property="userCode" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="judgement_result" jdbcType="INTEGER" property="judgementResult" />
    <result column="work_content" jdbcType="VARCHAR" property="workContent" />
    <result column="order_time" jdbcType="TIMESTAMP" property="orderTime" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, clue_no, clue_priority, source_no, `resource`, provider, service_city, flag_state,
    franchisee_no, customer_name, customer_tel, customer_client_id, customer_addr, house_structure,
    house_area, service_type, service_model, expect_interview_time, expect_arrival_time,
    expect_service_date, start_service_time, end_service_time, budget_amount, rest_day,
    service_content, `state`, loss_times, candidate_id, candidate_name, follow_id, follow_person,
    next_visit_time, region_id, allocation_time, need_contact_time, franchisee_remark,
    circulation_times, clue_flag, create_id, create_user, user_code, create_time, update_time,
    remark, judgement_result, work_content, order_time
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from customer_clue
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from customer_clue
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.reptileclient.jlifeapp.entity.hm.CustomerClue" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into customer_clue (clue_no, clue_priority, source_no,
      `resource`, provider, service_city,
      flag_state, franchisee_no, customer_name,
      customer_tel, customer_client_id, customer_addr,
      house_structure, house_area, service_type,
      service_model, expect_interview_time, expect_arrival_time,
      expect_service_date, start_service_time, end_service_time,
      budget_amount, rest_day, service_content,
      `state`, loss_times, candidate_id,
      candidate_name, follow_id, follow_person,
      next_visit_time, region_id, allocation_time,
      need_contact_time, franchisee_remark, circulation_times,
      clue_flag, create_id, create_user,
      user_code, create_time, update_time,
      remark, judgement_result, work_content,
      order_time)
    values (#{clueNo,jdbcType=VARCHAR}, #{cluePriority,jdbcType=VARCHAR}, #{sourceNo,jdbcType=VARCHAR},
      #{resource,jdbcType=VARCHAR}, #{provider,jdbcType=VARCHAR}, #{serviceCity,jdbcType=BIGINT},
      #{flagState,jdbcType=INTEGER}, #{franchiseeNo,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR},
      #{customerTel,jdbcType=VARCHAR}, #{customerClientId,jdbcType=BIGINT}, #{customerAddr,jdbcType=VARCHAR},
      #{houseStructure,jdbcType=VARCHAR}, #{houseArea,jdbcType=DOUBLE}, #{serviceType,jdbcType=INTEGER},
      #{serviceModel,jdbcType=INTEGER}, #{expectInterviewTime,jdbcType=TIMESTAMP}, #{expectArrivalTime,jdbcType=TIMESTAMP},
      #{expectServiceDate,jdbcType=VARCHAR}, #{startServiceTime,jdbcType=VARCHAR}, #{endServiceTime,jdbcType=VARCHAR},
      #{budgetAmount,jdbcType=DOUBLE}, #{restDay,jdbcType=VARCHAR}, #{serviceContent,jdbcType=VARCHAR},
      #{state,jdbcType=INTEGER}, #{lossTimes,jdbcType=INTEGER}, #{candidateId,jdbcType=BIGINT},
      #{candidateName,jdbcType=VARCHAR}, #{followId,jdbcType=BIGINT}, #{followPerson,jdbcType=VARCHAR},
      #{nextVisitTime,jdbcType=TIMESTAMP}, #{regionId,jdbcType=BIGINT}, #{allocationTime,jdbcType=TIMESTAMP},
      #{needContactTime,jdbcType=TIMESTAMP}, #{franchiseeRemark,jdbcType=VARCHAR}, #{circulationTimes,jdbcType=INTEGER},
      #{clueFlag,jdbcType=VARCHAR}, #{createId,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR},
      #{userCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
      #{remark,jdbcType=VARCHAR}, #{judgementResult,jdbcType=INTEGER}, #{workContent,jdbcType=VARCHAR},
      #{orderTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.reptileclient.jlifeapp.entity.hm.CustomerClue" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into customer_clue
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="clueNo != null">
        clue_no,
      </if>
      <if test="cluePriority != null">
        clue_priority,
      </if>
      <if test="sourceNo != null">
        source_no,
      </if>
      <if test="resource != null">
        `resource`,
      </if>
      <if test="provider != null">
        provider,
      </if>
      <if test="serviceCity != null">
        service_city,
      </if>
      <if test="flagState != null">
        flag_state,
      </if>
      <if test="franchiseeNo != null">
        franchisee_no,
      </if>
      <if test="customerName != null">
        customer_name,
      </if>
      <if test="customerTel != null">
        customer_tel,
      </if>
      <if test="customerClientId != null">
        customer_client_id,
      </if>
      <if test="customerAddr != null">
        customer_addr,
      </if>
      <if test="houseStructure != null">
        house_structure,
      </if>
      <if test="houseArea != null">
        house_area,
      </if>
      <if test="serviceType != null">
        service_type,
      </if>
      <if test="serviceModel != null">
        service_model,
      </if>
      <if test="expectInterviewTime != null">
        expect_interview_time,
      </if>
      <if test="expectArrivalTime != null">
        expect_arrival_time,
      </if>
      <if test="expectServiceDate != null">
        expect_service_date,
      </if>
      <if test="startServiceTime != null">
        start_service_time,
      </if>
      <if test="endServiceTime != null">
        end_service_time,
      </if>
      <if test="budgetAmount != null">
        budget_amount,
      </if>
      <if test="restDay != null">
        rest_day,
      </if>
      <if test="serviceContent != null">
        service_content,
      </if>
      <if test="state != null">
        `state`,
      </if>
      <if test="lossTimes != null">
        loss_times,
      </if>
      <if test="candidateId != null">
        candidate_id,
      </if>
      <if test="candidateName != null">
        candidate_name,
      </if>
      <if test="followId != null">
        follow_id,
      </if>
      <if test="followPerson != null">
        follow_person,
      </if>
      <if test="nextVisitTime != null">
        next_visit_time,
      </if>
      <if test="regionId != null">
        region_id,
      </if>
      <if test="allocationTime != null">
        allocation_time,
      </if>
      <if test="needContactTime != null">
        need_contact_time,
      </if>
      <if test="franchiseeRemark != null">
        franchisee_remark,
      </if>
      <if test="circulationTimes != null">
        circulation_times,
      </if>
      <if test="clueFlag != null">
        clue_flag,
      </if>
      <if test="createId != null">
        create_id,
      </if>
      <if test="createUser != null">
        create_user,
      </if>
      <if test="userCode != null">
        user_code,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="judgementResult != null">
        judgement_result,
      </if>
      <if test="workContent != null">
        work_content,
      </if>
      <if test="orderTime != null">
        order_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="clueNo != null">
        #{clueNo,jdbcType=VARCHAR},
      </if>
      <if test="cluePriority != null">
        #{cluePriority,jdbcType=VARCHAR},
      </if>
      <if test="sourceNo != null">
        #{sourceNo,jdbcType=VARCHAR},
      </if>
      <if test="resource != null">
        #{resource,jdbcType=VARCHAR},
      </if>
      <if test="provider != null">
        #{provider,jdbcType=VARCHAR},
      </if>
      <if test="serviceCity != null">
        #{serviceCity,jdbcType=BIGINT},
      </if>
      <if test="flagState != null">
        #{flagState,jdbcType=INTEGER},
      </if>
      <if test="franchiseeNo != null">
        #{franchiseeNo,jdbcType=VARCHAR},
      </if>
      <if test="customerName != null">
        #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="customerTel != null">
        #{customerTel,jdbcType=VARCHAR},
      </if>
      <if test="customerClientId != null">
        #{customerClientId,jdbcType=BIGINT},
      </if>
      <if test="customerAddr != null">
        #{customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="houseStructure != null">
        #{houseStructure,jdbcType=VARCHAR},
      </if>
      <if test="houseArea != null">
        #{houseArea,jdbcType=DOUBLE},
      </if>
      <if test="serviceType != null">
        #{serviceType,jdbcType=INTEGER},
      </if>
      <if test="serviceModel != null">
        #{serviceModel,jdbcType=INTEGER},
      </if>
      <if test="expectInterviewTime != null">
        #{expectInterviewTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectArrivalTime != null">
        #{expectArrivalTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectServiceDate != null">
        #{expectServiceDate,jdbcType=VARCHAR},
      </if>
      <if test="startServiceTime != null">
        #{startServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="endServiceTime != null">
        #{endServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="budgetAmount != null">
        #{budgetAmount,jdbcType=DOUBLE},
      </if>
      <if test="restDay != null">
        #{restDay,jdbcType=VARCHAR},
      </if>
      <if test="serviceContent != null">
        #{serviceContent,jdbcType=VARCHAR},
      </if>
      <if test="state != null">
        #{state,jdbcType=INTEGER},
      </if>
      <if test="lossTimes != null">
        #{lossTimes,jdbcType=INTEGER},
      </if>
      <if test="candidateId != null">
        #{candidateId,jdbcType=BIGINT},
      </if>
      <if test="candidateName != null">
        #{candidateName,jdbcType=VARCHAR},
      </if>
      <if test="followId != null">
        #{followId,jdbcType=BIGINT},
      </if>
      <if test="followPerson != null">
        #{followPerson,jdbcType=VARCHAR},
      </if>
      <if test="nextVisitTime != null">
        #{nextVisitTime,jdbcType=TIMESTAMP},
      </if>
      <if test="regionId != null">
        #{regionId,jdbcType=BIGINT},
      </if>
      <if test="allocationTime != null">
        #{allocationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="needContactTime != null">
        #{needContactTime,jdbcType=TIMESTAMP},
      </if>
      <if test="franchiseeRemark != null">
        #{franchiseeRemark,jdbcType=VARCHAR},
      </if>
      <if test="circulationTimes != null">
        #{circulationTimes,jdbcType=INTEGER},
      </if>
      <if test="clueFlag != null">
        #{clueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        #{createId,jdbcType=BIGINT},
      </if>
      <if test="createUser != null">
        #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="userCode != null">
        #{userCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="judgementResult != null">
        #{judgementResult,jdbcType=INTEGER},
      </if>
      <if test="workContent != null">
        #{workContent,jdbcType=VARCHAR},
      </if>
      <if test="orderTime != null">
        #{orderTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.reptileclient.jlifeapp.entity.hm.CustomerClue">
    <!--@mbg.generated-->
    update customer_clue
    <set>
      <if test="clueNo != null">
        clue_no = #{clueNo,jdbcType=VARCHAR},
      </if>
      <if test="cluePriority != null">
        clue_priority = #{cluePriority,jdbcType=VARCHAR},
      </if>
      <if test="sourceNo != null">
        source_no = #{sourceNo,jdbcType=VARCHAR},
      </if>
      <if test="resource != null">
        `resource` = #{resource,jdbcType=VARCHAR},
      </if>
      <if test="provider != null">
        provider = #{provider,jdbcType=VARCHAR},
      </if>
      <if test="serviceCity != null">
        service_city = #{serviceCity,jdbcType=BIGINT},
      </if>
      <if test="flagState != null">
        flag_state = #{flagState,jdbcType=INTEGER},
      </if>
      <if test="franchiseeNo != null">
        franchisee_no = #{franchiseeNo,jdbcType=VARCHAR},
      </if>
      <if test="customerName != null">
        customer_name = #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="customerTel != null">
        customer_tel = #{customerTel,jdbcType=VARCHAR},
      </if>
      <if test="customerClientId != null">
        customer_client_id = #{customerClientId,jdbcType=BIGINT},
      </if>
      <if test="customerAddr != null">
        customer_addr = #{customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="houseStructure != null">
        house_structure = #{houseStructure,jdbcType=VARCHAR},
      </if>
      <if test="houseArea != null">
        house_area = #{houseArea,jdbcType=DOUBLE},
      </if>
      <if test="serviceType != null">
        service_type = #{serviceType,jdbcType=INTEGER},
      </if>
      <if test="serviceModel != null">
        service_model = #{serviceModel,jdbcType=INTEGER},
      </if>
      <if test="expectInterviewTime != null">
        expect_interview_time = #{expectInterviewTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectArrivalTime != null">
        expect_arrival_time = #{expectArrivalTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectServiceDate != null">
        expect_service_date = #{expectServiceDate,jdbcType=VARCHAR},
      </if>
      <if test="startServiceTime != null">
        start_service_time = #{startServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="endServiceTime != null">
        end_service_time = #{endServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="budgetAmount != null">
        budget_amount = #{budgetAmount,jdbcType=DOUBLE},
      </if>
      <if test="restDay != null">
        rest_day = #{restDay,jdbcType=VARCHAR},
      </if>
      <if test="serviceContent != null">
        service_content = #{serviceContent,jdbcType=VARCHAR},
      </if>
      <if test="state != null">
        `state` = #{state,jdbcType=INTEGER},
      </if>
      <if test="lossTimes != null">
        loss_times = #{lossTimes,jdbcType=INTEGER},
      </if>
      <if test="candidateId != null">
        candidate_id = #{candidateId,jdbcType=BIGINT},
      </if>
      <if test="candidateName != null">
        candidate_name = #{candidateName,jdbcType=VARCHAR},
      </if>
      <if test="followId != null">
        follow_id = #{followId,jdbcType=BIGINT},
      </if>
      <if test="followPerson != null">
        follow_person = #{followPerson,jdbcType=VARCHAR},
      </if>
      <if test="nextVisitTime != null">
        next_visit_time = #{nextVisitTime,jdbcType=TIMESTAMP},
      </if>
      <if test="regionId != null">
        region_id = #{regionId,jdbcType=BIGINT},
      </if>
      <if test="allocationTime != null">
        allocation_time = #{allocationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="needContactTime != null">
        need_contact_time = #{needContactTime,jdbcType=TIMESTAMP},
      </if>
      <if test="franchiseeRemark != null">
        franchisee_remark = #{franchiseeRemark,jdbcType=VARCHAR},
      </if>
      <if test="circulationTimes != null">
        circulation_times = #{circulationTimes,jdbcType=INTEGER},
      </if>
      <if test="clueFlag != null">
        clue_flag = #{clueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        create_id = #{createId,jdbcType=BIGINT},
      </if>
      <if test="createUser != null">
        create_user = #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="userCode != null">
        user_code = #{userCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="judgementResult != null">
        judgement_result = #{judgementResult,jdbcType=INTEGER},
      </if>
      <if test="workContent != null">
        work_content = #{workContent,jdbcType=VARCHAR},
      </if>
      <if test="orderTime != null">
        order_time = #{orderTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.reptileclient.jlifeapp.entity.hm.CustomerClue">
    <!--@mbg.generated-->
    update customer_clue
    set clue_no = #{clueNo,jdbcType=VARCHAR},
      clue_priority = #{cluePriority,jdbcType=VARCHAR},
      source_no = #{sourceNo,jdbcType=VARCHAR},
      `resource` = #{resource,jdbcType=VARCHAR},
      provider = #{provider,jdbcType=VARCHAR},
      service_city = #{serviceCity,jdbcType=BIGINT},
      flag_state = #{flagState,jdbcType=INTEGER},
      franchisee_no = #{franchiseeNo,jdbcType=VARCHAR},
      customer_name = #{customerName,jdbcType=VARCHAR},
      customer_tel = #{customerTel,jdbcType=VARCHAR},
      customer_client_id = #{customerClientId,jdbcType=BIGINT},
      customer_addr = #{customerAddr,jdbcType=VARCHAR},
      house_structure = #{houseStructure,jdbcType=VARCHAR},
      house_area = #{houseArea,jdbcType=DOUBLE},
      service_type = #{serviceType,jdbcType=INTEGER},
      service_model = #{serviceModel,jdbcType=INTEGER},
      expect_interview_time = #{expectInterviewTime,jdbcType=TIMESTAMP},
      expect_arrival_time = #{expectArrivalTime,jdbcType=TIMESTAMP},
      expect_service_date = #{expectServiceDate,jdbcType=VARCHAR},
      start_service_time = #{startServiceTime,jdbcType=VARCHAR},
      end_service_time = #{endServiceTime,jdbcType=VARCHAR},
      budget_amount = #{budgetAmount,jdbcType=DOUBLE},
      rest_day = #{restDay,jdbcType=VARCHAR},
      service_content = #{serviceContent,jdbcType=VARCHAR},
      `state` = #{state,jdbcType=INTEGER},
      loss_times = #{lossTimes,jdbcType=INTEGER},
      candidate_id = #{candidateId,jdbcType=BIGINT},
      candidate_name = #{candidateName,jdbcType=VARCHAR},
      follow_id = #{followId,jdbcType=BIGINT},
      follow_person = #{followPerson,jdbcType=VARCHAR},
      next_visit_time = #{nextVisitTime,jdbcType=TIMESTAMP},
      region_id = #{regionId,jdbcType=BIGINT},
      allocation_time = #{allocationTime,jdbcType=TIMESTAMP},
      need_contact_time = #{needContactTime,jdbcType=TIMESTAMP},
      franchisee_remark = #{franchiseeRemark,jdbcType=VARCHAR},
      circulation_times = #{circulationTimes,jdbcType=INTEGER},
      clue_flag = #{clueFlag,jdbcType=VARCHAR},
      create_id = #{createId,jdbcType=BIGINT},
      create_user = #{createUser,jdbcType=VARCHAR},
      user_code = #{userCode,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=VARCHAR},
      judgement_result = #{judgementResult,jdbcType=INTEGER},
      work_content = #{workContent,jdbcType=VARCHAR},
      order_time = #{orderTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateBatch" parameterType="java.util.List">
    <!--@mbg.generated-->
    update customer_clue
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="clue_no = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.clueNo,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="clue_priority = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.cluePriority,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="source_no = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.sourceNo,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="`resource` = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.resource,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="provider = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.provider,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="service_city = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.serviceCity,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="flag_state = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.flagState,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="franchisee_no = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.franchiseeNo,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="customer_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.customerName,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="customer_tel = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.customerTel,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="customer_client_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.customerClientId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="customer_addr = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.customerAddr,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="house_structure = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.houseStructure,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="house_area = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.houseArea,jdbcType=DOUBLE}
        </foreach>
      </trim>
      <trim prefix="service_type = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.serviceType,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="service_model = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.serviceModel,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="expect_interview_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.expectInterviewTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="expect_arrival_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.expectArrivalTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="expect_service_date = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.expectServiceDate,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="start_service_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.startServiceTime,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="end_service_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.endServiceTime,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="budget_amount = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.budgetAmount,jdbcType=DOUBLE}
        </foreach>
      </trim>
      <trim prefix="rest_day = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.restDay,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="service_content = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.serviceContent,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="`state` = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.state,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="loss_times = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.lossTimes,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="candidate_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.candidateId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="candidate_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.candidateName,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="follow_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.followId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="follow_person = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.followPerson,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="next_visit_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.nextVisitTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="region_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.regionId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="allocation_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.allocationTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="need_contact_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.needContactTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="franchisee_remark = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.franchiseeRemark,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="circulation_times = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.circulationTimes,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="clue_flag = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.clueFlag,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="create_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.createId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="create_user = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.createUser,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="user_code = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.userCode,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="create_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="update_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="remark = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.remark,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="judgement_result = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.judgementResult,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="work_content = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.workContent,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="order_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.orderTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=BIGINT}
    </foreach>
  </update>
  <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into customer_clue
    (clue_no, clue_priority, source_no, `resource`, provider, service_city, flag_state,
      franchisee_no, customer_name, customer_tel, customer_client_id, customer_addr,
      house_structure, house_area, service_type, service_model, expect_interview_time,
      expect_arrival_time, expect_service_date, start_service_time, end_service_time,
      budget_amount, rest_day, service_content, `state`, loss_times, candidate_id, candidate_name,
      follow_id, follow_person, next_visit_time, region_id, allocation_time, need_contact_time,
      franchisee_remark, circulation_times, clue_flag, create_id, create_user, user_code,
      create_time, update_time, remark, judgement_result, work_content, order_time)
    values
    <foreach collection="list" item="item" separator=",">
      (#{item.clueNo,jdbcType=VARCHAR}, #{item.cluePriority,jdbcType=VARCHAR}, #{item.sourceNo,jdbcType=VARCHAR},
        #{item.resource,jdbcType=VARCHAR}, #{item.provider,jdbcType=VARCHAR}, #{item.serviceCity,jdbcType=BIGINT},
        #{item.flagState,jdbcType=INTEGER}, #{item.franchiseeNo,jdbcType=VARCHAR}, #{item.customerName,jdbcType=VARCHAR},
        #{item.customerTel,jdbcType=VARCHAR}, #{item.customerClientId,jdbcType=BIGINT},
        #{item.customerAddr,jdbcType=VARCHAR}, #{item.houseStructure,jdbcType=VARCHAR},
        #{item.houseArea,jdbcType=DOUBLE}, #{item.serviceType,jdbcType=INTEGER}, #{item.serviceModel,jdbcType=INTEGER},
        #{item.expectInterviewTime,jdbcType=TIMESTAMP}, #{item.expectArrivalTime,jdbcType=TIMESTAMP},
        #{item.expectServiceDate,jdbcType=VARCHAR}, #{item.startServiceTime,jdbcType=VARCHAR},
        #{item.endServiceTime,jdbcType=VARCHAR}, #{item.budgetAmount,jdbcType=DOUBLE},
        #{item.restDay,jdbcType=VARCHAR}, #{item.serviceContent,jdbcType=VARCHAR}, #{item.state,jdbcType=INTEGER},
        #{item.lossTimes,jdbcType=INTEGER}, #{item.candidateId,jdbcType=BIGINT}, #{item.candidateName,jdbcType=VARCHAR},
        #{item.followId,jdbcType=BIGINT}, #{item.followPerson,jdbcType=VARCHAR}, #{item.nextVisitTime,jdbcType=TIMESTAMP},
        #{item.regionId,jdbcType=BIGINT}, #{item.allocationTime,jdbcType=TIMESTAMP}, #{item.needContactTime,jdbcType=TIMESTAMP},
        #{item.franchiseeRemark,jdbcType=VARCHAR}, #{item.circulationTimes,jdbcType=INTEGER},
        #{item.clueFlag,jdbcType=VARCHAR}, #{item.createId,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR},
        #{item.userCode,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},
        #{item.remark,jdbcType=VARCHAR}, #{item.judgementResult,jdbcType=INTEGER}, #{item.workContent,jdbcType=VARCHAR},
        #{item.orderTime,jdbcType=TIMESTAMP})
    </foreach>
  </insert>
  <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.reptileclient.jlifeapp.entity.hm.CustomerClue" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into customer_clue
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      clue_no,
      clue_priority,
      source_no,
      `resource`,
      provider,
      service_city,
      flag_state,
      franchisee_no,
      customer_name,
      customer_tel,
      customer_client_id,
      customer_addr,
      house_structure,
      house_area,
      service_type,
      service_model,
      expect_interview_time,
      expect_arrival_time,
      expect_service_date,
      start_service_time,
      end_service_time,
      budget_amount,
      rest_day,
      service_content,
      `state`,
      loss_times,
      candidate_id,
      candidate_name,
      follow_id,
      follow_person,
      next_visit_time,
      region_id,
      allocation_time,
      need_contact_time,
      franchisee_remark,
      circulation_times,
      clue_flag,
      create_id,
      create_user,
      user_code,
      create_time,
      update_time,
      remark,
      judgement_result,
      work_content,
      order_time,
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      #{clueNo,jdbcType=VARCHAR},
      #{cluePriority,jdbcType=VARCHAR},
      #{sourceNo,jdbcType=VARCHAR},
      #{resource,jdbcType=VARCHAR},
      #{provider,jdbcType=VARCHAR},
      #{serviceCity,jdbcType=BIGINT},
      #{flagState,jdbcType=INTEGER},
      #{franchiseeNo,jdbcType=VARCHAR},
      #{customerName,jdbcType=VARCHAR},
      #{customerTel,jdbcType=VARCHAR},
      #{customerClientId,jdbcType=BIGINT},
      #{customerAddr,jdbcType=VARCHAR},
      #{houseStructure,jdbcType=VARCHAR},
      #{houseArea,jdbcType=DOUBLE},
      #{serviceType,jdbcType=INTEGER},
      #{serviceModel,jdbcType=INTEGER},
      #{expectInterviewTime,jdbcType=TIMESTAMP},
      #{expectArrivalTime,jdbcType=TIMESTAMP},
      #{expectServiceDate,jdbcType=VARCHAR},
      #{startServiceTime,jdbcType=VARCHAR},
      #{endServiceTime,jdbcType=VARCHAR},
      #{budgetAmount,jdbcType=DOUBLE},
      #{restDay,jdbcType=VARCHAR},
      #{serviceContent,jdbcType=VARCHAR},
      #{state,jdbcType=INTEGER},
      #{lossTimes,jdbcType=INTEGER},
      #{candidateId,jdbcType=BIGINT},
      #{candidateName,jdbcType=VARCHAR},
      #{followId,jdbcType=BIGINT},
      #{followPerson,jdbcType=VARCHAR},
      #{nextVisitTime,jdbcType=TIMESTAMP},
      #{regionId,jdbcType=BIGINT},
      #{allocationTime,jdbcType=TIMESTAMP},
      #{needContactTime,jdbcType=TIMESTAMP},
      #{franchiseeRemark,jdbcType=VARCHAR},
      #{circulationTimes,jdbcType=INTEGER},
      #{clueFlag,jdbcType=VARCHAR},
      #{createId,jdbcType=BIGINT},
      #{createUser,jdbcType=VARCHAR},
      #{userCode,jdbcType=VARCHAR},
      #{createTime,jdbcType=TIMESTAMP},
      #{updateTime,jdbcType=TIMESTAMP},
      #{remark,jdbcType=VARCHAR},
      #{judgementResult,jdbcType=INTEGER},
      #{workContent,jdbcType=VARCHAR},
      #{orderTime,jdbcType=TIMESTAMP},
    </trim>
    on duplicate key update
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=BIGINT},
      </if>
      clue_no = #{clueNo,jdbcType=VARCHAR},
      clue_priority = #{cluePriority,jdbcType=VARCHAR},
      source_no = #{sourceNo,jdbcType=VARCHAR},
      `resource` = #{resource,jdbcType=VARCHAR},
      provider = #{provider,jdbcType=VARCHAR},
      service_city = #{serviceCity,jdbcType=BIGINT},
      flag_state = #{flagState,jdbcType=INTEGER},
      franchisee_no = #{franchiseeNo,jdbcType=VARCHAR},
      customer_name = #{customerName,jdbcType=VARCHAR},
      customer_tel = #{customerTel,jdbcType=VARCHAR},
      customer_client_id = #{customerClientId,jdbcType=BIGINT},
      customer_addr = #{customerAddr,jdbcType=VARCHAR},
      house_structure = #{houseStructure,jdbcType=VARCHAR},
      house_area = #{houseArea,jdbcType=DOUBLE},
      service_type = #{serviceType,jdbcType=INTEGER},
      service_model = #{serviceModel,jdbcType=INTEGER},
      expect_interview_time = #{expectInterviewTime,jdbcType=TIMESTAMP},
      expect_arrival_time = #{expectArrivalTime,jdbcType=TIMESTAMP},
      expect_service_date = #{expectServiceDate,jdbcType=VARCHAR},
      start_service_time = #{startServiceTime,jdbcType=VARCHAR},
      end_service_time = #{endServiceTime,jdbcType=VARCHAR},
      budget_amount = #{budgetAmount,jdbcType=DOUBLE},
      rest_day = #{restDay,jdbcType=VARCHAR},
      service_content = #{serviceContent,jdbcType=VARCHAR},
      `state` = #{state,jdbcType=INTEGER},
      loss_times = #{lossTimes,jdbcType=INTEGER},
      candidate_id = #{candidateId,jdbcType=BIGINT},
      candidate_name = #{candidateName,jdbcType=VARCHAR},
      follow_id = #{followId,jdbcType=BIGINT},
      follow_person = #{followPerson,jdbcType=VARCHAR},
      next_visit_time = #{nextVisitTime,jdbcType=TIMESTAMP},
      region_id = #{regionId,jdbcType=BIGINT},
      allocation_time = #{allocationTime,jdbcType=TIMESTAMP},
      need_contact_time = #{needContactTime,jdbcType=TIMESTAMP},
      franchisee_remark = #{franchiseeRemark,jdbcType=VARCHAR},
      circulation_times = #{circulationTimes,jdbcType=INTEGER},
      clue_flag = #{clueFlag,jdbcType=VARCHAR},
      create_id = #{createId,jdbcType=BIGINT},
      create_user = #{createUser,jdbcType=VARCHAR},
      user_code = #{userCode,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=VARCHAR},
      judgement_result = #{judgementResult,jdbcType=INTEGER},
      work_content = #{workContent,jdbcType=VARCHAR},
      order_time = #{orderTime,jdbcType=TIMESTAMP},
    </trim>
  </insert>
  <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.reptileclient.jlifeapp.entity.hm.CustomerClue" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into customer_clue
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="clueNo != null">
        clue_no,
      </if>
      <if test="cluePriority != null">
        clue_priority,
      </if>
      <if test="sourceNo != null">
        source_no,
      </if>
      <if test="resource != null">
        `resource`,
      </if>
      <if test="provider != null">
        provider,
      </if>
      <if test="serviceCity != null">
        service_city,
      </if>
      <if test="flagState != null">
        flag_state,
      </if>
      <if test="franchiseeNo != null">
        franchisee_no,
      </if>
      <if test="customerName != null">
        customer_name,
      </if>
      <if test="customerTel != null">
        customer_tel,
      </if>
      <if test="customerClientId != null">
        customer_client_id,
      </if>
      <if test="customerAddr != null">
        customer_addr,
      </if>
      <if test="houseStructure != null">
        house_structure,
      </if>
      <if test="houseArea != null">
        house_area,
      </if>
      <if test="serviceType != null">
        service_type,
      </if>
      <if test="serviceModel != null">
        service_model,
      </if>
      <if test="expectInterviewTime != null">
        expect_interview_time,
      </if>
      <if test="expectArrivalTime != null">
        expect_arrival_time,
      </if>
      <if test="expectServiceDate != null">
        expect_service_date,
      </if>
      <if test="startServiceTime != null">
        start_service_time,
      </if>
      <if test="endServiceTime != null">
        end_service_time,
      </if>
      <if test="budgetAmount != null">
        budget_amount,
      </if>
      <if test="restDay != null">
        rest_day,
      </if>
      <if test="serviceContent != null">
        service_content,
      </if>
      <if test="state != null">
        `state`,
      </if>
      <if test="lossTimes != null">
        loss_times,
      </if>
      <if test="candidateId != null">
        candidate_id,
      </if>
      <if test="candidateName != null">
        candidate_name,
      </if>
      <if test="followId != null">
        follow_id,
      </if>
      <if test="followPerson != null">
        follow_person,
      </if>
      <if test="nextVisitTime != null">
        next_visit_time,
      </if>
      <if test="regionId != null">
        region_id,
      </if>
      <if test="allocationTime != null">
        allocation_time,
      </if>
      <if test="needContactTime != null">
        need_contact_time,
      </if>
      <if test="franchiseeRemark != null">
        franchisee_remark,
      </if>
      <if test="circulationTimes != null">
        circulation_times,
      </if>
      <if test="clueFlag != null">
        clue_flag,
      </if>
      <if test="createId != null">
        create_id,
      </if>
      <if test="createUser != null">
        create_user,
      </if>
      <if test="userCode != null">
        user_code,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="judgementResult != null">
        judgement_result,
      </if>
      <if test="workContent != null">
        work_content,
      </if>
      <if test="orderTime != null">
        order_time,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="clueNo != null">
        #{clueNo,jdbcType=VARCHAR},
      </if>
      <if test="cluePriority != null">
        #{cluePriority,jdbcType=VARCHAR},
      </if>
      <if test="sourceNo != null">
        #{sourceNo,jdbcType=VARCHAR},
      </if>
      <if test="resource != null">
        #{resource,jdbcType=VARCHAR},
      </if>
      <if test="provider != null">
        #{provider,jdbcType=VARCHAR},
      </if>
      <if test="serviceCity != null">
        #{serviceCity,jdbcType=BIGINT},
      </if>
      <if test="flagState != null">
        #{flagState,jdbcType=INTEGER},
      </if>
      <if test="franchiseeNo != null">
        #{franchiseeNo,jdbcType=VARCHAR},
      </if>
      <if test="customerName != null">
        #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="customerTel != null">
        #{customerTel,jdbcType=VARCHAR},
      </if>
      <if test="customerClientId != null">
        #{customerClientId,jdbcType=BIGINT},
      </if>
      <if test="customerAddr != null">
        #{customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="houseStructure != null">
        #{houseStructure,jdbcType=VARCHAR},
      </if>
      <if test="houseArea != null">
        #{houseArea,jdbcType=DOUBLE},
      </if>
      <if test="serviceType != null">
        #{serviceType,jdbcType=INTEGER},
      </if>
      <if test="serviceModel != null">
        #{serviceModel,jdbcType=INTEGER},
      </if>
      <if test="expectInterviewTime != null">
        #{expectInterviewTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectArrivalTime != null">
        #{expectArrivalTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectServiceDate != null">
        #{expectServiceDate,jdbcType=VARCHAR},
      </if>
      <if test="startServiceTime != null">
        #{startServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="endServiceTime != null">
        #{endServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="budgetAmount != null">
        #{budgetAmount,jdbcType=DOUBLE},
      </if>
      <if test="restDay != null">
        #{restDay,jdbcType=VARCHAR},
      </if>
      <if test="serviceContent != null">
        #{serviceContent,jdbcType=VARCHAR},
      </if>
      <if test="state != null">
        #{state,jdbcType=INTEGER},
      </if>
      <if test="lossTimes != null">
        #{lossTimes,jdbcType=INTEGER},
      </if>
      <if test="candidateId != null">
        #{candidateId,jdbcType=BIGINT},
      </if>
      <if test="candidateName != null">
        #{candidateName,jdbcType=VARCHAR},
      </if>
      <if test="followId != null">
        #{followId,jdbcType=BIGINT},
      </if>
      <if test="followPerson != null">
        #{followPerson,jdbcType=VARCHAR},
      </if>
      <if test="nextVisitTime != null">
        #{nextVisitTime,jdbcType=TIMESTAMP},
      </if>
      <if test="regionId != null">
        #{regionId,jdbcType=BIGINT},
      </if>
      <if test="allocationTime != null">
        #{allocationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="needContactTime != null">
        #{needContactTime,jdbcType=TIMESTAMP},
      </if>
      <if test="franchiseeRemark != null">
        #{franchiseeRemark,jdbcType=VARCHAR},
      </if>
      <if test="circulationTimes != null">
        #{circulationTimes,jdbcType=INTEGER},
      </if>
      <if test="clueFlag != null">
        #{clueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        #{createId,jdbcType=BIGINT},
      </if>
      <if test="createUser != null">
        #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="userCode != null">
        #{userCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="judgementResult != null">
        #{judgementResult,jdbcType=INTEGER},
      </if>
      <if test="workContent != null">
        #{workContent,jdbcType=VARCHAR},
      </if>
      <if test="orderTime != null">
        #{orderTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
    on duplicate key update
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=BIGINT},
      </if>
      <if test="clueNo != null">
        clue_no = #{clueNo,jdbcType=VARCHAR},
      </if>
      <if test="cluePriority != null">
        clue_priority = #{cluePriority,jdbcType=VARCHAR},
      </if>
      <if test="sourceNo != null">
        source_no = #{sourceNo,jdbcType=VARCHAR},
      </if>
      <if test="resource != null">
        `resource` = #{resource,jdbcType=VARCHAR},
      </if>
      <if test="provider != null">
        provider = #{provider,jdbcType=VARCHAR},
      </if>
      <if test="serviceCity != null">
        service_city = #{serviceCity,jdbcType=BIGINT},
      </if>
      <if test="flagState != null">
        flag_state = #{flagState,jdbcType=INTEGER},
      </if>
      <if test="franchiseeNo != null">
        franchisee_no = #{franchiseeNo,jdbcType=VARCHAR},
      </if>
      <if test="customerName != null">
        customer_name = #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="customerTel != null">
        customer_tel = #{customerTel,jdbcType=VARCHAR},
      </if>
      <if test="customerClientId != null">
        customer_client_id = #{customerClientId,jdbcType=BIGINT},
      </if>
      <if test="customerAddr != null">
        customer_addr = #{customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="houseStructure != null">
        house_structure = #{houseStructure,jdbcType=VARCHAR},
      </if>
      <if test="houseArea != null">
        house_area = #{houseArea,jdbcType=DOUBLE},
      </if>
      <if test="serviceType != null">
        service_type = #{serviceType,jdbcType=INTEGER},
      </if>
      <if test="serviceModel != null">
        service_model = #{serviceModel,jdbcType=INTEGER},
      </if>
      <if test="expectInterviewTime != null">
        expect_interview_time = #{expectInterviewTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectArrivalTime != null">
        expect_arrival_time = #{expectArrivalTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expectServiceDate != null">
        expect_service_date = #{expectServiceDate,jdbcType=VARCHAR},
      </if>
      <if test="startServiceTime != null">
        start_service_time = #{startServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="endServiceTime != null">
        end_service_time = #{endServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="budgetAmount != null">
        budget_amount = #{budgetAmount,jdbcType=DOUBLE},
      </if>
      <if test="restDay != null">
        rest_day = #{restDay,jdbcType=VARCHAR},
      </if>
      <if test="serviceContent != null">
        service_content = #{serviceContent,jdbcType=VARCHAR},
      </if>
      <if test="state != null">
        `state` = #{state,jdbcType=INTEGER},
      </if>
      <if test="lossTimes != null">
        loss_times = #{lossTimes,jdbcType=INTEGER},
      </if>
      <if test="candidateId != null">
        candidate_id = #{candidateId,jdbcType=BIGINT},
      </if>
      <if test="candidateName != null">
        candidate_name = #{candidateName,jdbcType=VARCHAR},
      </if>
      <if test="followId != null">
        follow_id = #{followId,jdbcType=BIGINT},
      </if>
      <if test="followPerson != null">
        follow_person = #{followPerson,jdbcType=VARCHAR},
      </if>
      <if test="nextVisitTime != null">
        next_visit_time = #{nextVisitTime,jdbcType=TIMESTAMP},
      </if>
      <if test="regionId != null">
        region_id = #{regionId,jdbcType=BIGINT},
      </if>
      <if test="allocationTime != null">
        allocation_time = #{allocationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="needContactTime != null">
        need_contact_time = #{needContactTime,jdbcType=TIMESTAMP},
      </if>
      <if test="franchiseeRemark != null">
        franchisee_remark = #{franchiseeRemark,jdbcType=VARCHAR},
      </if>
      <if test="circulationTimes != null">
        circulation_times = #{circulationTimes,jdbcType=INTEGER},
      </if>
      <if test="clueFlag != null">
        clue_flag = #{clueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createId != null">
        create_id = #{createId,jdbcType=BIGINT},
      </if>
      <if test="createUser != null">
        create_user = #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="userCode != null">
        user_code = #{userCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="judgementResult != null">
        judgement_result = #{judgementResult,jdbcType=INTEGER},
      </if>
      <if test="workContent != null">
        work_content = #{workContent,jdbcType=VARCHAR},
      </if>
      <if test="orderTime != null">
        order_time = #{orderTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>

  <select id="selectClueNo" resultType="java.lang.String">
    select clue_seq()
  </select>
</mapper>
