From 246f2dd16a3bea029af143a9267d116d3532e095 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Wed, 05 Jun 2019 10:56:31 +0800
Subject: [PATCH] 增加溯源查询sql
---
src/main/resources/mapper/HistoryDailyMapper.xml | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/HistoryDailyMapper.xml b/src/main/resources/mapper/HistoryDailyMapper.xml
index 6fa840a..7628af6 100644
--- a/src/main/resources/mapper/HistoryDailyMapper.xml
+++ b/src/main/resources/mapper/HistoryDailyMapper.xml
@@ -94,4 +94,20 @@
vdd.monitor_point_id,
vdd.device_tech
</select>
+
+ <!-- ������������mac������������������������������������������������������ -->
+ <select id="getTraceabilityData" resultType="java.util.Map">
+ SELECT
+ json ->'$.${sensorKey}[0]' AS '${sensorKey}'
+ FROM
+ history_daily
+ <where>
+ <if test="mac!=null and mac!=''">
+ AND mac=#{mac}
+ </if>
+ <if test="time!=null and time!=''">
+ AND time=#{time}
+ </if>
+ </where>
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0