<?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.SearchHouseMapper">

    <select id="selectSearchHouseList" resultType="com.yunzhi.marketing.xlk.vo.SearchHouseVO">
        SELECT
            t.*,
            p.avatarurl,
            p.`nickname`,
            p.phone,
            p.gender
        FROM
            xlk_search_house t
            LEFT JOIN ta_person p ON t.person_id = p.person_id
            WHERE t.ORG_ID = #{params.orgId}
    </select>
    <select id="selectSearchHouseDetail" resultType="com.yunzhi.marketing.xlk.vo.SearchHouseVO">
        SELECT
            t.*,
            p.avatarurl,
            p.`nickname`,
            p.phone,
            p.gender
        FROM
            xlk_search_house t
            LEFT JOIN ta_person p ON t.person_id = p.person_id
            WHERE t.id = #{id}
    </select>
</mapper>
