| | |
| | | <if test="recordUrl != null and recordUrl != ''">and record_url = #{recordUrl}</if> |
| | | <if test="viewTime != null ">and view_time = #{viewTime}</if> |
| | | </where> |
| | | order by alarm_time desc |
| | | </select> |
| | | |
| | | <select id="selectArdAlarmTubeById" parameterType="String" resultMap="ArdAlarmTubeResult"> |
| | |
| | | ) T |
| | | WHERE T.rn = 1 |
| | | </select> |
| | | <select id="selectCountByStartTime" resultType="Integer"> |
| | | <select id="selectCountByAlarmTime" resultType="Integer"> |
| | | SELECT COUNT(DISTINCT aat.tube_id) |
| | | FROM ard_alarm_tube aat |
| | | WHERE aat.alarm_time >= CURRENT_TIMESTAMP - INTERVAL '%${refreshTime}%' MINUTE |