日志检索-ssl泛收接口字段排序修改 和 http泛收接口修改
This commit is contained in:
@@ -29,8 +29,6 @@ public class NtcHttpRecordLog extends LogEntity {
|
||||
protected String searchSPort; //源端口查询条件
|
||||
protected String searchReferer; //入口页面查询条件
|
||||
|
||||
protected Long foundStartTime;//开始发现时间(时间戳类型)
|
||||
protected Long foundEndTime;//结束发现时间(时间戳类型)
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
@@ -119,22 +117,6 @@ public class NtcHttpRecordLog extends LogEntity {
|
||||
public void setSearchReferer(String searchReferer) {
|
||||
this.searchReferer = searchReferer;
|
||||
}
|
||||
@JsonIgnore
|
||||
public Long getFoundStartTime() {
|
||||
return foundStartTime;
|
||||
}
|
||||
|
||||
public void setFoundStartTime(Long foundStartTime) {
|
||||
this.foundStartTime = foundStartTime;
|
||||
}
|
||||
@JsonIgnore
|
||||
public Long getFoundEndTime() {
|
||||
return foundEndTime;
|
||||
}
|
||||
|
||||
public void setFoundEndTime(Long foundEndTime) {
|
||||
this.foundEndTime = foundEndTime;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,9 +26,7 @@ public class NtcSslRecordLog extends LogEntity {
|
||||
|
||||
@ApiModelProperty(value="SNI", required=true)
|
||||
protected String searchSni ;
|
||||
|
||||
protected Long foundStartTime;//开始发现时间(时间戳类型)
|
||||
protected Long foundEndTime;//结束发现时间(时间戳类型)
|
||||
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
@@ -76,22 +74,6 @@ public class NtcSslRecordLog extends LogEntity {
|
||||
public String getSearchSni() {
|
||||
return searchSni;
|
||||
}
|
||||
@JsonIgnore
|
||||
public Long getFoundStartTime() {
|
||||
return foundStartTime;
|
||||
}
|
||||
|
||||
public void setFoundStartTime(Long foundStartTime) {
|
||||
this.foundStartTime = foundStartTime;
|
||||
}
|
||||
@JsonIgnore
|
||||
public Long getFoundEndTime() {
|
||||
return foundEndTime;
|
||||
}
|
||||
|
||||
public void setFoundEndTime(Long foundEndTime) {
|
||||
this.foundEndTime = foundEndTime;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1533,40 +1533,5 @@
|
||||
-->
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="NtcSslRecordLogMap" 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>
|
||||
</mapper>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?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">
|
||||
<resultMap id="NtcHttpRecordLogMap" 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="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" />
|
||||
@@ -36,16 +36,16 @@
|
||||
</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
|
||||
<select id="findNtcHttpRecordLogList" parameterType="com.nis.domain.restful.NtcHttpRecordLog" resultMap="NtcHttpRecordLogMap">
|
||||
select toDateTime(found_time) 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 >= #{foundStartTime}
|
||||
<if test="searchFoundStartTime !=null and searchFoundStartTime !=''">
|
||||
and found_time >= toDateTime(#{searchFoundStartTime})
|
||||
</if>
|
||||
<if test="foundEndTime !=null and foundEndTime !=''">
|
||||
and found_time < #{foundEndTime}
|
||||
<if test="searchFoundEndTime !=null and searchFoundEndTime !=''">
|
||||
and found_time < toDateTime(#{searchFoundEndTime})
|
||||
</if>
|
||||
<if test="searchDIp !=null and searchDIp !=''">
|
||||
and d_ip = #{searchDIp}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
<resultMap id="NtcSslRecordLogMap" 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" />
|
||||
@@ -38,18 +38,18 @@
|
||||
</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,
|
||||
<select id="findNtcSslRecordLogList" parameterType="com.nis.domain.restful.NtcSslRecordLog" resultMap="NtcSslRecordLogMap">
|
||||
select cfg_id,toDateTime(found_time) found_time,toDateTime(recv_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,
|
||||
d_asn,s_subscribe_id,d_subscribe_id,scene_file,link_id,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 >= #{foundStartTime}
|
||||
<if test="searchFoundStartTime !=null and searchFoundStartTime !=''">
|
||||
and found_time >= toDateTime(#{searchFoundStartTime})
|
||||
</if>
|
||||
<if test="foundEndTime !=null and foundEndTime !=''">
|
||||
and found_time < #{foundEndTime}
|
||||
<if test="searchFoundEndTime !=null and searchFoundEndTime !=''">
|
||||
and found_time < toDateTime(#{searchFoundEndTime})
|
||||
</if>
|
||||
<if test="searchCfgId !=null and searchCfgId !=''">
|
||||
and cfg_id = #{cfgId}
|
||||
@@ -94,7 +94,7 @@
|
||||
and d_subscribe_id = #{searchDSubscribeId}
|
||||
</if>
|
||||
<if test="searchSni !=null and searchSni !=''">
|
||||
and sni = #{searchSni}
|
||||
and sni LIKE concat(concat('%',#{searchSni}),'%')
|
||||
</if>
|
||||
</where>
|
||||
<choose>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -18,25 +17,9 @@ public class NtcHttpRecordLogsService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
protected NtcHttpRecordLogsDao ntcHttpRecordLogsDao;
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
//查询 http泛收 日志数据
|
||||
public Page<?> getNtcHttpRecordLogsList(Page page ,NtcHttpRecordLog entity) {
|
||||
//把String类型的时间 转换成 时间戳类型
|
||||
if (!StringUtil.isBlank(entity.getSearchFoundStartTime())) {
|
||||
try {
|
||||
entity.setFoundStartTime(sdf.parse(entity.getSearchFoundStartTime().trim()).getTime() / 1000);
|
||||
} catch (Exception e) {
|
||||
throw new RestServiceException("searchFoundStartTime参数错误", RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
}
|
||||
if (!StringUtil.isBlank(entity.getSearchFoundEndTime())) {
|
||||
try {
|
||||
entity.setFoundEndTime(sdf.parse(entity.getSearchFoundEndTime().trim()).getTime() / 1000);
|
||||
} catch (Exception e) {
|
||||
throw new RestServiceException("searchFoundEndTime参数错误", RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
}
|
||||
if (!StringUtil.isBlank(entity.getSearchEntranceId())) {
|
||||
try {
|
||||
entity.setEntranceId(Long.valueOf(entity.getSearchEntranceId()));
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -18,25 +17,10 @@ public class NtcSslRecordLogsService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
protected NtcSslRecordLogsDao ntcSslRecordLogsDao;
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
//查询 ssl泛收 日志数据
|
||||
public Page<?> getNtcSslRecordLogsList(Page page ,NtcSslRecordLog entity) throws Exception{
|
||||
//把String类型的时间 转换成 时间戳类型
|
||||
if (!StringUtil.isBlank(entity.getSearchFoundStartTime())) {
|
||||
try {
|
||||
entity.setFoundStartTime(sdf.parse(entity.getSearchFoundStartTime().trim()).getTime() / 1000);
|
||||
} catch (Exception e) {
|
||||
throw new RestServiceException("searchFoundStartTime参数错误", RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
}
|
||||
if (!StringUtil.isBlank(entity.getSearchFoundEndTime())) {
|
||||
try {
|
||||
entity.setFoundEndTime(sdf.parse(entity.getSearchFoundEndTime().trim()).getTime() / 1000);
|
||||
} catch (Exception e) {
|
||||
throw new RestServiceException("searchFoundEndTime参数错误", RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
if (!StringUtil.isBlank(entity.getSearchCfgId())) {
|
||||
try {
|
||||
entity.setCfgId(Long.valueOf(entity.getSearchCfgId()));
|
||||
@@ -57,5 +41,4 @@ public class NtcSslRecordLogsService extends BaseService{
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user