From 2c8b914f70a8b2425d3ede5941bce1cabe9c2931 Mon Sep 17 00:00:00 2001 From: cjl <chenjl@deyt.cn> Date: Tue, 04 Jul 2023 20:50:32 +0800 Subject: [PATCH] 日期排序提交 --- screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml b/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml index 2d3d74c..2f52e18 100644 --- a/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml +++ b/screen-api/src/main/resources/mapper/HistorySecondCruiserMapper.xml @@ -31,6 +31,16 @@ 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')) -- Gitblit v1.8.0