| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.alarm.accessAlarm.mapper.ArdAlarmAccessMapper"> |
| | | <mapper namespace="com.ruoyi.alarm.access.mapper.ArdAlarmAccessMapper"> |
| | | |
| | | <resultMap type="ArdAlarmAccess" id="ArdAlarmAccessResult"> |
| | | <result property="id" column="id" /> |
| | |
| | | |
| | | <select id="selectArdAlarmAccessList" parameterType="ArdAlarmAccess" resultMap="ArdAlarmAccessResult"> |
| | | <include refid="selectArdAlarmAccessVo"/> |
| | | <where> |
| | | <where> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND alarm_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND alarm_time <= to_timestamp(#{params.endTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | </where> |
| | | order by alarm_time desc |
| | | </select> |
| | | |
| | | <select id="selectArdAlarmAccessById" parameterType="String" resultMap="ArdAlarmAccessResult"> |
| | |
| | | and alarm_time <= #{alarmTime} |
| | | and view_time is null |
| | | </update> |
| | | |
| | | <select id="accessYear" resultType="com.ruoyi.statistical.vo.CountVo"> |
| | | select to_char(alarm_time::DATE, 'MM') as date,count(id) |
| | | from ard_alarm_access |
| | | where alarm_time >= #{start} and alarm_time <= #{end} group by date order by date |
| | | </select> |
| | | <select id="accessMonth" resultType="com.ruoyi.statistical.vo.CountVo"> |
| | | select to_char(alarm_time::DATE, 'dd') as date,count(id) |
| | | from ard_alarm_access |
| | | where alarm_time >= #{start} and alarm_time <= #{end} group by date order by date |
| | | </select> |
| | | </mapper> |