From 72bc0dae229a9edb7515dea574a24cef6ee9ca7c Mon Sep 17 00:00:00 2001
From: cjl <chenjl@deyt.cn>
Date: Wed, 12 Jul 2023 21:06:28 +0800
Subject: [PATCH] chore:测试提交

---
 screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml b/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml
index 41b2d2f..2f52e18 100644
--- a/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml
+++ b/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml
@@ -26,8 +26,35 @@
         `value`
         FROM `history_second_cruiser`
         WHERE mac = #{mac}
-        AND `time` LIKE #{time}"%"
+        AND `time` <![CDATA[>=]]> #{time1}
+        AND `time` <![CDATA[<=]]> #{time2}
         AND organization_id = #{orgId}
     </select>
 
+    <select id="getCruiserDataNewAvg" resultType="com.moral.api.pojo.dto.historySecondCruiser.HistorySecondCruiserListDTO">
+        select  DATE_FORMAT(`time`, #{dateFormat}) AS time,value ->>'$.flylat' as flyLat,value ->>'$.flylon' as flyLon ,
+           value ->> #{type} as num
+        from history_second_cruiser
+        WHERE mac = #{mac}
+          AND `time` <![CDATA[>=]]> #{time1}
+          AND `time` <![CDATA[<=]]> #{time2}
+          AND organization_id = #{orgId}
+        order by time
+    </select>
+
+    <select id="getDaily" resultType="java.lang.String">
+        select AVG(JSON_EXTRACT(value,'$.dustld'))
+        from `history_second_cruiser`
+        WHERE mac = #{mac}
+          AND `time` <![CDATA[>=]]> #{time1}
+          AND `time` <![CDATA[<=]]> #{time2}
+    </select>
+
+    <select id="getDust" resultType="java.lang.Double">
+        select JSON_EXTRACT(value,'$.dustld')
+        from `history_second_cruiser`
+        WHERE mac = #{mac}
+          AND `time` <![CDATA[>=]]> #{start}
+          AND `time` <![CDATA[<=]]> #{end}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0