From 8b19772f103986f222b44b302c3b02da3dc19cf4 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Tue, 31 Oct 2023 11:07:50 +0800
Subject: [PATCH] chore:补充提交
---
screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml b/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml
index 9d0ac23..34464fa 100644
--- a/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml
+++ b/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml
@@ -4,7 +4,7 @@
<update id="createTable" parameterType="String">
CREATE TABLE IF NOT EXISTS `history_minutely_${timeUnits}` (
- `mac` VARCHAR (20) DEFAULT NULL COMMENT '������mac',
+ `mac` VARCHAR (30) DEFAULT NULL COMMENT '������mac',
`time` datetime DEFAULT NULL COMMENT '������������',
`value` json DEFAULT NULL COMMENT '������',
`version` INT (11) DEFAULT NULL COMMENT '������',
@@ -27,6 +27,22 @@
</if>
</select>
+ <select id="getHistoryMinutelyMacData" resultType="java.lang.String">
+ SELECT
+ mac
+ FROM
+ history_minutely_${timeUnits}
+ 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>
+ group by mac
+ </select>
+
<select id="getHourlyData" resultType="java.util.Map">
SELECT mac, `time`, `value`
FROM history_minutely_${timeUnits}
--
Gitblit v1.8.0