diff --git a/src/main/java/com/nis/domain/restful/NtcHttpRecordLog.java b/src/main/java/com/nis/domain/restful/NtcHttpRecordLog.java index 5c958b4..172972e 100644 --- a/src/main/java/com/nis/domain/restful/NtcHttpRecordLog.java +++ b/src/main/java/com/nis/domain/restful/NtcHttpRecordLog.java @@ -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; - } } diff --git a/src/main/java/com/nis/domain/restful/NtcSslRecordLog.java b/src/main/java/com/nis/domain/restful/NtcSslRecordLog.java index dbb69bf..d449e19 100644 --- a/src/main/java/com/nis/domain/restful/NtcSslRecordLog.java +++ b/src/main/java/com/nis/domain/restful/NtcSslRecordLog.java @@ -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; - } - } diff --git a/src/main/java/com/nis/web/dao/DfLogSearchDao.xml b/src/main/java/com/nis/web/dao/DfLogSearchDao.xml index ac25120..5135566 100644 --- a/src/main/java/com/nis/web/dao/DfLogSearchDao.xml +++ b/src/main/java/com/nis/web/dao/DfLogSearchDao.xml @@ -1533,40 +1533,5 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/NtcHttpRecordLogsDao.xml b/src/main/java/com/nis/web/dao/NtcHttpRecordLogsDao.xml index 0fe6974..054850b 100644 --- a/src/main/java/com/nis/web/dao/NtcHttpRecordLogsDao.xml +++ b/src/main/java/com/nis/web/dao/NtcHttpRecordLogsDao.xml @@ -1,10 +1,10 @@ - + - - + + @@ -36,16 +36,16 @@ - + 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 - - and found_time >= #{foundStartTime} + + and found_time >= toDateTime(#{searchFoundStartTime}) - - and found_time < #{foundEndTime} + + and found_time < toDateTime(#{searchFoundEndTime}) and d_ip = #{searchDIp} diff --git a/src/main/java/com/nis/web/dao/NtcSslRecordLogsDao.xml b/src/main/java/com/nis/web/dao/NtcSslRecordLogsDao.xml index 1ca8f84..4073ce5 100644 --- a/src/main/java/com/nis/web/dao/NtcSslRecordLogsDao.xml +++ b/src/main/java/com/nis/web/dao/NtcSslRecordLogsDao.xml @@ -1,7 +1,7 @@ - + @@ -38,18 +38,18 @@ - + 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 - - and found_time >= #{foundStartTime} + + and found_time >= toDateTime(#{searchFoundStartTime}) - - and found_time < #{foundEndTime} + + and found_time < toDateTime(#{searchFoundEndTime}) and cfg_id = #{cfgId} @@ -94,7 +94,7 @@ and d_subscribe_id = #{searchDSubscribeId} - and sni = #{searchSni} + and sni LIKE concat(concat('%',#{searchSni}),'%') diff --git a/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java b/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java index acd2703..cad2c9c 100644 --- a/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java +++ b/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java @@ -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())); diff --git a/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java b/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java index 8dab62b..56040b8 100644 --- a/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java +++ b/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java @@ -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; } - }