linwei
2024-01-23 5745a87f3a139ea2bbdaf4704978e4c151ecc45a
src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
@@ -17,14 +17,22 @@
        jp.place_name AS placeName
        FROM
        jczz_place_ext jpe
        LEFT JOIN jczz_place jp ON jpe.place_id = jp.id
        AND jp.is_deleted = 0
        LEFT JOIN jczz_grid_range jgr on jgr.house_code=jp.house_code
        LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id
        LEFT JOIN jczz_place jp ON jpe.place_id = jp.id AND jp.is_deleted = 0
        LEFT JOIN jczz_grid jg ON jp.grid_code = jg.grid_code AND jg.is_deleted = 0
        WHERE
        jpe.is_deleted = 0
        <if test="placeExt.communityCode != null and placeExt.communityCode != ''">
            and jg.community_code like concat('%',#{placeExt.communityCode},'%')
        <if test="isAdministrator==2">
            <choose>
                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                    and jg.community_code in
                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                        #{code}
                    </foreach>
                </when>
                <otherwise>
                    and jg.community_code in ('')
                </otherwise>
            </choose>
        </if>
        <if test="placeExt.placeName != null and placeExt.placeName != ''">
            and jp.place_name like concat('%',#{placeExt.placeName},'%')