From 19b72fbd2e6b30a23a06dd284619784a096bc896 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Thu, 26 Aug 2021 11:33:56 +0800
Subject: [PATCH] screen-manage                  单位转换插入添加日志功能                  修复organization插入Bug

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

diff --git a/screen-api/src/main/resources/mapper/DeviceMapper.xml b/screen-api/src/main/resources/mapper/DeviceMapper.xml
index 94cde21..5c54941 100644
--- a/screen-api/src/main/resources/mapper/DeviceMapper.xml
+++ b/screen-api/src/main/resources/mapper/DeviceMapper.xml
@@ -28,11 +28,14 @@
 
     <!--���������������������������-->
     <select id="getTrendChartData" resultType="java.util.Map">
-        SELECT
+        SELECT mac,
         DATE_FORMAT(`time`,#{dateFormat}) AS `time`,
         `value`->'$.${sensorCode}' AS '${sensorCode}'
         FROM history_${timeUnits}
-        WHERE mac = #{mac}
+        WHERE mac IN
+            <foreach collection="macs" item="mac" index="index" open="(" close=")" separator=",">
+                #{mac}
+            </foreach>
         AND `time` <![CDATA[>=]]> #{start}
         AND `time` <![CDATA[<]]> #{end}
         ORDER BY `time`

--
Gitblit v1.8.0