lin
2024-03-25 9f8f9d13c42ca8cdccbf351069082a5fdccef2e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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="org.springblade.modules.police.mapper.PoliceAffairsGridMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="policeAffairsGridResultMap" type="org.springblade.modules.police.entity.PoliceAffairsGridEntity">
        <result column="id" property="id"/>
        <result column="object_id" property="objectId"/>
        <result column="jws_code" property="jwsCode"/>
        <result column="user_id" property="userId"/>
        <result column="policeman" property="policeman"/>
        <result column="policeman_phone" property="policemanPhone"/>
        <result column="community_code" property="communityCode"/>
        <result column="community_name" property="communityName"/>
        <result column="police_station_code" property="policeStationCode"/>
        <result column="police_station_name" property="policeStationName"/>
        <result column="geom" property="geom"/>
        <result column="sort" property="sort"/>
        <result column="create_time" property="createTime"/>
        <result column="create_user" property="createUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
 
 
    <select id="selectPoliceAffairsGridPage" resultMap="policeAffairsGridResultMap">
        select * from jczz_police_affairs_grid where is_deleted = 0
    </select>
 
    <!--判断该点在哪个警务网格-->
    <select id="spatialAnalysis" resultType="org.springblade.modules.police.entity.PoliceAffairsGridEntity">
        SELECT * FROM jczz_police_affairs_grid
        WHERE is_deleted = 0
        and ST_Intersects(geom, ST_GeomFromText(${point},0))
    </select>
 
    <!--判断该点在哪个警务网格-->
    <select id="getCommunityCodeListByUserId" resultType="java.lang.String">
        SELECT community_code FROM jczz_police_affairs_grid
        WHERE is_deleted = 0
        and police_user_id like concat('%',#{userId},'%')
    </select>
 
</mapper>