This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-argus-service/src/main/java/com/nis/web/dao/EventServiceDao.xml

75 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nis.web.dao.EventServiceDao">
<select id="getEventsKeyProtection" resultType="com.nis.domain.restful.EventKeyProtection"
useCache="false" flushCache="true">
SELECT task_time as taskTime,
report_time as reportTime,
task_id as taskId,
task_name as taskName,
letter_num as letterNum,
config_num as configNum,
monitor_num as monitorTime,
control_num as controlerNum
FROM ntc_major_task_report
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND report_time >= #{searchReportStartTime}]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND report_time < #{searchReportEndTime}]]>
</if>
<if test="searchTaskStartTime != null and searchTaskStartTime !=''">
<![CDATA[AND task_time >= #{searchTaskStartTime}]]>
</if>
<if test="searchTaskEndTime != null and searchTaskEndTime !=''">
<![CDATA[AND task_time < #{searchTaskEndTime}]]>
</if>
<if test="taskId != null and taskId !='' and taskId != 0">
AND task_id = #{taskId}
</if>
<if test="taskName != null and taskName !=''">
AND task_name like concat(concat('%',#{taskName}),'%')
</if>
</where>
order by taskId asc;
</select>
<select id="getEventsMonitorOrBlock" resultType="com.nis.domain.restful.EventMonitorOrBlock"
useCache="false" flushCache="true">
SELECT task_time as taskTime,
report_time as reportTime,
task_id as taskId,
task_name as taskName,
ip_num as ipNum,
http_num as httpNum,
mail_num as mailNum,
vedio_num as vedioNum,
agent_num as agentNum
FROM ntc_task_report
<where>
<if test="searchReportStartTime != null and searchReportStartTime !=''">
<![CDATA[AND report_time >= #{searchReportStartTime}]]>
</if>
<if test="searchReportEndTime != null and searchReportEndTime !=''">
<![CDATA[AND report_time < #{searchReportEndTime}]]>
</if>
<if test="searchTaskStartTime != null and searchTaskStartTime !=''">
<![CDATA[AND task_time >= #{searchTaskStartTime}]]>
</if>
<if test="searchTaskEndTime != null and searchTaskEndTime !=''">
<![CDATA[AND task_time < #{searchTaskEndTime}]]>
</if>
<if test="taskId != null and taskId !='' and taskId != 0">
AND task_id = #{taskId}
</if>
<if test="reportType != null and reportType !=''">
AND report_type = #{reportType}
</if>
<if test="taskName != null and taskName !=''">
AND task_name like concat(concat('%',#{taskName}),'%')
</if>
</where>
order by taskId asc;
</select>
</mapper>