龚焕茏
2024-03-11 2bacd2670e0f1b495e9cfda6023d8bccc32a5572
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
<?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.dromara.demo.mapper.RsGeographyDataMapper">
 
    <select id="getGeographyData" resultType="java.util.Map">
        select b.type, count(id) as nums
        from rs_geography_data a
                 right join (select '事故易发多发路段' as type, 1 as sort
                             union all
                             select '重点旅游通道' as type, 2 as sort
                             union all
                             select '都江堰景区' as type, 3 as sort
                             union all
                             select '警力配备' as type, 4 as sort
                             union all
                             select '打围施工' as type, 5 as sort
                             union all
                             select '交通事故易发点' as type, 6 as sort
                             union all
                             select '重点运输企业' as type, 7 as sort
                             union all
                             select '公交线路' as type, 8 as sort
                             union all
                             select '安全隐患' as type, 9 as sort) b on a.type = b.type and a.status = 1
        group by b.type
        order by b.sort
    </select>
</mapper>