lin
2024-04-17 2af148a7b15f1273d12be7b910bc6d9e4e41d2c2
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
@@ -283,6 +283,7 @@
               jp.place_name AS   NAME,
               jp.is_nine AS isNine,
               jp.is_front AS isFront,
               jp.no_explosion_category AS noExplosionCategory,
               br.name neiName,
               jg.community_code neiCode,
               FALSE         AS   hasChildren
@@ -345,6 +346,7 @@
        jp.is_front,
        jp.front_type,
        jp.remark,
        jp.no_explosion_category,
        jp.three_fire_protection,
        bu.real_name as username,bu.phone as phone,
        jppl.id as plid,
@@ -911,4 +913,33 @@
        order by jp.create_time desc,jp.id desc
    </select>
    <!--查询所有场所数据-->
    <select id="getAllList" resultType="org.springblade.modules.place.vo.PlaceVO">
        select
        jp.*,
        jpag.community_code
        from jczz_place jp
        left join jczz_police_affairs_grid jpag on jp.jw_grid_code = jpag.jw_grid_code and jpag.is_deleted =0
        where jp.is_deleted = 0
        limit #{i},#{size}
    </select>
    <!--查询所有场所数据-->
    <select id="getAllListTotal" resultType="java.lang.Integer">
        select
        count(*)
        from jczz_place jp
        where jp.is_deleted = 0
    </select>
    <!--查询对应的社区编号-->
    <select id="getCommunityCode" resultType="java.lang.String">
        select
        jpag.community_code
        from jczz_place jp
        left join jczz_police_affairs_grid jpag on jp.jw_grid_code = jpag.jw_grid_code and jpag.is_deleted =0
        where jp.is_deleted = 0
        and jp.id = #{id}
    </select>
</mapper>