<?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.yunzhi.marketing.xlk.mapper.BuildingChannelMapper">

    <select id="getChannelBuildingList" resultType="com.yunzhi.marketing.entity.TaBuilding">
        SELECT
            b.*
        FROM
            xlk_building_channel t
            INNER JOIN ta_channel_person c ON t.channel_id = c.channel_id
            LEFT JOIN ta_building b ON t.building_id = b.building_id
        WHERE
            c.person_id = #{personId}
    </select>
</mapper>
