‘liusuyi’
2023-07-03 b5b9378fcc0013a8b95d654f3aa09905c224182c
ard-work/src/main/resources/mapper/alarm/ArdAlarmCameraMapper.xml
@@ -52,6 +52,7 @@
            <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">
@@ -160,4 +161,10 @@
        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
          and aac.view_time is null
    </select>
</mapper>