| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getHeatMap" resultType="java.util.Map"> |
| | | <select id="getHeatMap" resultType="com.moral.api.pojo.dto.dataDisplay.HeatMapDTO"> |
| | | SELECT |
| | | d.mac as mac, |
| | | d.latitude as lat, |
| | | d.longitude as lng, |
| | | d.mac as mac, |
| | | d.name as name, |
| | | (hd.value ->> '$.a34002' )+0 as count, |
| | | hd.time |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="tableName !=null"> |
| | | left join history_hourly${tableName} hd on hd.time = #{start} and d.mac = hd.mac |
| | | RIGHT join history_hourly${tableName} hd on hd.time = #{start} and d.mac = hd.mac |
| | | </if> |
| | | <if test="tableName ==null "> |
| | | left join history_daily hd on hd.time = #{start} and d.mac = hd.mac |
| | | RIGHT join history_daily hd on hd.time = #{start} and d.mac = hd.mac |
| | | </if> |
| | | WHERE |
| | | d.is_delete = 0 |
| | | order by hd.mac |
| | | order by d.mac |
| | | </select> |
| | | </mapper> |