jinpengyong
2023-12-15 2e1d289a38cf4e0dfe0f1c7301b7a365cda8d395
screen-api/src/main/resources/mapper/DeviceMapper.xml
@@ -210,11 +210,11 @@
    </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
@@ -228,13 +228,13 @@
            </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>