From 296d509996b9500c35be0b81860fa14c1d275048 Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Tue, 01 Dec 2020 10:47:51 +0800 Subject: [PATCH] 更改五分钟数据接口,添加界面左侧站点设备信息接口 --- src/main/resources/mapper/HistoryDailyMapper.xml | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/resources/mapper/HistoryDailyMapper.xml b/src/main/resources/mapper/HistoryDailyMapper.xml index 78e7f3f..4d4fe67 100644 --- a/src/main/resources/mapper/HistoryDailyMapper.xml +++ b/src/main/resources/mapper/HistoryDailyMapper.xml @@ -14,10 +14,10 @@ hd.mac = vdi.mac AND vdi.monitor_point_id = mp.id AND vdi.device_tech = 1 - <if test="monitorPointId != null and monitorPointId!=''"> + <if test="monitorPointId != null"> AND mp.id = #{monitorPointId} </if> - <if test="mac != null and mac!=''"> + <if test="mac != null"> AND hd.mac = #{mac} </if> <if test="start != null"> @@ -111,12 +111,20 @@ FROM history_daily <where> - <if test="mac!=null and mac!=''"> + <if test="mac!=null"> AND mac=#{mac} </if> - <if test="time!=null and time!=''"> + <if test="time!=null"> AND time=#{time} </if> </where> </select> + + <!-- ������������mac������������������������������������������������������ --> + <select id="getDataByTimeSlot" resultType="java.util.Map"> + SELECT * + FROM history_daily + where mac=#{mac} + AND time between #{startTime} and #{endTime} + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0