<?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>
|