<?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.property.mapper.TpCommunityMapper">

    <select id="getListOfUser" resultType="com.huiju.estateagents.property.entity.TpCommunity">
        SELECT DISTINCT
            t.*
        FROM
            tp_community t
            INNER JOIN ta_user_community s ON s.org_id = t.org_id
            AND s.community_id = t.id
        WHERE
            s.org_id = #{orgId}
            AND s.user_id = #{userId}
    </select>
</mapper>
