1120 lines
55 KiB
XML
1120 lines
55 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.DfLogSearchDaoCluster">
|
|
<!-- 所有日志表的公共属性 -->
|
|
<sql id="commonPorperty">
|
|
CFG_ID,FOUND_TIME,RECV_TIME,
|
|
OVER_ID,PROTOCOL,SERVER_IP,CLIENT_IP,
|
|
SERVER_PORT,CLIENT_PORT,NEST_PROTOCOL,
|
|
NEST_SERVER_IP,NEST_CLIENT_IP,NEST_SERVER_PORT,
|
|
NEST_CLIENT_PORT,SERVICE_TYPE,ENTRANCE_ID,CLJ_IP,
|
|
SCENE_FILE,ACTION,SERVER_LOCATE,CLIENT_LOCATE,INJECTED_PKT_FILE
|
|
</sql>
|
|
<resultMap id="DfIpPortLogClusterMap" type="com.nis.domain.restful.DfIpPortLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
</resultMap>
|
|
<!-- DF_IP_PORT_LOG日志查询 -->
|
|
<select id="findIpPortLogsCluster" parameterType="com.nis.domain.restful.DfIpPortLog" resultMap="DfIpPortLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_HTTP_REQ_LOG -->
|
|
<sql id="httpReqProperty">
|
|
,C2S_ISN,HTTP_PROXY_FLAG,HTTP_SEQ,URL,REQ_LINE,REQ_HDR_FILE,REQ_BODY_FILE,COOKIE,REFERER,UA,USER_DEFINE_KEY,USER_DEFINE_VALUE
|
|
</sql>
|
|
<resultMap id="DfHttpReqLogClusterMap" type="com.nis.domain.restful.DfHttpReqLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="c2s_Isn" jdbcType="BIGINT" property="c2sIsn" />
|
|
<result column="http_Proxy_Flag" jdbcType="BIGINT" property="httpProxyFlag" />
|
|
<result column="http_Seq" jdbcType="BIGINT" property="httpSeq" />
|
|
<result column="url" jdbcType="VARCHAR" property="url" />
|
|
<result column="req_Line" jdbcType="VARCHAR" property="reqLine" />
|
|
<result column="req_Hdr_File" jdbcType="VARCHAR" property="reqHdrFile" />
|
|
<result column="req_Body_File" jdbcType="VARCHAR" property="reqBodyFile" />
|
|
<result column="COOKIE" jdbcType="VARCHAR" property="cookie" />
|
|
<result column="REFERER" jdbcType="VARCHAR" property="referer" />
|
|
<result column="UA" jdbcType="VARCHAR" property="ua" />
|
|
<result column="USER_DEFINE_KEY" jdbcType="VARCHAR" property="reqUserDefineKey" />
|
|
<result column="USER_DEFINE_VALUE" jdbcType="VARCHAR" property="reqUserDefineValue" />
|
|
</resultMap>
|
|
<select id="findHttpReqLogsCluster" parameterType="com.nis.domain.restful.DfHttpReqLog" resultMap="DfHttpReqLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="httpReqProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchUrl != null and searchUrl !=''">
|
|
AND URL = #{searchUrl}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<!-- DF_HTTP_RES_LOG -->
|
|
<sql id="httpResProperty">
|
|
,C2S_ISN,HTTP_PROXY_FLAG,HTTP_SEQ,URL,REQ_LINE,REQ_HDR_FILE,
|
|
REQ_BODY_FILE,RES_LINE,RES_HDR_FILE,RES_BODY_FILE,SET_COOKIE,
|
|
CONTENT_LEN,CONTENT_TYPE,USER_DEFINE_KEY,USER_DEFINE_VALUE
|
|
|
|
</sql>
|
|
<resultMap id="DfHttpResLogClusterMap" type="com.nis.domain.restful.DfHttpResLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="C2S_ISN" jdbcType="BIGINT" property="c2sIsn" />
|
|
<result column="HTTP_PROXY_FLAG" jdbcType="BIGINT" property="httpProxyFlag" />
|
|
<result column="HTTP_SEQ" jdbcType="BIGINT" property="httpSeq" />
|
|
<result column="URL" jdbcType="VARCHAR" property="url" />
|
|
<result column="REQ_LINE" jdbcType="VARCHAR" property="reqLine" />
|
|
<result column="REQ_HDR_FILE" jdbcType="VARCHAR" property="reqHdrFile" />
|
|
<result column="REQ_BODY_FILE" jdbcType="VARCHAR" property="reqBodyFile" />
|
|
<result column="RES_LINE" jdbcType="VARCHAR" property="resLine" />
|
|
<result column="RES_HDR_FILE" jdbcType="VARCHAR" property="resHdrFile" />
|
|
<result column="RES_BODY_FILE" jdbcType="VARCHAR" property="resBodyFile" />
|
|
<result column="SET_COOKIE" jdbcType="VARCHAR" property="setCookie" />
|
|
<result column="CONTENT_LEN" jdbcType="VARCHAR" property="contentLen" />
|
|
<result column="CONTENT_TYPE" jdbcType="VARCHAR" property="contentType" />
|
|
<result column="USER_DEFINE_KEY" jdbcType="VARCHAR" property="resUserDefineKey" />
|
|
<result column="USER_DEFINE_VALUE" jdbcType="VARCHAR" property="resUserDefineValue" />
|
|
|
|
</resultMap>
|
|
<select id="findHttpResLogsCluster" parameterType="com.nis.domain.restful.DfHttpResLog" resultMap="DfHttpResLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="httpResProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchUrl != null and searchUrl !=''">
|
|
AND URL = #{searchUrl}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_HTTP_Keyword_LOG -->
|
|
<sql id="httpKeywordProperty">
|
|
,C2S_ISN,HTTP_PROXY_FLAG,HTTP_SEQ,URL,REQ_LINE,REQ_HDR_FILE,
|
|
REQ_BODY_FILE,RES_LINE,RES_HDR_FILE,RES_BODY_FILE
|
|
</sql>
|
|
<resultMap id="DfHttpKeywordLogClusterMap" type="com.nis.domain.restful.DfHttpKeywordLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="C2S_ISN" jdbcType="BIGINT" property="c2sIsn" />
|
|
<result column="HTTP_PROXY_FLAG" jdbcType="BIGINT" property="httpProxyFlag" />
|
|
<result column="HTTP_SEQ" jdbcType="BIGINT" property="httpSeq" />
|
|
<result column="URL" jdbcType="VARCHAR" property="url" />
|
|
<result column="REQ_LINE" jdbcType="VARCHAR" property="reqLine" />
|
|
<result column="REQ_HDR_FILE" jdbcType="VARCHAR" property="reqHdrFile" />
|
|
<result column="REQ_BODY_FILE" jdbcType="VARCHAR" property="reqBodyFile" />
|
|
<result column="RES_LINE" jdbcType="VARCHAR" property="resLine" />
|
|
<result column="RES_HDR_FILE" jdbcType="VARCHAR" property="resHdrFile" />
|
|
<result column="RES_BODY_FILE" jdbcType="VARCHAR" property="resBodyFile" />
|
|
|
|
</resultMap>
|
|
<select id="findHttpKeywordLogsCluster" parameterType="com.nis.domain.restful.DfHttpKeywordLog" resultMap="DfHttpKeywordLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="httpKeywordProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchUrl != null and searchUrl !=''">
|
|
AND URL = #{searchUrl}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_MAIL_LOG -->
|
|
<sql id="mailProperty">
|
|
,MAIL_PROTO,MAIL_FROM,MAIL_TO,SUBJECT,EML_FILE
|
|
</sql>
|
|
<resultMap id="DfMailLogClusterMap" type="com.nis.domain.restful.DfMailLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="MAIL_PROTO" jdbcType="VARCHAR" property="mailProto" />
|
|
<result column="MAIL_FROM" jdbcType="VARCHAR" property="mailFrom" />
|
|
<result column="MAIL_TO" jdbcType="VARCHAR" property="mailTo" />
|
|
<result column="SUBJECT" jdbcType="VARCHAR" property="subject" />
|
|
<result column="EML_FILE" jdbcType="VARCHAR" property="emlFile" />
|
|
</resultMap>
|
|
<select id="findMailLogsCluster" parameterType="com.nis.domain.restful.DfMailLog" resultMap="DfMailLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="mailProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchMailFrom != null and searchMailFrom !=''">
|
|
AND MAIL_FROM = #{searchMailFrom}
|
|
</if>
|
|
<if test="searchMailTo != null and searchMailTo !=''">
|
|
AND MAIL_TO = #{searchMailTo}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_DNS_LOG -->
|
|
<sql id="dnsProperty">
|
|
,RD,QTYPE,QCLASS,OPCODE,QNAME,CHEAT_TYPE
|
|
,CHEAT_RCODE,CHEAT_STRATEGY,CHEAT_Rr
|
|
</sql>
|
|
<resultMap id="DfDnsLogClusterMap" type="com.nis.domain.restful.DfDnsLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="rd" jdbcType="BIGINT" property="rd" />
|
|
<result column="qtype" jdbcType="BIGINT" property="qtype" />
|
|
<result column="qclass" jdbcType="BIGINT" property="qclass" />
|
|
<result column="opcode" jdbcType="BIGINT" property="opcode" />
|
|
<result column="qname" jdbcType="VARCHAR" property="qname" />
|
|
<result column="cheat_type" jdbcType="VARCHAR" property="cheatType" />
|
|
<result column="cheat_rcode" jdbcType="BIGINT" property="cheatRcode" />
|
|
<result column="cheat_strategy" jdbcType="VARCHAR" property="cheatStrategy" />
|
|
<result column="cheat_rr" jdbcType="VARCHAR" property="cheatRr" />
|
|
</resultMap>
|
|
<select id="findDnsLogsCluster" parameterType="com.nis.domain.restful.DfDnsLog" resultMap="DfDnsLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="dnsProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_FTP_LOG -->
|
|
<sql id="ftpProperty">
|
|
,FTP_URL
|
|
</sql>
|
|
<resultMap id="DfFtpLogClusterMap" type="com.nis.domain.restful.DfFtpLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="ftp_url" jdbcType="VARCHAR" property="ftpUrl" />
|
|
</resultMap>
|
|
<select id="findFtpLogsCluster" parameterType="com.nis.domain.restful.DfFtpLog" resultMap="DfFtpLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="ftpProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_PPTP_LOG -->
|
|
<sql id="pptpProperty">
|
|
,TUNNEL_TYPE,ENCRYPT_MODE,CONTENT_TYPE
|
|
</sql>
|
|
<resultMap id="DfPptpLogClusterMap" type="com.nis.domain.restful.DfPptpLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="tunnel_type" jdbcType="INTEGER" property="tunnelType" />
|
|
<result column="encrypt_mode" jdbcType="INTEGER" property="encryptMode" />
|
|
<result column="CONTENT_TYPE" jdbcType="INTEGER" property="contentType" />
|
|
</resultMap>
|
|
<select id="findPptpLogsCluster" parameterType="com.nis.domain.restful.DfPptpLog" resultMap="DfPptpLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="pptpProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchEncryptMode != null and searchEncryptMode !=''">
|
|
AND ENCRYPT_MODE = #{searchEncryptMode}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_L2TP_LOG -->
|
|
<sql id="l2tpProperty">
|
|
,TUNNEL_TYPE,ENCRYPT_MODE,CHAP_NAME,CONTENT_TYPE
|
|
</sql>
|
|
<resultMap id="DfL2tpLogClusterMap" type="com.nis.domain.restful.DfL2tpLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="tunnel_type" jdbcType="INTEGER" property="tunnelType" />
|
|
<result column="encrypt_mode" jdbcType="INTEGER" property="encryptMode" />
|
|
<result column="chap_name" jdbcType="VARCHAR" property="chapName" />
|
|
<result column="CONTENT_TYPE" jdbcType="INTEGER" property="contentType" />
|
|
</resultMap>
|
|
<select id="findL2tpLogsCluster" parameterType="com.nis.domain.restful.DfL2tpLog" resultMap="DfL2tpLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="l2tpProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchEncryptMode != null and searchEncryptMode !=''">
|
|
AND ENCRYPT_MODE = #{searchEncryptMode}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_IPSEC_LOG -->
|
|
<sql id="ipsecProperty">
|
|
,EX_PROTOCOL,ISAKMP_MODE
|
|
</sql>
|
|
<resultMap id="DfIpsecLogClusterMap" type="com.nis.domain.restful.DfIpsecLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="ex_protocol" jdbcType="INTEGER" property="exProtocol" />
|
|
<result column="isakmp_mode" jdbcType="INTEGER" property="isakmpMode" />
|
|
</resultMap>
|
|
<select id="findIpsecLogsCluster" parameterType="com.nis.domain.restful.DfIpsecLog" resultMap="DfIpsecLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="ipsecProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchExProtocol != null and searchExProtocol !=''">
|
|
AND EX_PROTOCOL = #{searchExProtocol}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_OPENVPN_LOG -->
|
|
<sql id="openvpnProperty">
|
|
,VERSION,ENCRYPT_MODE,HMAC,TUNNEL_TYPE
|
|
</sql>
|
|
<resultMap id="DfOpenvpnLogClusterMap" type="com.nis.domain.restful.DfOpenvpnLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="VERSION" jdbcType="VARCHAR" property="version" />
|
|
<result column="ENCRYPT_MODE" jdbcType="VARCHAR" property="encryptMode" />
|
|
<result column="HMAC" jdbcType="INTEGER" property="hmac" />
|
|
<result column="TUNNEL_TYPE" jdbcType="INTEGER" property="tunnelType" />
|
|
</resultMap>
|
|
<select id="findOpenvpnLogsCluster" parameterType="com.nis.domain.restful.DfOpenvpnLog" resultMap="DfOpenvpnLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="openvpnProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchEncryptMode != null and searchEncryptMode !=''">
|
|
AND ENCRYPT_MODE = #{searchEncryptMode}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_SSH_LOG -->
|
|
<sql id="sshProperty">
|
|
,VERSION,HOST_KEY,HOST_COOKIE,ENCRYPT_MODE,MAC,TUNNEL_TYPE
|
|
</sql>
|
|
<resultMap id="DfSshLogClusterMap" type="com.nis.domain.restful.DfSshLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="VERSION" jdbcType="VARCHAR" property="version" />
|
|
<result column="HOST_KEY" jdbcType="VARCHAR" property="hostKey" />
|
|
<result column="HOST_COOKIE" jdbcType="VARCHAR" property="hostCookie" />
|
|
<result column="ENCRYPT_MODE" jdbcType="VARCHAR" property="encryptMode" />
|
|
<result column="MAC" jdbcType="VARCHAR" property="mac" />
|
|
<result column="TUNNEL_TYPE" jdbcType="INTEGER" property="tunnelType" />
|
|
</resultMap>
|
|
<select id="findSshLogsCluster" parameterType="com.nis.domain.restful.DfSshLog" resultMap="DfSshLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="sshProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchEncryptMode != null and searchEncryptMode !=''">
|
|
AND ENCRYPT_MODE = #{searchEncryptMode}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_SSL_LOG -->
|
|
<sql id="sslProperty">
|
|
,VERSION,SNI,INDIVIDUAL_CERT_FILE,MIDDLE_CERT_FILE,ROOT_CERT_FILE,CHAIN_CERT_FILE
|
|
</sql>
|
|
<resultMap id="DfSslLogClusterMap" type="com.nis.domain.restful.DfSslLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="VERSION" jdbcType="VARCHAR" property="version" />
|
|
<result column="SNI" jdbcType="VARCHAR" property="sni" />
|
|
<result column="INDIVIDUAL_CERT_FILE" jdbcType="VARCHAR" property="individualCertFile" />
|
|
<result column="MIDDLE_CERT_FILE" jdbcType="VARCHAR" property="middleCertFile" />
|
|
<result column="ROOT_CERT_FILE" jdbcType="VARCHAR" property="rootCertFile" />
|
|
<result column="CHAIN_CERT_FILE" jdbcType="VARCHAR" property="chainCertFile" />
|
|
</resultMap>
|
|
<select id="findSslLogsCluster" parameterType="com.nis.domain.restful.DfSslLog" resultMap="DfSslLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="sslProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
<!-- DF_TUNNEL_RANDOM_LOG -->
|
|
<sql id="tunnelRandomProperty">
|
|
,TUNNEL_NAME
|
|
</sql>
|
|
<resultMap id="DfTunnelRandomLogClusterMap" type="com.nis.domain.restful.DfTunnelRandomLog">
|
|
<result column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
|
<result column="found_Time" jdbcType="BIGINT" property="foundTimeCluster" />
|
|
<result column="recv_Time" jdbcType="BIGINT" property="recvTimeCluster" />
|
|
<result column="over_Id" jdbcType="VARCHAR" property="overId" />
|
|
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
|
<result column="server_Ip" jdbcType="VARCHAR" property="serverIp" />
|
|
<result column="client_Ip" jdbcType="VARCHAR" property="clientIp" />
|
|
<result column="server_Port" jdbcType="INTEGER" property="serverPort" />
|
|
<result column="client_Port" jdbcType="INTEGER" property="clientPort" />
|
|
<result column="nest_Protocol" jdbcType="VARCHAR" property="nestProtocol" />
|
|
<result column="nest_Server_Ip" jdbcType="VARCHAR" property="nestServerIp" />
|
|
<result column="nest_Client_Ip" jdbcType="VARCHAR" property="nestClientIp" />
|
|
<result column="nest_Server_Port" jdbcType="INTEGER" property="nestServerPort" />
|
|
<result column="nest_Client_Port" jdbcType="INTEGER" property="nestClientPort" />
|
|
<result column="service_Type" jdbcType="INTEGER" property="serviceType" />
|
|
<result column="entrance_Id" jdbcType="BIGINT" property="entranceId" />
|
|
<result column="clj_Ip" jdbcType="VARCHAR" property="cljIp" />
|
|
<result column="SCENE_FILE" jdbcType="VARCHAR" property="sceneFile" />
|
|
<result column="action" jdbcType="INTEGER" property="action" />
|
|
<result column="server_Locate" jdbcType="VARCHAR" property="serverLocate" />
|
|
<result column="client_Locate" jdbcType="VARCHAR" property="clientLocate" />
|
|
<result column="INJECTED_PKT_FILE" jdbcType="VARCHAR" property="injectedPktFile" />
|
|
<result column="TUNNEL_NAME" jdbcType="INTEGER" property="tunnelName" />
|
|
</resultMap>
|
|
<select id="findTunnelRandomLogsCluster" parameterType="com.nis.domain.restful.DfTunnelRandomLog" resultMap="DfTunnelRandomLogClusterMap">
|
|
SELECT
|
|
<choose>
|
|
<when test="page !=null and page.fields != null and page.fields != ''">
|
|
${page.fields}
|
|
</when>
|
|
<otherwise>
|
|
<include refid="commonPorperty"/>
|
|
<include refid="tunnelRandomProperty"/>
|
|
</otherwise>
|
|
</choose>
|
|
FROM ${tableName}
|
|
<where>
|
|
<if test="searchServiceType != null and searchServiceType !=''">
|
|
AND SERVICE_TYPE = #{searchServiceType}
|
|
</if>
|
|
<if test="searchProtocol != null and searchProtocol !=''">
|
|
AND PROTOCOL = #{searchProtocol}
|
|
</if>
|
|
<if test="searchServerIp != null and searchServerIp !=''">
|
|
AND SERVER_IP = #{searchServerIp}
|
|
</if>
|
|
<if test="searchClientIp != null and searchClientIp !=''">
|
|
AND CLIENT_IP = #{searchClientIp}
|
|
</if>
|
|
<if test="searchEntranceId != null and searchEntranceId !=''">
|
|
AND ENTRANCE_ID = #{searchEntranceId}
|
|
</if>
|
|
<if test="searchCljIp != null and searchCljIp !=''">
|
|
AND CLJ_IP = #{searchCljIp}
|
|
</if>
|
|
<if test="searchCfgId != null and searchCfgId !=''">
|
|
AND CFG_ID =#{searchCfgId}
|
|
</if>
|
|
<if test="searchFoundStartTime != null and searchFoundStartTime !=''">
|
|
<![CDATA[AND FOUND_TIME >= ${searchFoundStartTimeCluster}]]>
|
|
</if>
|
|
<if test="searchFoundEndTime != null and searchFoundEndTime !=''">
|
|
<![CDATA[AND FOUND_TIME < ${searchFoundEndTimeCluster}]]>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper> |