<?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.storlead.sales.mapper.mail.CustomerMailBingMarkMapper">

        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.storlead.sales.pojo.entity.mail.CustomerMailBingMarkEntity">
                    <id column="id" property="id" />
                <result column="owner_by" property="ownerBy" />
                <result column="create_time" property="createTime" />
                <result column="update_time" property="updateTime" />
                <result column="sort" property="sort" />
                <result column="is_delete" property="isDelete" />
                <result column="enabled" property="enabled" />
                <result column="create_by" property="createBy" />
                <result column="update_by" property="updateBy" />
                <result column="customer_id" property="customerId" />
                <result column="liaison_ids" property="liaisonIds" />
                <result column="mail_id" property="mailId" />
                <result column="follow_up_id" property="followUpId" />
                <result column="follow_up_time" property="followUpTime" />

        </resultMap>

        <!-- 通用查询结果列 -->
        <sql id="Base_Column_List">
                owner_by,
                create_time,
                update_time,
                sort,
                is_delete,
                enabled,
                create_by,
                update_by,
            id, customer_id, liaison_ids, mail_id,follow_up_id,follow_up_time
        </sql>

        <!-- 通过邮件id，返回客户id集合 -->
        <select id="selectCustomerIdsByMailId" resultType="long">
                SELECT DISTINCT customer_id
                FROM customer_mail_bing_mark
                WHERE mail_id = #{mailId}
        </select>
</mapper>
