<?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.CustomerClueMapper">
  <resultMap id="BaseResultMap" type="org.linlinjava.jz.db.domain.CustomerClue">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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="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, 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="selectByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClueExample" 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 customer_clue
    <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 &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from customer_clue
    <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 customer_clue
    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 &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from customer_clue
    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 customer_clue
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClueExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from customer_clue
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="org.linlinjava.jz.db.domain.CustomerClue">
    <!--
      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 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" parameterType="org.linlinjava.jz.db.domain.CustomerClue">
    <!--
      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 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>
  <select id="countByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClueExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from customer_clue
    <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 customer_clue
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.clueNo != null">
        clue_no = #{record.clueNo,jdbcType=VARCHAR},
      </if>
      <if test="record.cluePriority != null">
        clue_priority = #{record.cluePriority,jdbcType=VARCHAR},
      </if>
      <if test="record.sourceNo != null">
        source_no = #{record.sourceNo,jdbcType=VARCHAR},
      </if>
      <if test="record.resource != null">
        `resource` = #{record.resource,jdbcType=VARCHAR},
      </if>
      <if test="record.provider != null">
        provider = #{record.provider,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceCity != null">
        service_city = #{record.serviceCity,jdbcType=BIGINT},
      </if>
      <if test="record.flagState != null">
        flag_state = #{record.flagState,jdbcType=INTEGER},
      </if>
      <if test="record.franchiseeNo != null">
        franchisee_no = #{record.franchiseeNo,jdbcType=VARCHAR},
      </if>
      <if test="record.customerName != null">
        customer_name = #{record.customerName,jdbcType=VARCHAR},
      </if>
      <if test="record.customerTel != null">
        customer_tel = #{record.customerTel,jdbcType=VARCHAR},
      </if>
      <if test="record.customerClientId != null">
        customer_client_id = #{record.customerClientId,jdbcType=BIGINT},
      </if>
      <if test="record.customerAddr != null">
        customer_addr = #{record.customerAddr,jdbcType=VARCHAR},
      </if>
      <if test="record.houseStructure != null">
        house_structure = #{record.houseStructure,jdbcType=VARCHAR},
      </if>
      <if test="record.houseArea != null">
        house_area = #{record.houseArea,jdbcType=DOUBLE},
      </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.expectInterviewTime != null">
        expect_interview_time = #{record.expectInterviewTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.expectArrivalTime != null">
        expect_arrival_time = #{record.expectArrivalTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.expectServiceDate != null">
        expect_service_date = #{record.expectServiceDate,jdbcType=VARCHAR},
      </if>
      <if test="record.startServiceTime != null">
        start_service_time = #{record.startServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="record.endServiceTime != null">
        end_service_time = #{record.endServiceTime,jdbcType=VARCHAR},
      </if>
      <if test="record.budgetAmount != null">
        budget_amount = #{record.budgetAmount,jdbcType=DOUBLE},
      </if>
      <if test="record.restDay != null">
        rest_day = #{record.restDay,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceContent != null">
        service_content = #{record.serviceContent,jdbcType=VARCHAR},
      </if>
      <if test="record.state != null">
        `state` = #{record.state,jdbcType=INTEGER},
      </if>
      <if test="record.lossTimes != null">
        loss_times = #{record.lossTimes,jdbcType=INTEGER},
      </if>
      <if test="record.candidateId != null">
        candidate_id = #{record.candidateId,jdbcType=BIGINT},
      </if>
      <if test="record.candidateName != null">
        candidate_name = #{record.candidateName,jdbcType=VARCHAR},
      </if>
      <if test="record.followId != null">
        follow_id = #{record.followId,jdbcType=BIGINT},
      </if>
      <if test="record.followPerson != null">
        follow_person = #{record.followPerson,jdbcType=VARCHAR},
      </if>
      <if test="record.nextVisitTime != null">
        next_visit_time = #{record.nextVisitTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.regionId != null">
        region_id = #{record.regionId,jdbcType=BIGINT},
      </if>
      <if test="record.allocationTime != null">
        allocation_time = #{record.allocationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.needContactTime != null">
        need_contact_time = #{record.needContactTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.franchiseeRemark != null">
        franchisee_remark = #{record.franchiseeRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.circulationTimes != null">
        circulation_times = #{record.circulationTimes,jdbcType=INTEGER},
      </if>
      <if test="record.clueFlag != null">
        clue_flag = #{record.clueFlag,jdbcType=VARCHAR},
      </if>
      <if test="record.createId != null">
        create_id = #{record.createId,jdbcType=BIGINT},
      </if>
      <if test="record.createUser != null">
        create_user = #{record.createUser,jdbcType=VARCHAR},
      </if>
      <if test="record.userCode != null">
        user_code = #{record.userCode,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.judgementResult != null">
        judgement_result = #{record.judgementResult,jdbcType=INTEGER},
      </if>
      <if test="record.workContent != null">
        work_content = #{record.workContent,jdbcType=VARCHAR},
      </if>
      <if test="record.orderTime != null">
        order_time = #{record.orderTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update customer_clue
    set id = #{record.id,jdbcType=BIGINT},
      clue_no = #{record.clueNo,jdbcType=VARCHAR},
      clue_priority = #{record.cluePriority,jdbcType=VARCHAR},
      source_no = #{record.sourceNo,jdbcType=VARCHAR},
      `resource` = #{record.resource,jdbcType=VARCHAR},
      provider = #{record.provider,jdbcType=VARCHAR},
      service_city = #{record.serviceCity,jdbcType=BIGINT},
      flag_state = #{record.flagState,jdbcType=INTEGER},
      franchisee_no = #{record.franchiseeNo,jdbcType=VARCHAR},
      customer_name = #{record.customerName,jdbcType=VARCHAR},
      customer_tel = #{record.customerTel,jdbcType=VARCHAR},
      customer_client_id = #{record.customerClientId,jdbcType=BIGINT},
      customer_addr = #{record.customerAddr,jdbcType=VARCHAR},
      house_structure = #{record.houseStructure,jdbcType=VARCHAR},
      house_area = #{record.houseArea,jdbcType=DOUBLE},
      service_type = #{record.serviceType,jdbcType=INTEGER},
      service_model = #{record.serviceModel,jdbcType=INTEGER},
      expect_interview_time = #{record.expectInterviewTime,jdbcType=TIMESTAMP},
      expect_arrival_time = #{record.expectArrivalTime,jdbcType=TIMESTAMP},
      expect_service_date = #{record.expectServiceDate,jdbcType=VARCHAR},
      start_service_time = #{record.startServiceTime,jdbcType=VARCHAR},
      end_service_time = #{record.endServiceTime,jdbcType=VARCHAR},
      budget_amount = #{record.budgetAmount,jdbcType=DOUBLE},
      rest_day = #{record.restDay,jdbcType=VARCHAR},
      service_content = #{record.serviceContent,jdbcType=VARCHAR},
      `state` = #{record.state,jdbcType=INTEGER},
      loss_times = #{record.lossTimes,jdbcType=INTEGER},
      candidate_id = #{record.candidateId,jdbcType=BIGINT},
      candidate_name = #{record.candidateName,jdbcType=VARCHAR},
      follow_id = #{record.followId,jdbcType=BIGINT},
      follow_person = #{record.followPerson,jdbcType=VARCHAR},
      next_visit_time = #{record.nextVisitTime,jdbcType=TIMESTAMP},
      region_id = #{record.regionId,jdbcType=BIGINT},
      allocation_time = #{record.allocationTime,jdbcType=TIMESTAMP},
      need_contact_time = #{record.needContactTime,jdbcType=TIMESTAMP},
      franchisee_remark = #{record.franchiseeRemark,jdbcType=VARCHAR},
      circulation_times = #{record.circulationTimes,jdbcType=INTEGER},
      clue_flag = #{record.clueFlag,jdbcType=VARCHAR},
      create_id = #{record.createId,jdbcType=BIGINT},
      create_user = #{record.createUser,jdbcType=VARCHAR},
      user_code = #{record.userCode,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      remark = #{record.remark,jdbcType=VARCHAR},
      judgement_result = #{record.judgementResult,jdbcType=INTEGER},
      work_content = #{record.workContent,jdbcType=VARCHAR},
      order_time = #{record.orderTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.jz.db.domain.CustomerClue">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    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="org.linlinjava.jz.db.domain.CustomerClue">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    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>
  <select id="selectOneByExample" parameterType="org.linlinjava.jz.db.domain.CustomerClueExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <include refid="Base_Column_List" />
    from customer_clue
    <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 &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from customer_clue
    <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>