From 67fce8d2c430e7103f82dac054523153d43feb47 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Mon, 18 Dec 2023 13:24:53 +0800
Subject: [PATCH] chore:修改提交

---
 screen-api/src/main/resources/mapper/DeviceMapper.xml |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/screen-api/src/main/resources/mapper/DeviceMapper.xml b/screen-api/src/main/resources/mapper/DeviceMapper.xml
index 7cf8024..94613fe 100644
--- a/screen-api/src/main/resources/mapper/DeviceMapper.xml
+++ b/screen-api/src/main/resources/mapper/DeviceMapper.xml
@@ -210,13 +210,13 @@
     </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.value ->> #{type} ) as count,
         hd.time
         FROM
         device as d
@@ -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>
\ No newline at end of file

--
Gitblit v1.8.0