From 73c9bf4f63aaa04c60bde8174d590169b3ae8aa7 Mon Sep 17 00:00:00 2001 From: lizijie <lzjiiie@163.com> Date: Fri, 12 Nov 2021 15:47:41 +0800 Subject: [PATCH] 判断时间,修改臭氧8小时滑动平均值 --- screen-job/src/main/resources/mapper/HistoryHourlyMapper.xml | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/screen-job/src/main/resources/mapper/HistoryHourlyMapper.xml b/screen-job/src/main/resources/mapper/HistoryHourlyMapper.xml index bd1b0e3..8f133ca 100644 --- a/screen-job/src/main/resources/mapper/HistoryHourlyMapper.xml +++ b/screen-job/src/main/resources/mapper/HistoryHourlyMapper.xml @@ -7,12 +7,13 @@ `mac` VARCHAR (20) DEFAULT NULL COMMENT '������mac', `time` datetime DEFAULT NULL COMMENT '������������', `value` json DEFAULT NULL COMMENT '������', + `version` INT(11) DEFAULT NULL COMMENT '������', KEY `idx_mac_time` (`mac`,`time`) ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '���������������' </update> <insert id="insertHistoryHourly"> - INSERT INTO history_hourly VALUES + INSERT INTO history_hourly_${timeUnits} VALUES <foreach collection="list" item="item" separator=","> (#{item.mac}, #{item.time}, #{item.value}, #{item.version}) </foreach> @@ -26,7 +27,7 @@ </select> <select id="selectDailyData" resultType="java.util.Map"> - SELECT mac, `value` + SELECT mac, `time`, `value` FROM history_hourly_${timeUnits} WHERE `time` <![CDATA[>=]]> #{start} AND `time` <![CDATA[<]]> #{end} -- Gitblit v1.8.0