From 81dc94a70de69f45f42b8ca4b702a3a372cf81ac Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Tue, 24 May 2022 09:59:07 +0800
Subject: [PATCH] 去除打印
---
src/main/resources/mapper/HistoryMapper.xml | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/HistoryMapper.xml b/src/main/resources/mapper/HistoryMapper.xml
index 0b3770c..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,
@@ -259,4 +259,15 @@
KEY `_idx_time` (`time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC
</update>
+
+ <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