<?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.house365.ws.dao.mapper.MarketCustomerMapper">

    <resultMap id="marketCustomer" type="com.house365.beans.entity.MarketCustomerEntity">
        <result property="id" column="id"/>
        <result property="activeId" column="active_id"/>
        <result property="isOvertime" column="is_overtime"/>
        <result property="signupTime" column="signup_time"/>
        <result property="name" column="name"/>
        <result property="phone" column="phone"/>
        <result property="bakPhone1" column="bak_phone1"/>
        <result property="bakPhone2" column="bak_phone2"/>
        <result property="bakPhone3" column="bak_phone3"/>
        <result property="sex" column="sex"/>
        <result property="customerType" column="customer_type"/>
        <result property="actSource" column="act_source"/>
        <result property="firstSource" column="first_source"/>
        <result property="latestSource" column="latest_source"/>
        <result property="crmLatestCall" column="crm_latest_call"/>
        <result property="crmLatestCallResult" column="crm_latest_call_result"/>
        <result property="status" column="status"/>
        <result property="createSource" column="create_source"/>
        <result property="createTime" column="create_time"/>
        <result property="creater" column="creater"/>
        <result property="buyIntention" column="buy_intention"/>
        <result property="lastVisitTime" column="last_visit_time"/>
        <result property="lastCallTime" column="last_call_time"/>
        <result property="managerId" column="manager_id"/>
        <result property="managerName" column="manager_name"/>
        <result property="updateTime" column="update_time"/>
        <result property="updater" column="updater"/>
        <result property="cityCode" column="cityCode"/>
        <result property="bizPort" column="biz_port"/>
        <result property="crmId" column="crmId"/>
        <result property="cityName" column="cityName"/>
        <result property="actSourceId" column="act_source_id"/>
        <result property="remark" column="remark"/>
        <result property="traceStatus" column="trace_status"/>
        <result property="crmSync" column="crm_sync"/>
        <result property="hotlineCallTime" column="hotline_call_time"/>
        <result property="hotlineCallSpend" column="hotline_call_spend"/>
        <result property="oceanDate" column="ocean_date"/>
        <result property="isDelete" column="is_delete"/>
        <result property="lastManager" column="last_manager"/>
        <result property="bindTime" column="bind_time"/>
        <result property="signupHouseId" column="signupHouseId"/>
        <result property="signupHouseName" column="signupHouseName"/>
        <result property="signupSourceId" column="signupSourceId"/>
        <result property="signupSourceName" column="signupSourceName"/>
        <result property="customerId" column="customerId"/>
        <result property="overTimeCount" column="over_time_count"/>
        <result property="visitBackCount" column="visit_back_count"/>
        <result property="waitVisitCount" column="wait_visit_count"/>
        <result property="boughtCount" column="bought_count"/>
        <result property="isabandon" column="isabandon"/>
        <result property="abandonTime" column="abandon_time"/>
        <result property="abandonLogID" column="abandonLogID"/>
    </resultMap>

    <update id="updateCustomerId" parameterType="map">
        UPDATE market_customer
        SET
        customerId = #{customerId}
        WHERE id = #{id}
    </update>

</mapper>