75 lines
3.4 KiB
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> |