| | |
| | | <if test="beginUpdateTime != null "> |
| | | and s.update_time >= #{beginUpdateTime} |
| | | </if> |
| | | <if test="endUpdateTime != null "> |
| | | and s.update_time <= #{endUpdateTime} |
| | | </if> |
| | | </where> |
| | | </sql> |
| | | <sql id="sql_limit"> |
| | |
| | | |
| | | |
| | | </select> |
| | | <select id="selectMaxTemperature" resultType="java.util.Map"> |
| | | select max(s.temp) maxTemperature,min(s.temp) minTemperature |
| | | from sys_container_sensors as s |
| | | where |
| | | s.container_id = #{id} |
| | | and s.update_time >= #{beginDate} |
| | | <if test="endDate != null"> |
| | | and s.update_time < #{endDate} |
| | | </if> |
| | | </select> |
| | | <select id="selectMaxHumidity" resultType="java.util.Map"> |
| | | select max(s.humidity) maxHumidity, min(s.humidity) minHumidity |
| | | from sys_container_sensors as s |
| | | where |
| | | s.container_id = #{id} |
| | | and s.update_time >= #{beginDate} |
| | | <if test="endDate != null"> |
| | | and s.update_time < #{endDate} |
| | | </if> |
| | | </select> |
| | | <select id="selectMaxVoc" resultType="java.util.Map"> |
| | | select max(s.voc1) maxVoc, min(s.voc1) minVoc |
| | | from sys_container_sensors as s |
| | | where |
| | | s.container_id = #{id} |
| | | and s.update_time >= #{beginDate} |
| | | <if test="endDate != null"> |
| | | and s.update_time < #{endDate} |
| | | </if> |
| | | </select> |
| | | </mapper> |