From b157e41411b77abcbb0e9d3d59fabc1d951b47ad Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Thu, 14 Dec 2023 15:36:05 +0800 Subject: [PATCH] fix:立行立改增加经纬度 --- screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml b/screen-job/src/main/resources/mapper/HistoryMinutelyMapper.xml index e806e90..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,4 +27,27 @@ </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} + WHERE `time` <![CDATA[>=]]> #{start} + AND `time` <![CDATA[<]]> #{end} + </select> + </mapper> \ No newline at end of file -- Gitblit v1.8.0