From 3d685203e77cd8deb2982856ee70f4d51d7ce8db Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Fri, 20 May 2022 11:33:42 +0800
Subject: [PATCH] 千灯转发数据添加恶臭两台微站数据

---
 src/main/resources/mapper/HistoryMapper.xml |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/HistoryMapper.xml b/src/main/resources/mapper/HistoryMapper.xml
index 743b83f..aa4967d 100644
--- a/src/main/resources/mapper/HistoryMapper.xml
+++ b/src/main/resources/mapper/HistoryMapper.xml
@@ -250,7 +250,7 @@
 
     <update id="createHistoryTable" parameterType="String">
         CREATE TABLE history_${yearMonthDay} (
-        `mac` varchar(20) DEFAULT NULL,
+        `mac` varchar(30) DEFAULT NULL,
         `value` json DEFAULT NULL,
         `time` datetime DEFAULT NULL,
         `version` int(11) DEFAULT NULL,
@@ -263,4 +263,11 @@
     <delete id="dropHistoryTable" parameterType="String">
         drop table history_${yearMonthDay}
     </delete>
+
+    <select id="selectLastDataByMac" resultType="com.moral.entity.History">
+        select * from history_${yearMonthDay}
+        where mac = #{mac}
+        order by time desc
+        limit 1
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0