| | |
| | | <if test="userId != null and userId != ''"> and user_id = #{userId}</if> |
| | | <if test="deptId != null "> and dept_id = #{deptId}</if> |
| | | </where> |
| | | order by alarm_time desc |
| | | </select> |
| | | |
| | | <select id="selectArdAlarmCameraById" parameterType="String" resultMap="ArdAlarmCameraResult"> |
| | |
| | | WHERE |
| | | T.rn = 1 |
| | | </select> |
| | | <select id="selectCountByAlarmTime" resultType="Integer"> |
| | | SELECT COUNT(DISTINCT aac.camera_name) |
| | | FROM ard_alarm_camera aac |
| | | WHERE aac.alarm_time >= CURRENT_TIMESTAMP - INTERVAL '%${refreshTime}%' MINUTE |
| | | </select> |
| | | </mapper> |