日志检索-ssl泛收接口修改 和 http泛收接口

This commit is contained in:
shangguanyanfei
2019-01-17 11:09:04 +08:00
parent 3bf82d68eb
commit 579ca529b5
9 changed files with 568 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
package com.nis.web.dao;
import java.util.List;
import com.nis.domain.restful.NtcHttpRecordLog;
@MyBatisDao
public interface NtcHttpRecordLogsDao {
//http泛收 查询
List<NtcHttpRecordLog> findNtcHttpRecordLogList(NtcHttpRecordLog obj);
}

View File

@@ -0,0 +1,86 @@
<?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.NtcHttpRecordLogsDao">
<resultMap id="NtcHttpRecordLogMaps" type="com.nis.domain.restful.NtcHttpRecordLog">
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
<result column="direction" jdbcType="INTEGER" property="direction" />
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
<result column="server_locate" jdbcType="VARCHAR" property="serverLocate" />
<result column="client_locate" jdbcType="VARCHAR" property="clientLocate" />
<result column="s_asn" jdbcType="VARCHAR" property="sAsn" />
<result column="d_asn" jdbcType="VARCHAR" property="dAsn" />
<result column="s_subscribe_id" jdbcType="VARCHAR" property="sSubscribeId" />
<result column="d_subscribe_id" jdbcType="VARCHAR" property="dSubscribeId" />
<result column="scene_file" jdbcType="VARCHAR" property="sceneFile" />
<result column="link_id" jdbcType="BIGINT" property="linkId" />
<result column="encap_type" jdbcType="INTEGER" property="encapType" />
<result column="inner_smac" jdbcType="VARCHAR" property="innerSmac" />
<result column="inner_dmac" jdbcType="VARCHAR" property="innerDmac" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="referer" jdbcType="VARCHAR" property="referer" />
</resultMap>
<select id="findNtcHttpRecordLogList" parameterType="com.nis.domain.restful.NtcHttpRecordLog" resultMap="NtcHttpRecordLogMaps">
select found_time,d_ip,s_ip,d_port,s_port,entrance_id,device_id,url,referer
from tbs_ods_ntc_collect_http_log
<where>
<if test="foundStartTime !=null and foundStartTime !=''">
and found_time &gt;= #{foundStartTime}
</if>
<if test="foundEndTime !=null and foundEndTime !=''">
and found_time &lt; #{foundEndTime}
</if>
<if test="searchDIp !=null and searchDIp !=''">
and d_ip = #{searchDIp}
</if>
<if test="searchSIp !=null and searchSIp !=''">
and s_ip = #{searchSIp}
</if>
<if test="searchEntranceId !=null and searchEntranceId !=''">
and entrance_id = #{entranceId}
</if>
<if test="searchUrl !=null and searchUrl !=''">
and url LIKE concat(concat('%',#{searchUrl}),'%')
</if>
<if test="searchReferer !=null and searchReferer !=''">
and referer = #{searchReferer}
</if>
<if test="searchDeviceId !=null and searchDeviceId !=''">
and device_id = #{deviceId}
</if>
<if test="searchDPort !=null and searchDPort !=''">
and d_port = #{dPort}
</if>
<if test="searchSPort !=null and searchSPort !=''">
and s_port = #{sPort}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy !=null and page.orderBy !=''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY found_time DESC
</otherwise>
</choose>
</select>
</mapper>

View File

@@ -0,0 +1,12 @@
package com.nis.web.dao;
import java.util.List;
import com.nis.domain.restful.NtcSslRecordLog;
@MyBatisDao
public interface NtcSslRecordLogsDao {
//ssl泛收 查询
List<NtcSslRecordLog> findNtcSslRecordLogList(NtcSslRecordLog obj);
}

View File

@@ -0,0 +1,113 @@
<?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.NtcSslRecordLogsDao">
<resultMap id="NtcSslRecordLogMaps" type="com.nis.domain.restful.NtcSslRecordLog">
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
<result column="found_time" jdbcType="TIMESTAMP" property="foundTime" />
<result column="recv_time" jdbcType="TIMESTAMP" property="recvTime" />
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
<result column="service" jdbcType="INTEGER" property="service" />
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
<result column="direction" jdbcType="INTEGER" property="direction" />
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
<result column="server_locate" jdbcType="VARCHAR" property="serverLocate" />
<result column="client_locate" jdbcType="VARCHAR" property="clientLocate" />
<result column="s_asn" jdbcType="VARCHAR" property="sAsn" />
<result column="d_asn" jdbcType="VARCHAR" property="dAsn" />
<result column="s_subscribe_id" jdbcType="VARCHAR" property="sSubscribeId" />
<result column="d_subscribe_id" jdbcType="VARCHAR" property="dSubscribeId" />
<result column="scene_file" jdbcType="VARCHAR" property="sceneFile" />
<result column="link_id" jdbcType="BIGINT" property="linkId" />
<result column="encap_type" jdbcType="INTEGER" property="encapType" />
<result column="inner_smac" jdbcType="VARCHAR" property="innerSmac" />
<result column="inner_dmac" jdbcType="VARCHAR" property="innerDmac" />
<result column="version" jdbcType="VARCHAR" property="version" />
<result column="sni" jdbcType="VARCHAR" property="sni" />
<result column="san" jdbcType="VARCHAR" property="san" />
<result column="cn" jdbcType="VARCHAR" property="cn" />
</resultMap>
<select id="findNtcSslRecordLogList" parameterType="com.nis.domain.restful.NtcSslRecordLog" resultMap="NtcSslRecordLogMaps">
select cfg_id,found_time,recv_time,trans_proto,addr_type,d_ip,s_ip,d_port,s_port,service,entrance_id,
device_id,direction,stream_dir,cap_ip,addr_list,user_region,server_locate,client_locate,s_asn,
d_asn,s_subscribe_id,d_subscribe_id,scene_file,link_id,encap_type,encap_type,inner_smac,inner_dmac,
version,sni,san,cn
from tbs_ods_ntc_collect_ssl_log
<where>
<if test="foundStartTime !=null and foundStartTime !=''">
and found_time &gt;= #{foundStartTime}
</if>
<if test="foundEndTime !=null and foundEndTime !=''">
and found_time &lt; #{foundEndTime}
</if>
<if test="searchCfgId !=null and searchCfgId !=''">
and cfg_id = #{cfgId}
</if>
<if test="searchTransProto !=null and searchTransProto !=''">
and trans_proto = #{searchTransProto}
</if>
<if test="searchDIp !=null and searchDIp !=''">
and d_ip = #{searchDIp}
</if>
<if test="searchSIp !=null and searchSIp !=''">
and s_ip = #{searchSIp}
</if>
<if test="searchDirection !=null and searchDirection !=''">
and direction = #{searchDirection}
</if>
<if test="searchService !=null and searchService !=''">
and service = #{searchService}
</if>
<if test="searchEntranceId !=null and searchEntranceId !=''">
and entrance_id = #{entranceId}
</if>
<if test="searchCapIp !=null and searchCapIp !=''">
and cap_ip = #{searchCapIp}
</if>
<if test="searchSAsn !=null and searchSAsn !=''">
and s_asn = #{searchSAsn}
</if>
<if test="searchDAsn !=null and searchDAsn !=''">
and d_asn = #{searchDAsn}
</if>
<if test="searchServerLocate !=null and searchServerLocate !=''">
and server_locate = #{searchServerLocate}
</if>
<if test="searchClientLocate !=null and searchClientLocate !=''">
and client_locate = #{searchClientLocate}
</if>
<if test="searchSSubscribeId !=null and searchSSubscribeId !=''">
and s_subscribe_id = #{searchSSubscribeId}
</if>
<if test="searchDSubscribeId !=null and searchDSubscribeId !=''">
and d_subscribe_id = #{searchDSubscribeId}
</if>
<if test="searchSni !=null and searchSni !=''">
and sni = #{searchSni}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy !=null and page.orderBy !=''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY found_time DESC
</otherwise>
</choose>
</select>
</mapper>