| | |
| | | AND h.time = (SELECT max(time) FROM history_five_minutely_${timeUnits}) |
| | | </select> |
| | | |
| | | <select id="listResult" resultType="com.moral.api.entity.HistoryFiveMinutely"> |
| | | SELECT mac,time,value FROM history_five_minutely${table} |
| | | WHERE (mac = #{mac} AND time BETWEEN #{startDate} AND #{endDate}) |
| | | order by time desc |
| | | </select> |
| | | <select id="listResultOne" resultType="com.moral.api.entity.HistoryFiveMinutely"> |
| | | SELECT mac,time,value FROM history_five_minutely${table} |
| | | WHERE (mac = #{mac}) |
| | | order by time desc |
| | | limit 1 |
| | | </select> |
| | | </mapper> |