From 6f4e852b84c577454a4876f83c7085bd360fe4fb Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Tue, 17 Aug 2021 17:07:02 +0800 Subject: [PATCH] 特殊设备数据insert --- screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml b/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml index 5cde6ff..e806e90 100644 --- a/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml +++ b/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml @@ -8,19 +8,23 @@ `time` datetime DEFAULT NULL COMMENT '������������', `value` json DEFAULT NULL COMMENT '������', `version` INT (11) DEFAULT NULL COMMENT '������', - KEY `idx_mac` (`mac`), - KEY `idx_time` (`time`), KEY `idx_mac_time` (`mac`,`time`) ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '���������������' </update> - <select id="getHistoryFiveMinutelyData" resultType="java.util.LinkedHashMap"> + <select id="getHistoryMinutelyData" resultType="java.util.LinkedHashMap"> SELECT - mac, value + mac, `value`, version FROM history_minutely_${timeUnits} - WHERE time <![CDATA[>=]]> #{start} - AND time <![CDATA[<]]> #{end} + WHERE `time` <![CDATA[>=]]> #{start} + AND `time` <![CDATA[<]]> #{end} + <if test="macs != null"> + AND mac IN + <foreach collection="macs" item="mac" open="(" close=")" separator=","> + #{mac} + </foreach> + </if> </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0