<?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.huiju.estateagents.sample.mapper.TaContactMapper">

    <select id="taContactInfoBySampleId" resultType="com.huiju.estateagents.sample.entity.TaContact">
        SELECT
            *
        FROM
            ta_contact t
        WHERE
            t.contact_id IN ( SELECT a.contact_id FROM ta_sample_contact a WHERE a.sample_id = #{id} )
            AND t.`status` = 1
    </select>
</mapper>
