From 5cc9bad191fa5c9dcf0c62ac1338d22027bb7183 Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Tue, 26 Sep 2023 19:48:43 +0800
Subject: [PATCH] feat:补充提交
---
screen-manage/src/main/resources/mapper/HistoryHourlyMapper.xml | 28 +++++++++-------------------
1 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/screen-manage/src/main/resources/mapper/HistoryHourlyMapper.xml b/screen-manage/src/main/resources/mapper/HistoryHourlyMapper.xml
index 104b6bf..641794c 100644
--- a/screen-manage/src/main/resources/mapper/HistoryHourlyMapper.xml
+++ b/screen-manage/src/main/resources/mapper/HistoryHourlyMapper.xml
@@ -2,27 +2,17 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.moral.api.mapper.HistoryHourlyMapper">
- <!-- ������������������������ -->
- <resultMap id="BaseResultMap" type="com.moral.api.entity.HistoryHourly">
- <result column="mac" property="mac"/>
- <result column="time" property="time"/>
- <result column="value" property="value"/>
- <result column="version" property="version"/>
- </resultMap>
-
- <insert id="insertHistoryHourlyUnAdjust">
- INSERT INTO history_hourly_${timeUnits} VALUES (#{mac}, #{time}, #{value}, #{version})
+ <insert id="insertHistoryHourly">
+ INSERT INTO history_hourly_${timeUnits}
+ VALUES (#{mac}, #{time}, #{value}, #{version})
</insert>
- <select id="getCountByMacAndTime" resultType="java.lang.Integer">
- SELECT count(1) FROM history_hourly_transition WHERE mac = #{mac} AND `time` = #{time}
+
+ <select id="selectHistoryHourly" resultType="java.util.Map">
+ SELECT `value`
+ FROM history_hourly_${timeUnits}
+ WHERE `time` = #{time}
+ and mac = #{mac}
</select>
- <insert id="insertHistoryHourlyTransition">
- INSERT INTO history_hourly_transition (mac, `time`, `value`, version) VALUES (#{mac}, #{time}, #{value}, #{version})
- </insert>
-
- <update id="updateHistoryTransition">
- UPDATE history_hourly_transition SET update_time = now() WHERE mac = #{mac} AND `time` = {time}
- </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0