src/main/resources/mapper/HistoryDailyMapper.xml | ●●●●● patch | view | raw | blame | history |
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>