linwe
2023-11-25 8400a67289b214b83a20484410fff96d236c6d49
src/main/java/org/springblade/modules/grid/mapper/GridMapper.xml
@@ -9,8 +9,11 @@
    <!--根据地址编号查询网格数据-->
    <select id="getGridDetailByHouseCode" resultType="org.springblade.modules.grid.vo.GridVO">
        select jg.* from jczz_grid jg
        select jg.id,jg.grid_name,jg.community_name,
        bu.real_name as realName,bu.phone as gridPhone
        from jczz_grid jg
        left join jczz_grid_range jgr on jg.id = jgr.grid_id
        left join blade_user bu on bu.id = jg.user_id and bu.is_deleted = 0
        where jg.is_deleted = 0
        and jgr.house_code = #{houseCode}
    </select>
@@ -28,5 +31,17 @@
        SELECT * FROM jczz_grid WHERE ST_Intersects(geom, ST_GeomFromText(${point},0))
    </select>
    <!--根据地址编号查询网格数据-->
    <select id="getGridDetailByParam" resultType="org.springblade.modules.grid.vo.GridVO">
        select jg.id,jg.grid_name,jg.community_name,
        bu.real_name as realName,bu.phone as gridPhone
        from jczz_grid jg
        left join jczz_grid_range jgr on jg.id = jgr.grid_id
        left join jczz_place_rel jpr on locate(jpr.community_name,jg.community_name)>0 and locate(jpr.grid_name,jg.grid_name)>0 and jpr.is_deleted = 0
        left join blade_user bu on bu.id = jg.user_id and bu.is_deleted = 0
        where jg.is_deleted = 0
        and jpr.place_id = #{place.id}
        limit 1
    </select>
</mapper>