龚焕茏
2024-03-11 2bacd2670e0f1b495e9cfda6023d8bccc32a5572
dujy-modules/dujy-demo/src/main/resources/mapper/demo/RsGeographyDataMapper.xml
@@ -4,4 +4,27 @@
"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>