Merge remote-tracking branch 'remotes/origin/orgin/develop' into develop
This commit is contained in:
@@ -48,12 +48,10 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
protected Date foundTime;
|
||||
@ApiModelProperty(value="接收时间", required=true)
|
||||
protected Date recvTime;
|
||||
/*@ApiModelProperty(value="外层嵌套关联信息ID", required=true)
|
||||
protected Long overId;*/
|
||||
@ApiModelProperty(value="外层嵌套关联信息ID", required=true)
|
||||
protected String overId;
|
||||
@ApiModelProperty(value="协议类型", required=true)
|
||||
protected String protocol;
|
||||
@ApiModelProperty(value="IP地址类型", required=true)
|
||||
protected Integer addrType;
|
||||
@ApiModelProperty(value="服务端ip地址", required=true)
|
||||
protected String serverIp;
|
||||
@ApiModelProperty(value="客户端ip地址", required=true)
|
||||
@@ -62,29 +60,25 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
protected Integer serverPort;
|
||||
@ApiModelProperty(value="客户端端口", required=true)
|
||||
protected Integer clientPort;
|
||||
@ApiModelProperty(value="嵌套协议类型", required=true)
|
||||
protected String nestProtocol;
|
||||
@ApiModelProperty(value="嵌套服务端ip地址", required=true)
|
||||
protected String nestServerIp;
|
||||
@ApiModelProperty(value="嵌套客户端ip地址", required=true)
|
||||
protected String nestClientIp;
|
||||
@ApiModelProperty(value="嵌套服务端端口", required=true)
|
||||
protected Integer nestServerPort;
|
||||
@ApiModelProperty(value="嵌套客户端端口", required=true)
|
||||
protected Integer nestClientPort;
|
||||
@ApiModelProperty(value="业务类型", required=true)
|
||||
@ApiModelProperty(value="业务类型", required=true)
|
||||
protected Integer serviceType;
|
||||
@ApiModelProperty(value="串联设备编号", required=true)
|
||||
protected Integer deviceId;
|
||||
@ApiModelProperty(value="传输方向", required=true, notes = "0:域内->域外,1:域外->域内,描述的是CLIENT_IP信息")
|
||||
protected Integer direction;
|
||||
@ApiModelProperty(value="流类型", required=true, notes = "0:c2s,1:s2c;2;double")
|
||||
protected Integer streamType;
|
||||
@ApiModelProperty(value="出入口编号", required=true)
|
||||
protected Long entranceId;
|
||||
@ApiModelProperty(value="处理机IP", required=true)
|
||||
protected String cljIp;
|
||||
@ApiModelProperty(value="封堵包记录文件", required=true)
|
||||
protected String injectedPktFile;
|
||||
|
||||
@ApiModelProperty(value="存放现场日志文件的URL地址", required=true)
|
||||
protected String sceneFile;
|
||||
@ApiModelProperty(value="管控动作", required=true)
|
||||
protected Integer action;
|
||||
|
||||
@ApiModelProperty(value="用户嵌套地址列表", required=true)
|
||||
protected String nestAddrList;
|
||||
|
||||
@ApiModelProperty(value="用户自定义域", required=true)
|
||||
private String userRegion;
|
||||
|
||||
@ApiModelProperty(value="服务端地址定位信息", required=true)
|
||||
protected String serverLocate;
|
||||
@ApiModelProperty(value="客户端地址定位信息", required=true)
|
||||
@@ -94,21 +88,21 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
protected Long foundTimeCluster;
|
||||
protected Long recvTimeCluster;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected String searchCfgId;
|
||||
protected String searchFoundStartTime;
|
||||
protected String searchFoundEndTime;
|
||||
protected Long searchFoundStartTimeCluster;
|
||||
protected Long searchFoundEndTimeCluster;
|
||||
protected String searchCfgId;
|
||||
protected String searchProtocol;
|
||||
protected String searchServiceType;
|
||||
protected String searchServerIp;
|
||||
protected String searchClientIp;
|
||||
protected Integer searchDirection;
|
||||
protected String searchServiceType;
|
||||
protected String searchEntranceId;
|
||||
protected String searchCljIp;
|
||||
protected String tableName;//神通数据库根据A/B版,动态切换表名
|
||||
|
||||
|
||||
@JsonIgnore
|
||||
public Long getFoundTimeCluster() {
|
||||
@@ -139,19 +133,7 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
public void setSearchFoundEndTimeCluster(Long searchFoundEndTimeCluster) {
|
||||
this.searchFoundEndTimeCluster = searchFoundEndTimeCluster;
|
||||
}
|
||||
@JsonIgnore
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
public String getOverId() {
|
||||
return overId;
|
||||
}
|
||||
public void setOverId(String overId) {
|
||||
this.overId = overId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前实体分页对象
|
||||
*/
|
||||
@@ -165,19 +147,12 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
/**
|
||||
* @Title:
|
||||
* @Description: TODO
|
||||
* @param 入参
|
||||
* @param
|
||||
*/
|
||||
public LogEntity() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getInjectedPktFile() {
|
||||
return injectedPktFile;
|
||||
}
|
||||
|
||||
public void setInjectedPktFile(String injectedPktFile) {
|
||||
this.injectedPktFile = injectedPktFile;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -268,26 +243,6 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return overId
|
||||
*/
|
||||
/*public Long getOverId() {
|
||||
return overId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
*//**
|
||||
* @param overId 要设置的 overId
|
||||
*//*
|
||||
public void setOverId(Long overId) {
|
||||
this.overId = overId;
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return protocol
|
||||
*/
|
||||
@@ -388,105 +343,6 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return nestProtocol
|
||||
*/
|
||||
public String getNestProtocol() {
|
||||
return nestProtocol;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param nestProtocol 要设置的 nestProtocol
|
||||
*/
|
||||
public void setNestProtocol(String nestProtocol) {
|
||||
this.nestProtocol = nestProtocol;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return nestServerIp
|
||||
*/
|
||||
public String getNestServerIp() {
|
||||
return nestServerIp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param nestServerIp 要设置的 nestServerIp
|
||||
*/
|
||||
public void setNestServerIp(String nestServerIp) {
|
||||
this.nestServerIp = nestServerIp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return nestClientIp
|
||||
*/
|
||||
public String getNestClientIp() {
|
||||
return nestClientIp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param nestClientIp 要设置的 nestClientIp
|
||||
*/
|
||||
public void setNestClientIp(String nestClientIp) {
|
||||
this.nestClientIp = nestClientIp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return nestServerPort
|
||||
*/
|
||||
public Integer getNestServerPort() {
|
||||
return nestServerPort;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param nestServerPort 要设置的 nestServerPort
|
||||
*/
|
||||
public void setNestServerPort(Integer nestServerPort) {
|
||||
this.nestServerPort = nestServerPort;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return nestClientPort
|
||||
*/
|
||||
public Integer getNestClientPort() {
|
||||
return nestClientPort;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param nestClientPort 要设置的 nestClientPort
|
||||
*/
|
||||
public void setNestClientPort(Integer nestClientPort) {
|
||||
this.nestClientPort = nestClientPort;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return serviceType
|
||||
@@ -742,8 +598,6 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param searchClientIp 要设置的 searchClientIp
|
||||
*/
|
||||
@@ -763,8 +617,6 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param searchEntranceId 要设置的 searchEntranceId
|
||||
*/
|
||||
@@ -795,8 +647,6 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return searchServiceType
|
||||
*/
|
||||
@@ -805,9 +655,6 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
return searchServiceType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param searchServiceType 要设置的 searchServiceType
|
||||
*/
|
||||
@@ -815,25 +662,64 @@ public abstract class LogEntity<T> implements Serializable {
|
||||
this.searchServiceType = searchServiceType;
|
||||
}
|
||||
|
||||
|
||||
public Integer getAddrType() {
|
||||
return addrType;
|
||||
}
|
||||
|
||||
public String getSceneFile() {
|
||||
return sceneFile;
|
||||
}
|
||||
public void setSceneFile(String sceneFile) {
|
||||
this.sceneFile = sceneFile;
|
||||
}
|
||||
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
|
||||
public void setAddrType(Integer addrType) {
|
||||
this.addrType = addrType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Integer deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Integer getStreamType() {
|
||||
return streamType;
|
||||
}
|
||||
|
||||
public void setStreamType(Integer streamType) {
|
||||
this.streamType = streamType;
|
||||
}
|
||||
|
||||
public String getNestAddrList() {
|
||||
return nestAddrList;
|
||||
}
|
||||
|
||||
public void setNestAddrList(String nestAddrList) {
|
||||
this.nestAddrList = nestAddrList;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Integer getSearchDirection() {
|
||||
return searchDirection;
|
||||
}
|
||||
|
||||
public void setSearchDirection(Integer searchDirection) {
|
||||
this.searchDirection = searchDirection;
|
||||
}
|
||||
|
||||
public String getUserRegion() {
|
||||
return userRegion;
|
||||
}
|
||||
|
||||
public void setUserRegion(String userRegion) {
|
||||
this.userRegion = userRegion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ReflectionToStringBuilder.toString(this);
|
||||
}
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
/**
|
||||
* @Title: DfHttpKeywordLog.java
|
||||
* @Package com.nis.domain.restful
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月7日 上午10:16:30
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName: DfHttpKeywordLog
|
||||
* @Description: HTTP关键字XX日志
|
||||
* @author (ddm)
|
||||
* @date 2016年9月7日 上午10:16:30
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DfHttpKeywordLog extends LogEntity<DfHttpKeywordLog>{
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
|
||||
*/
|
||||
private static final long serialVersionUID = -44600714074823563L;
|
||||
@ApiModelProperty(value="TCP初始序列号", required=true)
|
||||
protected Long c2sIsn;
|
||||
@ApiModelProperty(value="是否HTTP代理标志", required=true)
|
||||
protected Long httpProxyFlag;
|
||||
@ApiModelProperty(value="HTTP会话序列号", required=true)
|
||||
protected Long httpSeq;
|
||||
@ApiModelProperty(value="url地址", required=true)
|
||||
protected String url;
|
||||
@ApiModelProperty(value="请求行", required=true)
|
||||
protected String reqLine;
|
||||
@ApiModelProperty(value="请求头转储文件", required=true)
|
||||
protected String reqHdrFile;
|
||||
@ApiModelProperty(value="请求体转储文件", required=true)
|
||||
protected String reqBodyFile;
|
||||
@ApiModelProperty(value="应答行", required=true)
|
||||
protected String resLine;
|
||||
@ApiModelProperty(value="应答头转储文件", required=true)
|
||||
protected String resHdrFile;
|
||||
@ApiModelProperty(value="应答体体转储文件", required=true)
|
||||
protected String resBodyFile;
|
||||
|
||||
|
||||
protected String searchUrl;
|
||||
@JsonIgnore
|
||||
public String getSearchUrl() {
|
||||
return searchUrl;
|
||||
}
|
||||
|
||||
public void setSearchUrl(String searchUrl) {
|
||||
this.searchUrl = searchUrl;
|
||||
}
|
||||
|
||||
public Long getC2sIsn() {
|
||||
return c2sIsn;
|
||||
}
|
||||
public void setC2sIsn(Long c2sIsn) {
|
||||
this.c2sIsn = c2sIsn;
|
||||
}
|
||||
public Long getHttpProxyFlag() {
|
||||
return httpProxyFlag;
|
||||
}
|
||||
public void setHttpProxyFlag(Long httpProxyFlag) {
|
||||
this.httpProxyFlag = httpProxyFlag;
|
||||
}
|
||||
public Long getHttpSeq() {
|
||||
return httpSeq;
|
||||
}
|
||||
public void setHttpSeq(Long httpSeq) {
|
||||
this.httpSeq = httpSeq;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public String getReqLine() {
|
||||
return reqLine;
|
||||
}
|
||||
public void setReqLine(String reqLine) {
|
||||
this.reqLine = reqLine;
|
||||
}
|
||||
public String getReqHdrFile() {
|
||||
return reqHdrFile;
|
||||
}
|
||||
public void setReqHdrFile(String reqHdrFile) {
|
||||
this.reqHdrFile = reqHdrFile;
|
||||
}
|
||||
public String getReqBodyFile() {
|
||||
return reqBodyFile;
|
||||
}
|
||||
public void setReqBodyFile(String reqBodyFile) {
|
||||
this.reqBodyFile = reqBodyFile;
|
||||
}
|
||||
public String getResLine() {
|
||||
return resLine;
|
||||
}
|
||||
public void setResLine(String resLine) {
|
||||
this.resLine = resLine;
|
||||
}
|
||||
public String getResHdrFile() {
|
||||
return resHdrFile;
|
||||
}
|
||||
public void setResHdrFile(String resHdrFile) {
|
||||
this.resHdrFile = resHdrFile;
|
||||
}
|
||||
public String getResBodyFile() {
|
||||
return resBodyFile;
|
||||
}
|
||||
public void setResBodyFile(String resBodyFile) {
|
||||
this.resBodyFile = resBodyFile;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
/**
|
||||
* @Title: DfHttpReqLog.java
|
||||
* @Package com.nis.domain.restful
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月5日 下午10:18:32
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName: DfHttpReqLog
|
||||
* @Description: 协议请求XX日志
|
||||
* @author (ddm)
|
||||
* @date 2016年9月5日 下午1:58:33
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DfHttpReqLog extends LogEntity<DfHttpReqLog>{
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
|
||||
*/
|
||||
private static final long serialVersionUID = 1040386874238362829L;
|
||||
@ApiModelProperty(value="TCP初始序列号", required=true)
|
||||
protected Long c2sIsn;
|
||||
@ApiModelProperty(value="是否HTTP代理标志", required=true)
|
||||
protected Long httpProxyFlag;
|
||||
@ApiModelProperty(value="HTTP会话序列号", required=true)
|
||||
protected Long httpSeq;
|
||||
@ApiModelProperty(value="url地址", required=true)
|
||||
protected String url;
|
||||
@ApiModelProperty(value="请求行", required=true)
|
||||
protected String reqLine;
|
||||
@ApiModelProperty(value="请求头转储文件", required=true)
|
||||
protected String reqHdrFile;
|
||||
@ApiModelProperty(value="请求体转储文件", required=true)
|
||||
protected String reqBodyFile;
|
||||
@ApiModelProperty(value="Cookie值", required=true)
|
||||
protected String cookie;
|
||||
@ApiModelProperty(value="referer值", required=true)
|
||||
protected String referer;
|
||||
@ApiModelProperty(value="UA值", required=true)
|
||||
protected String ua;
|
||||
@ApiModelProperty(value="请求头用户自定义域名称", required=true)
|
||||
protected String reqUserDefineKey;
|
||||
@ApiModelProperty(value="请求头用户自定义域值", required=true)
|
||||
protected String reqUserDefineValue;
|
||||
|
||||
protected String searchUrl;
|
||||
@JsonIgnore
|
||||
public String getSearchUrl() {
|
||||
return searchUrl;
|
||||
}
|
||||
|
||||
public void setSearchUrl(String searchUrl) {
|
||||
this.searchUrl = searchUrl;
|
||||
}
|
||||
|
||||
public Long getC2sIsn() {
|
||||
return c2sIsn;
|
||||
}
|
||||
public void setC2sIsn(Long c2sIsn) {
|
||||
this.c2sIsn = c2sIsn;
|
||||
}
|
||||
public Long getHttpProxyFlag() {
|
||||
return httpProxyFlag;
|
||||
}
|
||||
public void setHttpProxyFlag(Long httpProxyFlag) {
|
||||
this.httpProxyFlag = httpProxyFlag;
|
||||
}
|
||||
public Long getHttpSeq() {
|
||||
return httpSeq;
|
||||
}
|
||||
public void setHttpSeq(Long httpSeq) {
|
||||
this.httpSeq = httpSeq;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public String getReqLine() {
|
||||
return reqLine;
|
||||
}
|
||||
public void setReqLine(String reqLine) {
|
||||
this.reqLine = reqLine;
|
||||
}
|
||||
public String getReqHdrFile() {
|
||||
return reqHdrFile;
|
||||
}
|
||||
public void setReqHdrFile(String reqHdrFile) {
|
||||
this.reqHdrFile = reqHdrFile;
|
||||
}
|
||||
public String getReqBodyFile() {
|
||||
return reqBodyFile;
|
||||
}
|
||||
public void setReqBodyFile(String reqBodyFile) {
|
||||
this.reqBodyFile = reqBodyFile;
|
||||
}
|
||||
|
||||
public String getCookie() {
|
||||
return cookie;
|
||||
}
|
||||
|
||||
public void setCookie(String cookie) {
|
||||
this.cookie = cookie;
|
||||
}
|
||||
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
|
||||
public String getUa() {
|
||||
return ua;
|
||||
}
|
||||
|
||||
public void setUa(String ua) {
|
||||
this.ua = ua;
|
||||
}
|
||||
|
||||
public String getReqUserDefineKey() {
|
||||
return reqUserDefineKey;
|
||||
}
|
||||
|
||||
public void setReqUserDefineKey(String reqUserDefineKey) {
|
||||
this.reqUserDefineKey = reqUserDefineKey;
|
||||
}
|
||||
|
||||
public String getReqUserDefineValue() {
|
||||
return reqUserDefineValue;
|
||||
}
|
||||
|
||||
public void setReqUserDefineValue(String reqUserDefineValue) {
|
||||
this.reqUserDefineValue = reqUserDefineValue;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
/**
|
||||
* @Title: DfHttpResLog.java
|
||||
* @Package com.nis.domain.restful
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (ddm)
|
||||
* @date 2016年9月7日 上午9:59:30
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName: DfHttpResLog
|
||||
* @Description: 协议响应XX日志
|
||||
* @author (ddm)
|
||||
* @date 2016年9月7日 上午9:59:30
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DfHttpResLog extends LogEntity<DfHttpResLog>{
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
|
||||
*/
|
||||
private static final long serialVersionUID = -6230615037776378250L;
|
||||
@ApiModelProperty(value="TCP初始序列号", required=true)
|
||||
protected Long c2sIsn;
|
||||
@ApiModelProperty(value="是否HTTP代理标志", required=true)
|
||||
protected Long httpProxyFlag;
|
||||
@ApiModelProperty(value="HTTP会话序列号", required=true)
|
||||
protected Long httpSeq;
|
||||
@ApiModelProperty(value="url地址", required=true)
|
||||
protected String url;
|
||||
@ApiModelProperty(value="请求行", required=true)
|
||||
protected String reqLine;
|
||||
@ApiModelProperty(value="请求头转储文件", required=true)
|
||||
protected String reqHdrFile;
|
||||
@ApiModelProperty(value="请求体转储文件", required=true)
|
||||
protected String reqBodyFile;
|
||||
@ApiModelProperty(value="应答行", required=true)
|
||||
protected String resLine;
|
||||
@ApiModelProperty(value="应答头转储文件", required=true)
|
||||
protected String resHdrFile;
|
||||
@ApiModelProperty(value="应答体体转储文件", required=true)
|
||||
protected String resBodyFile;
|
||||
|
||||
@ApiModelProperty(value="SET-Cookie", required=true)
|
||||
protected String setCookie;
|
||||
@ApiModelProperty(value="CONTENT-LEN值", required=true)
|
||||
protected String contentLen;
|
||||
@ApiModelProperty(value="CONTENT-TYPE值", required=true)
|
||||
protected String contentType;
|
||||
@ApiModelProperty(value="请求头用户自定义域名称", required=true)
|
||||
protected String resUserDefineKey;
|
||||
@ApiModelProperty(value="请求头用户自定义域值", required=true)
|
||||
protected String resUserDefineValue;
|
||||
|
||||
protected String searchUrl;
|
||||
|
||||
@JsonIgnore
|
||||
public String getSearchUrl() {
|
||||
return searchUrl;
|
||||
}
|
||||
|
||||
public void setSearchUrl(String searchUrl) {
|
||||
this.searchUrl = searchUrl;
|
||||
}
|
||||
public Long getC2sIsn() {
|
||||
return c2sIsn;
|
||||
}
|
||||
public void setC2sIsn(Long c2sIsn) {
|
||||
this.c2sIsn = c2sIsn;
|
||||
}
|
||||
public Long getHttpProxyFlag() {
|
||||
return httpProxyFlag;
|
||||
}
|
||||
public void setHttpProxyFlag(Long httpProxyFlag) {
|
||||
this.httpProxyFlag = httpProxyFlag;
|
||||
}
|
||||
public Long getHttpSeq() {
|
||||
return httpSeq;
|
||||
}
|
||||
public void setHttpSeq(Long httpSeq) {
|
||||
this.httpSeq = httpSeq;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public String getReqLine() {
|
||||
return reqLine;
|
||||
}
|
||||
public void setReqLine(String reqLine) {
|
||||
this.reqLine = reqLine;
|
||||
}
|
||||
public String getReqHdrFile() {
|
||||
return reqHdrFile;
|
||||
}
|
||||
public void setReqHdrFile(String reqHdrFile) {
|
||||
this.reqHdrFile = reqHdrFile;
|
||||
}
|
||||
public String getReqBodyFile() {
|
||||
return reqBodyFile;
|
||||
}
|
||||
public void setReqBodyFile(String reqBodyFile) {
|
||||
this.reqBodyFile = reqBodyFile;
|
||||
}
|
||||
public String getResLine() {
|
||||
return resLine;
|
||||
}
|
||||
public void setResLine(String resLine) {
|
||||
this.resLine = resLine;
|
||||
}
|
||||
public String getResHdrFile() {
|
||||
return resHdrFile;
|
||||
}
|
||||
public void setResHdrFile(String resHdrFile) {
|
||||
this.resHdrFile = resHdrFile;
|
||||
}
|
||||
public String getResBodyFile() {
|
||||
return resBodyFile;
|
||||
}
|
||||
public void setResBodyFile(String resBodyFile) {
|
||||
this.resBodyFile = resBodyFile;
|
||||
}
|
||||
|
||||
public String getSetCookie() {
|
||||
return setCookie;
|
||||
}
|
||||
|
||||
public void setSetCookie(String setCookie) {
|
||||
this.setCookie = setCookie;
|
||||
}
|
||||
|
||||
public String getContentLen() {
|
||||
return contentLen;
|
||||
}
|
||||
|
||||
public void setContentLen(String contentLen) {
|
||||
this.contentLen = contentLen;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
public void setContentType(String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
public String getResUserDefineKey() {
|
||||
return resUserDefineKey;
|
||||
}
|
||||
|
||||
public void setResUserDefineKey(String resUserDefineKey) {
|
||||
this.resUserDefineKey = resUserDefineKey;
|
||||
}
|
||||
|
||||
public String getResUserDefineValue() {
|
||||
return resUserDefineValue;
|
||||
}
|
||||
|
||||
public void setResUserDefineValue(String resUserDefineValue) {
|
||||
this.resUserDefineValue = resUserDefineValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* @Title: DfIpPortLog.java
|
||||
* @Package com.nis.domain.restful
|
||||
* @Description: TODO(用一句话描述该文件做什么)
|
||||
* @author (darnell)
|
||||
* @date 2016年8月31日 下午9:58:33
|
||||
* @version V1.0
|
||||
*/
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
|
||||
/**
|
||||
* @ClassName: DfIpPortLog
|
||||
* @Description: 端口XX日志实体
|
||||
* @author (darnell)
|
||||
* @date 2016年8月31日 下午9:58:33
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DfIpPortLog extends LogEntity<DfIpPortLog>{
|
||||
/**
|
||||
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
|
||||
*/
|
||||
private static final long serialVersionUID = 340154456985429911L;
|
||||
|
||||
|
||||
}
|
||||
124
src/main/java/com/nis/domain/restful/NtcDnsLog.java
Normal file
124
src/main/java/com/nis/domain/restful/NtcDnsLog.java
Normal file
@@ -0,0 +1,124 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcDnsLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = -6980951963455847281L;
|
||||
|
||||
@ApiModelProperty(value="递归请求", required=true)
|
||||
protected Integer rd;
|
||||
|
||||
@ApiModelProperty(value="请求/应答", required=true)
|
||||
protected Integer qr;
|
||||
|
||||
@ApiModelProperty(value="递归应答", required=true)
|
||||
protected Integer ra;
|
||||
|
||||
@ApiModelProperty(value="资源记录", required=true)
|
||||
protected String rr;
|
||||
|
||||
@ApiModelProperty(value="查询类型", required=true)
|
||||
protected Integer qType;
|
||||
|
||||
@ApiModelProperty(value="查询类", required=true)
|
||||
protected Integer qclass;
|
||||
|
||||
@ApiModelProperty(value="OPCODE", required=true)
|
||||
protected Integer opcode;
|
||||
|
||||
@ApiModelProperty(value="查询内容", required=true)
|
||||
protected String qname;
|
||||
|
||||
|
||||
@ApiModelProperty(value="别名", required=true)
|
||||
protected String cname;
|
||||
|
||||
@ApiModelProperty(value="DNS_SUB", required=true)
|
||||
protected Integer dnsSub ;
|
||||
|
||||
public Integer getRd() {
|
||||
return rd;
|
||||
}
|
||||
|
||||
public void setRd(Integer rd) {
|
||||
this.rd = rd;
|
||||
}
|
||||
|
||||
public Integer getQr() {
|
||||
return qr;
|
||||
}
|
||||
|
||||
public void setQr(Integer qr) {
|
||||
this.qr = qr;
|
||||
}
|
||||
|
||||
public Integer getRa() {
|
||||
return ra;
|
||||
}
|
||||
|
||||
public void setRa(Integer ra) {
|
||||
this.ra = ra;
|
||||
}
|
||||
|
||||
public String getRr() {
|
||||
return rr;
|
||||
}
|
||||
|
||||
public void setRr(String rr) {
|
||||
this.rr = rr;
|
||||
}
|
||||
|
||||
public Integer getqType() {
|
||||
return qType;
|
||||
}
|
||||
|
||||
public void setqType(Integer qType) {
|
||||
this.qType = qType;
|
||||
}
|
||||
|
||||
public Integer getQclass() {
|
||||
return qclass;
|
||||
}
|
||||
|
||||
public void setQclass(Integer qclass) {
|
||||
this.qclass = qclass;
|
||||
}
|
||||
|
||||
public Integer getOpcode() {
|
||||
return opcode;
|
||||
}
|
||||
|
||||
public void setOpcode(Integer opcode) {
|
||||
this.opcode = opcode;
|
||||
}
|
||||
|
||||
public String getQname() {
|
||||
return qname;
|
||||
}
|
||||
|
||||
public void setQname(String qname) {
|
||||
this.qname = qname;
|
||||
}
|
||||
|
||||
public String getCname() {
|
||||
return cname;
|
||||
}
|
||||
|
||||
public void setCname(String cname) {
|
||||
this.cname = cname;
|
||||
}
|
||||
|
||||
public Integer getDnsSub() {
|
||||
return dnsSub;
|
||||
}
|
||||
|
||||
public void setDnsSub(Integer dnsSub) {
|
||||
this.dnsSub = dnsSub;
|
||||
}
|
||||
}
|
||||
36
src/main/java/com/nis/domain/restful/NtcFtpLog.java
Normal file
36
src/main/java/com/nis/domain/restful/NtcFtpLog.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcFtpLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = -4856757288296929083L;
|
||||
|
||||
@ApiModelProperty(value = "FTP链接", required = true)
|
||||
protected String ftpUrl;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "FTP内容", required = true)
|
||||
protected String ftpContent;
|
||||
|
||||
|
||||
public String getFtpUrl() {
|
||||
return ftpUrl;
|
||||
}
|
||||
|
||||
public void setFtpUrl(String ftpUrl) {
|
||||
this.ftpUrl = ftpUrl;
|
||||
}
|
||||
|
||||
public String getFtpContent() {
|
||||
return ftpContent;
|
||||
}
|
||||
|
||||
public void setFtpContent(String ftpContent) {
|
||||
this.ftpContent = ftpContent;
|
||||
}
|
||||
}
|
||||
79
src/main/java/com/nis/domain/restful/NtcHttpLog.java
Normal file
79
src/main/java/com/nis/domain/restful/NtcHttpLog.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcHttpLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = 2553033624540656138L;
|
||||
|
||||
@ApiModelProperty(value="TCP初始序列号", required=true)
|
||||
protected Long c2sIsn;
|
||||
|
||||
@ApiModelProperty(value="是否HTTP代理标志", required=true)
|
||||
protected Long httpProxyFlag;
|
||||
|
||||
@ApiModelProperty(value="HTTP会话序列号", required=true)
|
||||
protected Long httpSeq;
|
||||
|
||||
@ApiModelProperty(value="url地址", required=true)
|
||||
protected String url;
|
||||
|
||||
@ApiModelProperty(value="请求行", required=true)
|
||||
protected String reqLine;
|
||||
|
||||
@ApiModelProperty(value="应答行", required=true)
|
||||
protected String resLine;
|
||||
|
||||
|
||||
public Long getC2sIsn() {
|
||||
return c2sIsn;
|
||||
}
|
||||
|
||||
public void setC2sIsn(Long c2sIsn) {
|
||||
this.c2sIsn = c2sIsn;
|
||||
}
|
||||
|
||||
public Long getHttpProxyFlag() {
|
||||
return httpProxyFlag;
|
||||
}
|
||||
|
||||
public void setHttpProxyFlag(Long httpProxyFlag) {
|
||||
this.httpProxyFlag = httpProxyFlag;
|
||||
}
|
||||
|
||||
public Long getHttpSeq() {
|
||||
return httpSeq;
|
||||
}
|
||||
|
||||
public void setHttpSeq(Long httpSeq) {
|
||||
this.httpSeq = httpSeq;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getReqLine() {
|
||||
return reqLine;
|
||||
}
|
||||
|
||||
public void setReqLine(String reqLine) {
|
||||
this.reqLine = reqLine;
|
||||
}
|
||||
|
||||
public String getResLine() {
|
||||
return resLine;
|
||||
}
|
||||
|
||||
public void setResLine(String resLine) {
|
||||
this.resLine = resLine;
|
||||
}
|
||||
}
|
||||
12
src/main/java/com/nis/domain/restful/NtcIpLog.java
Normal file
12
src/main/java/com/nis/domain/restful/NtcIpLog.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/10.
|
||||
*/
|
||||
public class NtcIpLog extends LogEntity<NtcIpLog> {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1325588394265592830L;
|
||||
}
|
||||
34
src/main/java/com/nis/domain/restful/NtcIpsecLog.java
Normal file
34
src/main/java/com/nis/domain/restful/NtcIpsecLog.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcIpsecLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = 7413267107457939517L;
|
||||
|
||||
|
||||
@ApiModelProperty(value="交换协议", required=true)
|
||||
protected Integer exProtocol;
|
||||
@ApiModelProperty(value="ISAKMP模式", required=true)
|
||||
protected Integer isakmpMode;
|
||||
|
||||
public Integer getExProtocol() {
|
||||
return exProtocol;
|
||||
}
|
||||
|
||||
public void setExProtocol(Integer exProtocol) {
|
||||
this.exProtocol = exProtocol;
|
||||
}
|
||||
|
||||
public Integer getIsakmpMode() {
|
||||
return isakmpMode;
|
||||
}
|
||||
|
||||
public void setIsakmpMode(Integer isakmpMode) {
|
||||
this.isakmpMode = isakmpMode;
|
||||
}
|
||||
}
|
||||
44
src/main/java/com/nis/domain/restful/NtcL2tpLog.java
Normal file
44
src/main/java/com/nis/domain/restful/NtcL2tpLog.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcL2tpLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = -3793435902270137597L;
|
||||
|
||||
|
||||
@ApiModelProperty(value="通道类型", required=true)
|
||||
protected Integer tunnelType;
|
||||
@ApiModelProperty(value="加密方式", required=true)
|
||||
protected Integer encryptMode;
|
||||
@ApiModelProperty(value="用户名称", required=true)
|
||||
protected String chapName;
|
||||
|
||||
public Integer getTunnelType() {
|
||||
return tunnelType;
|
||||
}
|
||||
|
||||
public void setTunnelType(Integer tunnelType) {
|
||||
this.tunnelType = tunnelType;
|
||||
}
|
||||
|
||||
public Integer getEncryptMode() {
|
||||
return encryptMode;
|
||||
}
|
||||
|
||||
public void setEncryptMode(Integer encryptMode) {
|
||||
this.encryptMode = encryptMode;
|
||||
}
|
||||
|
||||
public String getChapName() {
|
||||
return chapName;
|
||||
}
|
||||
|
||||
public void setChapName(String chapName) {
|
||||
this.chapName = chapName;
|
||||
}
|
||||
}
|
||||
63
src/main/java/com/nis/domain/restful/NtcMailLog.java
Normal file
63
src/main/java/com/nis/domain/restful/NtcMailLog.java
Normal file
@@ -0,0 +1,63 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcMailLog extends LogEntity{
|
||||
|
||||
private static final long serialVersionUID = 2541894088824218908L;
|
||||
|
||||
@ApiModelProperty(value="邮件协议类型", required=true)
|
||||
protected String mailProto;
|
||||
@ApiModelProperty(value="发件人", required=true)
|
||||
protected String mailFrom;
|
||||
@ApiModelProperty(value="收件人", required=true)
|
||||
protected String mailTo;
|
||||
@ApiModelProperty(value="主题", required=true)
|
||||
protected String subject;
|
||||
@ApiModelProperty(value="EML文件转储路径", required=true)
|
||||
protected String emlFile;
|
||||
|
||||
public String getMailProto() {
|
||||
return mailProto;
|
||||
}
|
||||
|
||||
public void setMailProto(String mailProto) {
|
||||
this.mailProto = mailProto;
|
||||
}
|
||||
|
||||
public String getMailFrom() {
|
||||
return mailFrom;
|
||||
}
|
||||
|
||||
public void setMailFrom(String mailFrom) {
|
||||
this.mailFrom = mailFrom;
|
||||
}
|
||||
|
||||
public String getMailTo() {
|
||||
return mailTo;
|
||||
}
|
||||
|
||||
public void setMailTo(String mailTo) {
|
||||
this.mailTo = mailTo;
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setSubject(String subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public String getEmlFile() {
|
||||
return emlFile;
|
||||
}
|
||||
|
||||
public void setEmlFile(String emlFile) {
|
||||
this.emlFile = emlFile;
|
||||
}
|
||||
}
|
||||
54
src/main/java/com/nis/domain/restful/NtcOpenvpnLog.java
Normal file
54
src/main/java/com/nis/domain/restful/NtcOpenvpnLog.java
Normal file
@@ -0,0 +1,54 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcOpenvpnLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = 1114102412562665190L;
|
||||
|
||||
|
||||
@ApiModelProperty(value="版本信息", required=true)
|
||||
protected String version;
|
||||
@ApiModelProperty(value="加密方式", required=true)
|
||||
protected String encryptMode;
|
||||
@ApiModelProperty(value="是否有HMAC", required=true)
|
||||
protected Integer hmac;
|
||||
@ApiModelProperty(value="通道类型", required=true)
|
||||
protected Integer tunnelType;
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getEncryptMode() {
|
||||
return encryptMode;
|
||||
}
|
||||
|
||||
public void setEncryptMode(String encryptMode) {
|
||||
this.encryptMode = encryptMode;
|
||||
}
|
||||
|
||||
public Integer getHmac() {
|
||||
return hmac;
|
||||
}
|
||||
|
||||
public void setHmac(Integer hmac) {
|
||||
this.hmac = hmac;
|
||||
}
|
||||
|
||||
public Integer getTunnelType() {
|
||||
return tunnelType;
|
||||
}
|
||||
|
||||
public void setTunnelType(Integer tunnelType) {
|
||||
this.tunnelType = tunnelType;
|
||||
}
|
||||
}
|
||||
39
src/main/java/com/nis/domain/restful/NtcPptpLog.java
Normal file
39
src/main/java/com/nis/domain/restful/NtcPptpLog.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcPptpLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = -1558260429830428665L;
|
||||
|
||||
|
||||
@ApiModelProperty(value="通道类型", required=true)
|
||||
protected Integer tunnelType;
|
||||
@ApiModelProperty(value="加密方式", required=true)
|
||||
protected Integer encryptMode;
|
||||
|
||||
public Integer getTunnelType() {
|
||||
return tunnelType;
|
||||
}
|
||||
|
||||
public void setTunnelType(Integer tunnelType) {
|
||||
this.tunnelType = tunnelType;
|
||||
}
|
||||
|
||||
public Integer getEncryptMode() {
|
||||
return encryptMode;
|
||||
}
|
||||
|
||||
public void setEncryptMode(Integer encryptMode) {
|
||||
this.encryptMode = encryptMode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
74
src/main/java/com/nis/domain/restful/NtcSshLog.java
Normal file
74
src/main/java/com/nis/domain/restful/NtcSshLog.java
Normal file
@@ -0,0 +1,74 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcSshLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = -5032732529386809500L;
|
||||
|
||||
|
||||
@ApiModelProperty(value="版本信息", required=true)
|
||||
protected String version;
|
||||
@ApiModelProperty(value="主机密钥", required=true)
|
||||
protected String hostKey;
|
||||
@ApiModelProperty(value="主机cookie", required=true)
|
||||
protected String hostCookie;
|
||||
@ApiModelProperty(value="加密方式", required=true)
|
||||
protected String encryptMode;
|
||||
@ApiModelProperty(value="消息认证码", required=true)
|
||||
protected String mac;
|
||||
@ApiModelProperty(value="通道类型", required=true)
|
||||
protected Integer tunnelType;
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getHostKey() {
|
||||
return hostKey;
|
||||
}
|
||||
|
||||
public void setHostKey(String hostKey) {
|
||||
this.hostKey = hostKey;
|
||||
}
|
||||
|
||||
public String getHostCookie() {
|
||||
return hostCookie;
|
||||
}
|
||||
|
||||
public void setHostCookie(String hostCookie) {
|
||||
this.hostCookie = hostCookie;
|
||||
}
|
||||
|
||||
public String getEncryptMode() {
|
||||
return encryptMode;
|
||||
}
|
||||
|
||||
public void setEncryptMode(String encryptMode) {
|
||||
this.encryptMode = encryptMode;
|
||||
}
|
||||
|
||||
public String getMac() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public void setMac(String mac) {
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
public Integer getTunnelType() {
|
||||
return tunnelType;
|
||||
}
|
||||
|
||||
public void setTunnelType(Integer tunnelType) {
|
||||
this.tunnelType = tunnelType;
|
||||
}
|
||||
}
|
||||
57
src/main/java/com/nis/domain/restful/NtcSslLog.java
Normal file
57
src/main/java/com/nis/domain/restful/NtcSslLog.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/11.
|
||||
*/
|
||||
public class NtcSslLog extends LogEntity {
|
||||
|
||||
private static final long serialVersionUID = 164434539180653065L;
|
||||
|
||||
|
||||
@ApiModelProperty(value="版本信息", required=true)
|
||||
protected String version;
|
||||
|
||||
@ApiModelProperty(value="Server Name Indication", required=true, notes = "主要解决一台服务器只能使用一个证书-域名的缺点,通过sni可支持一台服务器为多台域名提供服务")
|
||||
protected String sni;
|
||||
|
||||
@ApiModelProperty(value="SAN-Subject Alternative Name Certificate", required=true, notes = "数字证书的一种形式,运行SSL证书绑定多个域名和子域名。另EV证书,扩展验证证书,只能绑定一个域名")
|
||||
protected String san;
|
||||
|
||||
@ApiModelProperty(value="证书授权机构", required=true)
|
||||
protected String ca;
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getSni() {
|
||||
return sni;
|
||||
}
|
||||
|
||||
public void setSni(String sni) {
|
||||
this.sni = sni;
|
||||
}
|
||||
|
||||
public String getSan() {
|
||||
return san;
|
||||
}
|
||||
|
||||
public void setSan(String san) {
|
||||
this.san = san;
|
||||
}
|
||||
|
||||
public String getCa() {
|
||||
return ca;
|
||||
}
|
||||
|
||||
public void setCa(String ca) {
|
||||
this.ca = ca;
|
||||
}
|
||||
}
|
||||
@@ -40,14 +40,7 @@ public class DefaultRestErrorResolver implements RestErrorResolver,InitializingB
|
||||
RestResult error = new RestResult();
|
||||
error.setStatus(this.getHttpStatusByEx(ex));// 设置http状态
|
||||
//获取日志源[只有日志需要返回日志源和ActiveSys]
|
||||
String logSource = ((RestServiceException) ex).getLogSource();
|
||||
String activeSys = ((RestServiceException) ex).getActiveSys();
|
||||
if(logSource != null ){
|
||||
error.setLogSource(logSource);
|
||||
}
|
||||
if(activeSys != null ){
|
||||
error.setActiveSys(activeSys);
|
||||
}
|
||||
int logSource = ((RestServiceException) ex).getLogSource();
|
||||
|
||||
//RestServiceException 包含有错误code
|
||||
if(ex instanceof RestServiceException){
|
||||
@@ -71,8 +64,9 @@ public class DefaultRestErrorResolver implements RestErrorResolver,InitializingB
|
||||
if(this.exceptionMappingDefinitions.containsKey(ex.getClass().getName())){
|
||||
return HttpStatus.valueOf(Integer.parseInt(this.exceptionMappingDefinitions.get(ex.getClass()
|
||||
.getName())));
|
||||
} else {
|
||||
return HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
else return HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class RestResult {
|
||||
/**
|
||||
* 日志数据来源本地:0 数据中心:1
|
||||
*/
|
||||
private String logSource;
|
||||
private Integer logSource;
|
||||
|
||||
/**
|
||||
* 追踪状态码
|
||||
@@ -59,14 +59,13 @@ public class RestResult {
|
||||
|
||||
}
|
||||
|
||||
public RestResult(HttpStatus status, RestBusinessCode businessCode, String msg,String fromUri,String activeSys,String fromSign,String traceCode) {
|
||||
public RestResult(HttpStatus status, RestBusinessCode businessCode, String msg, String fromUri, Integer logSource,String traceCode) {
|
||||
super();
|
||||
this.status = status;
|
||||
this.businessCode = businessCode;
|
||||
this.msg = msg;
|
||||
this.fromUri = fromUri;
|
||||
this.activeSys=activeSys;
|
||||
this.logSource=logSource;
|
||||
this.logSource= logSource;
|
||||
this.traceCode=traceCode;
|
||||
}
|
||||
|
||||
@@ -137,14 +136,15 @@ public class RestResult {
|
||||
this.activeSys = activeSys;
|
||||
}
|
||||
|
||||
public String getLogSource() {
|
||||
public Integer getLogSource() {
|
||||
return logSource;
|
||||
}
|
||||
public void setLogSource(String logSource) {
|
||||
|
||||
public void setLogSource(Integer logSource) {
|
||||
this.logSource = logSource;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* @return data
|
||||
*/
|
||||
public Object getData() {
|
||||
@@ -166,7 +166,9 @@ public class RestResult {
|
||||
this.traceCode = traceCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
return new StringBuilder().append("HttpStatus:").append(getStatus().value())
|
||||
.append(" errorcode:")
|
||||
.append(this.getBusinessCode().getValue())
|
||||
|
||||
@@ -8,9 +8,7 @@ public class RestServiceException extends RuntimeException{
|
||||
|
||||
private int errorCode;
|
||||
|
||||
private String logSource;
|
||||
|
||||
private String activeSys;
|
||||
private int logSource;
|
||||
|
||||
private String traceCode;
|
||||
/**
|
||||
@@ -33,8 +31,10 @@ public class RestServiceException extends RuntimeException{
|
||||
this.traceCode = thread.getTraceCode();
|
||||
thread.setConsumerTime(time);
|
||||
thread.setBusinessCode(this.getErrorCode());
|
||||
if(StringUtils.isEmpty(thread.getExceptionInfo()))
|
||||
thread.setExceptionInfo(message);
|
||||
if(StringUtils.isEmpty(thread.getExceptionInfo())) {
|
||||
thread.setExceptionInfo(message);
|
||||
}
|
||||
|
||||
new Thread(thread).start();
|
||||
}
|
||||
|
||||
@@ -48,8 +48,10 @@ public class RestServiceException extends RuntimeException{
|
||||
this.traceCode = thread.getTraceCode();
|
||||
thread.setConsumerTime(time);
|
||||
thread.setBusinessCode(this.getErrorCode());
|
||||
if(StringUtils.isEmpty(thread.getExceptionInfo()))
|
||||
thread.setExceptionInfo(message);
|
||||
if(StringUtils.isEmpty(thread.getExceptionInfo())) {
|
||||
thread.setExceptionInfo(message);
|
||||
}
|
||||
|
||||
new Thread(thread).start();
|
||||
}
|
||||
|
||||
@@ -61,19 +63,14 @@ public class RestServiceException extends RuntimeException{
|
||||
public void setErrorCode(int errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getLogSource() {
|
||||
return logSource;
|
||||
}
|
||||
public void setLogSource(String logSource) {
|
||||
this.logSource = logSource;
|
||||
}
|
||||
public String getActiveSys() {
|
||||
return activeSys;
|
||||
}
|
||||
public void setActiveSys(String activeSys) {
|
||||
this.activeSys = activeSys;
|
||||
}
|
||||
|
||||
public int getLogSource() {
|
||||
return logSource;
|
||||
}
|
||||
|
||||
public void setLogSource(int logSource) {
|
||||
this.logSource = logSource;
|
||||
}
|
||||
|
||||
public String getTraceCode() {
|
||||
return traceCode;
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfIpPortLog;
|
||||
|
||||
|
||||
/**
|
||||
* 简单封装Jackson,实现JSON String<->Java Object的Mapper. 封装不同的输出风格,
|
||||
@@ -264,15 +264,7 @@ public class JsonMapper extends ObjectMapper {
|
||||
* map.put("id", 2); map.put("pId", 1); map.put("name", "你好");
|
||||
* map.put("open", true); list.add(map);
|
||||
*/
|
||||
List<DfIpPortLog> ipPort = new ArrayList<DfIpPortLog>();
|
||||
DfIpPortLog ip = new DfIpPortLog();
|
||||
ip.setCljIp("aa");
|
||||
ip.setId(null);
|
||||
ipPort.add(ip);
|
||||
Page page = new Page();
|
||||
page.setList(ipPort);
|
||||
String json = JsonMapper.getInstance().toJsonString(ipPort);
|
||||
System.out.println(json);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.nis.util.JsonMapper;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
@@ -107,10 +108,9 @@ public class HttpClientUtil {
|
||||
}
|
||||
public static void main(String[] args) throws ClientProtocolException, IOException {
|
||||
HttpClientUtil hd = new HttpClientUtil();
|
||||
hd.get("http://10.0.6.115:9200/_sql?sql=select * from dfipportlog-2016-09-07-15 limit 1 10");
|
||||
Map<String,String> map = new HashMap();
|
||||
map.put("id","1");
|
||||
hd.post("http://localhost:8080/springMVC/menu/getChildren.do",map);
|
||||
String result = hd.get("http://10.0.6.104:8080/galaxy/service/cfg/v1/configPzIdSources");
|
||||
Object mapResult = JsonMapper.fromJsonString(result,Map.class);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class BaseController {
|
||||
|
||||
/**
|
||||
* 添加Model消息
|
||||
* @param message
|
||||
* @param
|
||||
*/
|
||||
protected void addMessage(Model model, String... messages) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -123,7 +123,7 @@ public class BaseController {
|
||||
|
||||
/**
|
||||
* 添加Flash消息
|
||||
* @param message
|
||||
* @param
|
||||
*/
|
||||
protected void addMessage(RedirectAttributes redirectAttributes, String... messages) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -219,9 +219,18 @@ public class BaseRestController {
|
||||
return convert(restResult);
|
||||
}
|
||||
|
||||
public Map serviceResponse(SaveRequestLogThread thread, long time, HttpServletRequest request,
|
||||
HttpServletResponse response, String msg, Object data, String activeSys, String logSource) {
|
||||
logger.info("结果集处理开始----" + System.currentTimeMillis());
|
||||
/**
|
||||
* 日志结果响应格式规范
|
||||
* @param auditLogThread
|
||||
* @param executedTime
|
||||
* @param request
|
||||
* @param msg
|
||||
* @param data
|
||||
* @param logSource
|
||||
* @return
|
||||
*/
|
||||
public Map serviceLogResponse(SaveRequestLogThread auditLogThread, long executedTime, HttpServletRequest request,
|
||||
String msg, Object data, Integer logSource) {
|
||||
RestResult restResult = new RestResult();
|
||||
String requestMethod = request.getMethod();
|
||||
if (requestMethod.equals(RequestMethod.GET.name())) {
|
||||
@@ -240,12 +249,11 @@ public class BaseRestController {
|
||||
restResult.setFromUri(request.getRequestURI());
|
||||
restResult.setData(data);
|
||||
restResult.setMsg(msg);
|
||||
restResult.setActiveSys(activeSys);
|
||||
restResult.setLogSource(logSource);
|
||||
restResult.setTraceCode(thread.getTraceCode());
|
||||
thread.setConsumerTime(time);
|
||||
thread.setBusinessCode(restResult.getBusinessCode().getValue());
|
||||
new Thread(thread).start();
|
||||
restResult.setTraceCode(auditLogThread.getTraceCode());
|
||||
auditLogThread.setConsumerTime(executedTime);
|
||||
auditLogThread.setBusinessCode(restResult.getBusinessCode().getValue());
|
||||
new Thread(auditLogThread).start();
|
||||
return convert(restResult);
|
||||
}
|
||||
|
||||
@@ -264,7 +272,6 @@ public class BaseRestController {
|
||||
}
|
||||
successMap.put(RestConstants.TRACE_CODE, re.getTraceCode());
|
||||
successMap.put(RestConstants.REST_SERVICE_DATA, re.getData());
|
||||
logger.info("结果集处理结束----" + System.currentTimeMillis());
|
||||
return successMap;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class DfKeyConvertUrlController extends BaseRestController{
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
protected String logSource = "0";
|
||||
protected int logSource = 0;
|
||||
|
||||
@RequestMapping(value="/dfKeyConvertUrlSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="关键字业务转换URL日志信息获取" , httpMethod = "GET", notes="get log list")
|
||||
@@ -61,7 +61,9 @@ public class DfKeyConvertUrlController extends BaseRestController{
|
||||
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys)
|
||||
&& !Constants.ACTIVESYS_C.equals(searchActiveSys)
|
||||
) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
) {
|
||||
searchActiveSys=Constants.ACTIVESYS_B;
|
||||
}
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
@@ -80,11 +82,10 @@ public class DfKeyConvertUrlController extends BaseRestController{
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "关键字业务转换URL日志信息检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "关键字业务转换URL日志信息检索成功",dfKeyConvertUrlPage
|
||||
,searchActiveSys, logSource);
|
||||
return serviceLogResponse(thread, System.currentTimeMillis()-start, request, "关键字业务转换URL日志信息检索成功",dfKeyConvertUrlPage
|
||||
, logSource);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class DfKeyMailAddController extends BaseRestController {
|
||||
@Autowired
|
||||
protected DfKeyMailAddService dfKeyMailAddService;
|
||||
|
||||
protected String logSource = "0";
|
||||
protected int logSource = 0;
|
||||
|
||||
@RequestMapping(value = "/dfKeyMailAddSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "关键字业务转换邮件地址日志信息获取", httpMethod = "GET", notes = "get log list")
|
||||
@@ -61,7 +61,9 @@ public class DfKeyMailAddController extends BaseRestController {
|
||||
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys)
|
||||
&& !Constants.ACTIVESYS_C.equals(searchActiveSys)
|
||||
) searchActiveSys=Constants.ACTIVESYS_B;
|
||||
) {
|
||||
searchActiveSys=Constants.ACTIVESYS_B;
|
||||
}
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
@@ -81,11 +83,11 @@ public class DfKeyMailAddController extends BaseRestController {
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "关键字业务转换邮件地址日志信息检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "关键字业务转换邮件地址日志信息检索成功",
|
||||
dfKeyMailAddPage,searchActiveSys, logSource);
|
||||
return serviceLogResponse(thread, System.currentTimeMillis() - start, request, "关键字业务转换邮件地址日志信息检索成功",
|
||||
dfKeyMailAddPage, logSource);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@ public class IntervalTimeSearchController extends BaseRestController{
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
protected String logSource = "0";
|
||||
protected Integer logSource = 0;
|
||||
|
||||
@RequestMapping(value="/djFlowControlStopSources", method = RequestMethod.GET)
|
||||
@ApiOperation(value="监测规则流控信息获取" , httpMethod = "GET", notes="get log list")
|
||||
@@ -59,9 +59,12 @@ public class IntervalTimeSearchController extends BaseRestController{
|
||||
Page page, DjFlowControlStop flowControlStop, HttpServletRequest request,
|
||||
HttpServletResponse response, Model model) {
|
||||
|
||||
if(!Constants.ACTIVESYS_A.equals(searchActiveSys)
|
||||
if (!Constants.ACTIVESYS_A.equals(searchActiveSys)
|
||||
&& !Constants.ACTIVESYS_C.equals(searchActiveSys)
|
||||
)searchActiveSys=Constants.ACTIVESYS_B;
|
||||
) {
|
||||
searchActiveSys=Constants.ACTIVESYS_B;
|
||||
|
||||
}
|
||||
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_GET,request, null);
|
||||
@@ -79,11 +82,10 @@ public class IntervalTimeSearchController extends BaseRestController{
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(thread, System.currentTimeMillis() - start, "监测规则流控信息检索失败");
|
||||
}
|
||||
((RestServiceException) e).setActiveSys(searchActiveSys);
|
||||
((RestServiceException) e).setLogSource(logSource);
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request, response, "监测规则流控信息检索成功",flowControlStopPage
|
||||
,searchActiveSys, logSource);
|
||||
return serviceLogResponse(thread, System.currentTimeMillis()-start,request, "监测规则流控信息检索成功", flowControlStopPage
|
||||
, logSource);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,226 +0,0 @@
|
||||
/**
|
||||
*@Title: JdjInfoController.java
|
||||
*@Package com.nis.web.controller.restful
|
||||
*@Description TODO
|
||||
*@author wx
|
||||
*@date 2016年9月7日 下午3:58:16
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.restful.JdjInfo;
|
||||
import com.nis.domain.restful.JdjInfoSource;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.OracleErrorCodeUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.JdjInfoService;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @ClassName: JdjInfoController.java
|
||||
* @Description: TODO
|
||||
* @author (wx)
|
||||
* @date 2016年9月7日 下午3:58:16
|
||||
* @version V1.0
|
||||
*/
|
||||
@RestController
|
||||
//@RequestMapping("${servicePath}/cfg/v1")
|
||||
public class JdjInfoController extends BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
@Autowired
|
||||
protected JdjInfoService jdjInfoService;
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
// @Autowired
|
||||
// protected CommonConfigService commonConfigService;
|
||||
// @Autowired
|
||||
// protected RedisDao redisDao;
|
||||
/**
|
||||
* saveJdjInfoBatch(多条新增)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JdjInfoSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jdjInfoSources", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "保存节点机信息", httpMethod = "POST", notes = "save node info")
|
||||
public Map saveJdjInfoBatch(@RequestBody JdjInfoSource jdjInfoSource, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_POST,request, jdjInfoSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,jdjInfoSource.getOpAction(), Constants.OPACTION_POST);
|
||||
try{
|
||||
this.chekckData(jdjInfoSource,false);
|
||||
jdjInfoService.saveJdjInfoBatch(jdjInfoSource.getJdjInfoList());
|
||||
// commonConfigService.saveOrUpdateConfigState("JDJ_INFO", jdjInfoSource.getOpTime());
|
||||
// redisDao.saveMaps(jdjInfoSource.getJdjInfoList(), "JDJ_INFO", JdjInfo.class, "id");
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
logger.error(e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"保存节点机信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"保存节点机信息成功",jdjInfoSource.getJdjInfoList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateJdjInfoBatch(多条更新)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JdjInfoSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jdjInfoSources", method = RequestMethod.PUT)
|
||||
@ApiOperation(value = "更新节点机信息", httpMethod = "PUT", notes = "update node info")
|
||||
public Map updateJdjInfoBatch(@RequestBody JdjInfoSource jdjInfoSource, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_PUT,request, jdjInfoSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,jdjInfoSource.getOpAction(), Constants.OPACTION_PUT);
|
||||
try{
|
||||
this.chekckData(jdjInfoSource,true);
|
||||
jdjInfoService.updateJdjInfoBatch(jdjInfoSource.getJdjInfoList());
|
||||
// commonConfigService.saveOrUpdateConfigState("JDJ_INFO", jdjInfoSource.getOpTime());
|
||||
// redisDao.updateMaps(jdjInfoSource.getJdjInfoList(), "JDJ_INFO", JdjInfo.class, "id");
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
logger.error(e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"更新节点机信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"更新节点机信息成功",jdjInfoSource.getJdjInfoList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteJdjInfo(单条删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param id
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jdjInfoSources/{id}", method = RequestMethod.DELETE)
|
||||
@ApiOperation(value = "删除节点机信息", httpMethod = "DELETE", notes = "delete node info")
|
||||
public Map deleteJdjInfo(@PathVariable("id") long id, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_DELETE,request, id);
|
||||
try{
|
||||
jdjInfoService.removeJdjInfo(id);
|
||||
// commonConfigService.saveOrUpdateConfigState("JDJ_INFO", new Date());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
logger.error(e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"删除节点机信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
|
||||
}
|
||||
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"删除成功",id);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* deleteJdjInfo(多条删除)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param JdjInfoSource
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*Map
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "/jdjInfoSources", method = RequestMethod.DELETE)
|
||||
@ApiOperation(value = "删除节点机信息", httpMethod = "DELETE", notes = "delete node info")
|
||||
public Map deleteJdjInfo(@RequestBody JdjInfoSource jdjInfoSource, HttpServletRequest request, HttpServletResponse response){
|
||||
long start=System.currentTimeMillis();
|
||||
SaveRequestLogThread thread=super.saveRequestLog(servicesRequestLogService,Constants.OPACTION_DELETE,request, jdjInfoSource);
|
||||
super.checkOpAction(thread,System.currentTimeMillis()-start,jdjInfoSource.getOpAction(), Constants.OPACTION_DELETE);
|
||||
try{
|
||||
jdjInfoService.removeJdjInfoBatch(jdjInfoSource.getJdjInfoList());
|
||||
// commonConfigService.saveOrUpdateConfigState("JDJ_INFO", jdjInfoSource.getOpTime());
|
||||
}catch(Exception e){
|
||||
thread.setExceptionInfo(e.getMessage()+" "+e.getCause());
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
logger.error(e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"删除节点机信息失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"批量删除成功",jdjInfoSource.getJdjInfoList());
|
||||
}
|
||||
/**
|
||||
*
|
||||
* chekckData(操作验证时间)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param entity
|
||||
* @return
|
||||
*boolean
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private void chekckData(JdjInfoSource entity, boolean update){
|
||||
Date now =new Date();
|
||||
for(JdjInfo jdjInfo :entity.getJdjInfoList()){
|
||||
jdjInfo.setLastUpdate(now);
|
||||
if(jdjInfo.getOpTime()==null)
|
||||
jdjInfo.setOpTime(entity.getOpTime());
|
||||
if(!update){//新增时判断默认值
|
||||
if(jdjInfo.getJcIp()==null)jdjInfo.setJcIp("0.0.0.0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
257
src/main/java/com/nis/web/controller/restful/LogController.java
Normal file
257
src/main/java/com/nis/web/controller/restful/LogController.java
Normal file
@@ -0,0 +1,257 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.*;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
import com.nis.web.service.restful.LogTestService;
|
||||
import com.wordnik.swagger.annotations.Api;
|
||||
import com.wordnik.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/10.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("${servicePath}/log/v1")
|
||||
@Api(value = "LogController", description = "配置命中日志基本服务接口")
|
||||
public class LogController extends BaseRestController{
|
||||
@Autowired
|
||||
public LogTestService testService;
|
||||
|
||||
@Autowired
|
||||
protected ServicesRequestLogService servicesRequestLogService;
|
||||
|
||||
@RequestMapping(value = "/ntcIpLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "IP地址日志查询", httpMethod = "GET", notes = "对应配置为IP地址管理,存储动作为阻断与监测的命中日志。对日志功能IP地址提供数据基础查询服务")
|
||||
public Map<String, ?> ntcIpLogs(Page page, NtcIpLog ntcIpLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcIpLog> ntcIpLogPage = new Page<>();
|
||||
try {
|
||||
ntcIpLogPage = testService.findNtcIpLogPage(
|
||||
new Page<NtcIpLog>(request, response, NtcIpLog.class), ntcIpLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "IP地址日志检索成功", ntcIpLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcHttpLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "HTTP日志查询", httpMethod = "GET", notes = "对应配置为“网站管理-HTTP”,存储动作为阻断与监测的命中日志。对日志功能“网站管理-HTTP”提供数据基础查询服务")
|
||||
public Map<String, ?> ntcHttpLogs(Page page, NtcHttpLog ntcHttpLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcHttpLog> ntcHttpLogPage = new Page<>();
|
||||
try {
|
||||
ntcHttpLogPage = testService.findNtcHttpLogPage(
|
||||
new Page<NtcHttpLog>(request, response, NtcHttpLog.class), ntcHttpLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Http日志检索成功", ntcHttpLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcDnsLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "DNS日志查询", httpMethod = "GET", notes = "对应配置为“网站管理-DNS”,存储动作为阻断与监测的命中日志。对日志功能“网站管理-DNS”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcDnsLogs(Page page, NtcDnsLog ntcDnsLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcDnsLog> ntcDnsLogPage = new Page<>();
|
||||
try {
|
||||
ntcDnsLogPage = testService.findNtcDnsLogPage(
|
||||
new Page<NtcDnsLog>(request, response, NtcDnsLog.class), ntcDnsLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Dns日志检索成功", ntcDnsLogPage, 0);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/ntcMailLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "EMAIL日志查询", httpMethod = "GET", notes = "对应配置为“邮件管理”,存储动作为阻断与监测的命中日志。对日志功能“邮件管理”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcMailLogs(Page page, NtcMailLog ntcMailLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcMailLog> ntcMailLogPage = new Page<>();
|
||||
try {
|
||||
ntcMailLogPage = testService.findNtcMailLogPage(
|
||||
new Page<NtcMailLog>(request, response, NtcMailLog.class), ntcMailLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Mail日志检索成功", ntcMailLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcSSLLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "SSL日志查询", httpMethod = "GET", notes = "对应配置为“网站管理-SSL”,存储动作为阻断与监测的命中日志。对日志功能“网站管理-SSL”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcSslLogs(Page page, NtcSslLog ntcSslLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcSslLog> ntcSslLogPage = new Page<>();
|
||||
try {
|
||||
ntcSslLogPage = testService.findNtcSslLogPage(
|
||||
new Page<NtcSslLog>(request, response, NtcSslLog.class), ntcSslLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSL日志检索成功", ntcSslLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcPptpLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "PPTP日志查询", httpMethod = "GET", notes = "对应配置为“隧道管理-PPTP”,存储动作为阻断与监测的命中日志。对日志功能“隧道管理-PPTP”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcPptpLogs(Page page, NtcPptpLog ntcPptpLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcPptpLog> ntcPptpLogPage = new Page<>();
|
||||
try {
|
||||
ntcPptpLogPage = testService.findNtcPptpLogPage(
|
||||
new Page<NtcPptpLog>(request, response, NtcPptpLog.class), ntcPptpLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "PPTP日志检索成功", ntcPptpLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcL2tpLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "L2TP日志查询", httpMethod = "GET", notes = "对应配置为“隧道管理-L2TP”,存储动作为阻断与监测的命中日志。对日志功能“隧道管理- L2TP”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcL2tpLogs(Page page, NtcL2tpLog ntcL2tpLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcL2tpLog> ntcL2tpLogPage = new Page<>();
|
||||
try {
|
||||
ntcL2tpLogPage = testService.findNtcL2tpLogPage(
|
||||
new Page<NtcL2tpLog>(request, response, NtcL2tpLog.class), ntcL2tpLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "L2TP日志检索成功", ntcL2tpLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcOpenvpnLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "OPENVPN日志查询", httpMethod = "GET", notes = "对应配置为“隧道管理-OPENVPN”,存储动作为阻断与监测的命中日志。对日志功能“隧道管理- OPENVPN”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcOpenvpnLogs(Page page, NtcOpenvpnLog ntcOpenvpnLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcOpenvpnLog> ntcOpenvpnLogPage = new Page<>();
|
||||
try {
|
||||
ntcOpenvpnLogPage = testService.findNtcOpenvpnLogPage(
|
||||
new Page<NtcOpenvpnLog>(request, response, NtcOpenvpnLog.class), ntcOpenvpnLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Openvpn日志检索成功", ntcOpenvpnLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcIpsecLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "IPSEC日志查询", httpMethod = "GET", notes = "对应配置为“隧道管理-IPSEC”,存储动作为监测的命中日志。对日志功能“隧道管理- IPSEC”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcIpsecLogs(Page page, NtcIpsecLog ntcIpsecLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcIpsecLog> ntcIpsecLogPage = new Page<>();
|
||||
try {
|
||||
ntcIpsecLogPage = testService.findNtcIpsecLogPage(
|
||||
new Page<NtcIpsecLog>(request, response, NtcIpsecLog.class), ntcIpsecLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "IPSEC日志检索成功", ntcIpsecLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcSshLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "SSH日志查询", httpMethod = "GET", notes = "对应配置为“隧道管理-SSH”,存储动作为阻断与监测的命中日志。对日志功能“隧道管理- SSH”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcSshLogs(Page page, NtcSshLog ntcSshLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcSshLog> ntcSshLogPage = new Page<>();
|
||||
try {
|
||||
ntcSshLogPage = testService.findNtcSshLogPage(
|
||||
new Page<NtcSshLog>(request, response, NtcSshLog.class), ntcSshLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSH日志检索成功", ntcSshLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/ntcFtpLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "FTP日志查询", httpMethod = "GET", notes = "对应配置为“文件传输-FTP”,存储动作为阻断与监测的命中日志。对日志功能“文件传输-FTP”提供数据基础查询服务。")
|
||||
public Map<String, ?> ntcFtpLogs(Page page, NtcFtpLog ntcFtpLog, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null);
|
||||
|
||||
Page<NtcFtpLog> ntcFtpLogPage = new Page<>();
|
||||
try {
|
||||
ntcFtpLogPage = testService.findNtcFtpLogPage(
|
||||
new Page<NtcFtpLog>(request, response, NtcSshLog.class), ntcFtpLog);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "FTP日志检索成功", ntcFtpLogPage, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -71,12 +71,16 @@ public class SystemFunStatusController extends BaseRestController {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
logger.error(e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
if(e instanceof RestServiceException) {throw e;}
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
if(!StringUtil.isEmpty(info)) {
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"保存文本系统功能类业务配置失败", RestBusinessCode.unknow_error.getValue());
|
||||
} else {
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"保存文本系统功能类业务配置失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"保存文本系统功能类业务配置成功",systemFunStatusSource.getSystemFunStatusList());
|
||||
}
|
||||
@@ -108,21 +112,25 @@ public class SystemFunStatusController extends BaseRestController {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getMessage());
|
||||
logger.error(e.getCause());
|
||||
if(e instanceof RestServiceException) throw e;
|
||||
if(e instanceof RestServiceException) {throw e; }
|
||||
String info=OracleErrorCodeUtil.getOraCode(e);
|
||||
if(!StringUtil.isEmpty(info))
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread,System.currentTimeMillis()-start,info);
|
||||
else
|
||||
throw new RestServiceException(thread,System.currentTimeMillis()-start,"更新文本系统功能类业务配置失败", RestBusinessCode.unknow_error.getValue());
|
||||
if(!StringUtil.isEmpty(info)) {
|
||||
OracleErrorCodeUtil.throwExceptionInfo(thread, System.currentTimeMillis() - start, info);
|
||||
} else {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "更新文本系统功能类业务配置失败", RestBusinessCode.unknow_error.getValue());
|
||||
}
|
||||
}
|
||||
return serviceResponse(thread,System.currentTimeMillis()-start,request,response,"更新文本系统功能类业务配置成功",systemFunStatusSource.getSystemFunStatusList());
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void chekckData(SystemFunStatusSource entity) {
|
||||
for (SystemFunStatus systemFunStatus : entity.getSystemFunStatusList()) {
|
||||
if (systemFunStatus.getOpTime() == null)
|
||||
systemFunStatus.setOpTime(entity.getOpTime());
|
||||
if (systemFunStatus.getOpTime() == null) {
|
||||
systemFunStatus.setOpTime(entity.getOpTime());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import com.nis.web.controller.BaseController;
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/sys/area")
|
||||
public class AreaController extends BaseController {
|
||||
|
||||
|
||||
|
||||
@ModelAttribute
|
||||
public SysArea get(@RequestParam(required=false) Long id) {
|
||||
|
||||
@@ -15,10 +15,6 @@ import com.nis.domain.ControlLog;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.restful.DfDnsLog;
|
||||
import com.nis.domain.restful.DfFtpLog;
|
||||
import com.nis.domain.restful.DfHttpKeywordLog;
|
||||
import com.nis.domain.restful.DfHttpReqLog;
|
||||
import com.nis.domain.restful.DfHttpResLog;
|
||||
import com.nis.domain.restful.DfIpPortLog;
|
||||
import com.nis.domain.restful.DfIpsecLog;
|
||||
import com.nis.domain.restful.DfL2tpLog;
|
||||
import com.nis.domain.restful.DfMailLog;
|
||||
@@ -37,11 +33,7 @@ import com.nis.domain.restful.DfTunnelRandomLog;
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DfLogSearchDao extends CrudDao<LogEntity> {
|
||||
|
||||
List<DfIpPortLog> findIpPortLogs(DfIpPortLog log);
|
||||
List<DfHttpReqLog> findHttpReqLogs(DfHttpReqLog log);
|
||||
List<DfHttpResLog> findHttpResLogs(DfHttpResLog log);
|
||||
List<DfHttpKeywordLog> findHttpKeywordLogs(DfHttpKeywordLog log);
|
||||
|
||||
List<DfMailLog> findMailLogs(DfMailLog log);
|
||||
List<DfDnsLog> findDnsLogs(DfDnsLog log);
|
||||
List<DfFtpLog> findFtpLogs(DfFtpLog log);
|
||||
@@ -52,10 +44,6 @@ public interface DfLogSearchDao extends CrudDao<LogEntity> {
|
||||
List<DfSshLog> findSshLogs(DfSshLog log);
|
||||
List<DfSslLog> findSslLogs(DfSslLog log);
|
||||
List<DfTunnelRandomLog> findTunnelRandomLogs(DfTunnelRandomLog log);
|
||||
List<DfIpPortLog> findIpPortLogsCluster(DfIpPortLog log);
|
||||
List<DfHttpReqLog> findHttpReqLogsCluster(DfHttpReqLog log);
|
||||
List<DfHttpResLog> findHttpResLogsCluster(DfHttpResLog log);
|
||||
List<DfHttpKeywordLog> findHttpKeywordLogsCluster(DfHttpKeywordLog log);
|
||||
List<DfMailLog> findMailLogsCluster(DfMailLog log);
|
||||
List<DfDnsLog> findDnsLogsCluster(DfDnsLog log);
|
||||
List<DfFtpLog> findFtpLogsCluster(DfFtpLog log);
|
||||
|
||||
@@ -15,10 +15,6 @@ import com.nis.domain.ControlLog;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.restful.DfDnsLog;
|
||||
import com.nis.domain.restful.DfFtpLog;
|
||||
import com.nis.domain.restful.DfHttpKeywordLog;
|
||||
import com.nis.domain.restful.DfHttpReqLog;
|
||||
import com.nis.domain.restful.DfHttpResLog;
|
||||
import com.nis.domain.restful.DfIpPortLog;
|
||||
import com.nis.domain.restful.DfIpsecLog;
|
||||
import com.nis.domain.restful.DfL2tpLog;
|
||||
import com.nis.domain.restful.DfMailLog;
|
||||
@@ -37,11 +33,7 @@ import com.nis.domain.restful.DfTunnelRandomLog;
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface DfLogSearchDaoCluster extends CrudDao<LogEntity> {
|
||||
|
||||
List<DfIpPortLog> findIpPortLogsCluster(DfIpPortLog log);
|
||||
List<DfHttpReqLog> findHttpReqLogsCluster(DfHttpReqLog log);
|
||||
List<DfHttpResLog> findHttpResLogsCluster(DfHttpResLog log);
|
||||
List<DfHttpKeywordLog> findHttpKeywordLogsCluster(DfHttpKeywordLog log);
|
||||
|
||||
List<DfMailLog> findMailLogsCluster(DfMailLog log);
|
||||
List<DfDnsLog> findDnsLogsCluster(DfDnsLog log);
|
||||
List<DfFtpLog> findFtpLogsCluster(DfFtpLog log);
|
||||
|
||||
@@ -219,7 +219,7 @@ public abstract class BaseLogService {
|
||||
/**
|
||||
* wx 报表查询条件检查
|
||||
*
|
||||
* @param className
|
||||
* @param clazz
|
||||
* 需要检验的实体名称[需要保证resultMap的id命名方式为[className]Map]
|
||||
* @param page
|
||||
* 需要校验的page对象
|
||||
|
||||
@@ -19,8 +19,9 @@ import org.apache.log4j.Logger;
|
||||
import com.nis.datasource.CustomerContextHolder;
|
||||
|
||||
/**
|
||||
* 审计日志工作线程
|
||||
* @ClassName: SaveLogThread.java
|
||||
* @Description: TODO
|
||||
* @Description: 用于记录业务操作日志,后期用于审计及相关联调验证工作
|
||||
* @author (dell)
|
||||
* @date 2016年10月14日 下午6:26:41
|
||||
* @version V1.0
|
||||
@@ -66,7 +67,6 @@ public class SaveRequestLogThread implements Runnable {
|
||||
* 创建一个新的实例 SaveRequestLogThread.
|
||||
*
|
||||
* @param service
|
||||
* @param requestAddr
|
||||
* @param requestURI
|
||||
* @param queryString
|
||||
* @param contextPath
|
||||
|
||||
@@ -67,9 +67,6 @@ public class ServicesRequestLogService {
|
||||
* request中的参数
|
||||
* @param contextPath
|
||||
* request中的参数
|
||||
* @param request
|
||||
* 请求
|
||||
* @param response
|
||||
* 响应
|
||||
* @param operator
|
||||
* 操作人
|
||||
|
||||
@@ -25,10 +25,6 @@ import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DfDnsLog;
|
||||
import com.nis.domain.restful.DfFtpLog;
|
||||
import com.nis.domain.restful.DfHttpKeywordLog;
|
||||
import com.nis.domain.restful.DfHttpReqLog;
|
||||
import com.nis.domain.restful.DfHttpResLog;
|
||||
import com.nis.domain.restful.DfIpPortLog;
|
||||
import com.nis.domain.restful.DfIpsecLog;
|
||||
import com.nis.domain.restful.DfL2tpLog;
|
||||
import com.nis.domain.restful.DfMailLog;
|
||||
@@ -87,109 +83,8 @@ public class DfLogSearchService extends BaseLogService{
|
||||
public List<LogEntity> findList(LogEntity entity) {
|
||||
return dao.findList(entity);
|
||||
}
|
||||
/**
|
||||
* 查询端口封堵分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfIpPortLog> findIpPortPage(Page<DfIpPortLog> page, DfIpPortLog entity,String activeSys) throws Exception{
|
||||
entity.setPage(page);
|
||||
if(Constants.IS_USE_ES){
|
||||
List<DfIpPortLog> resultList=new ArrayList<>();
|
||||
elasticsearchSqlDao.findLogs(resultList, entity,activeSys);
|
||||
page.setList(resultList);
|
||||
}else{
|
||||
page.setList(dao.findIpPortLogs(entity));
|
||||
}
|
||||
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpReqLog> findHttpReqPage(Page<DfHttpReqLog> page, DfHttpReqLog entity,String activeSys) throws Exception {
|
||||
entity.setPage(page);
|
||||
if(Constants.IS_USE_ES){
|
||||
List<DfHttpReqLog> resultList=new ArrayList<>();
|
||||
elasticsearchSqlDao.findLogs(resultList, entity,activeSys);
|
||||
page.setList(resultList);
|
||||
}else{
|
||||
page.setList(dao.findHttpReqLogs(entity));
|
||||
}
|
||||
/*if(type.equals("jdbc")){
|
||||
logger.info("**********oralce JDBC数据查询开始时间"+System.currentTimeMillis());
|
||||
page.setList(MysqlJDBC.queryByCondition(page, entity));
|
||||
logger.info("**********oralce JDBC数据查询结束时间"+System.currentTimeMillis());
|
||||
}else if(type.equals("es")){
|
||||
logger.info("**********es数据查询开始时间"+System.currentTimeMillis());
|
||||
List<DfHttpReqLog> dfHttpReqLogs=new ArrayList<DfHttpReqLog>();
|
||||
elasticsearchSqlDao.findLogs(dfHttpReqLogs, entity);
|
||||
page.setList(dfHttpReqLogs);
|
||||
logger.info("**********es数据查询开始时间"+System.currentTimeMillis());
|
||||
}else{
|
||||
logger.info("**********oralce Mybatis数据查询开始时间"+System.currentTimeMillis());
|
||||
page.setList(dao.findHttpReqLogs(entity));
|
||||
logger.info("**********oralce Mybatis数据查询开始结束"+System.currentTimeMillis());
|
||||
}*/
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpResLog> findHttpResPage(Page<DfHttpResLog> page, DfHttpResLog entity,String activeSys) throws Exception{
|
||||
entity.setPage(page);
|
||||
if(Constants.IS_USE_ES){
|
||||
List<DfHttpResLog> resultList=new ArrayList<>();
|
||||
elasticsearchSqlDao.findLogs(resultList, entity,activeSys);
|
||||
page.setList(resultList);
|
||||
}else{
|
||||
page.setList(dao.findHttpResLogs(entity));
|
||||
}
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpKeywordLog> findHttpKeywordPage(Page<DfHttpKeywordLog> page, DfHttpKeywordLog entity,String activeSys) throws Exception {
|
||||
entity.setPage(page);
|
||||
if(Constants.IS_USE_ES){
|
||||
List<DfHttpKeywordLog> resultList=new ArrayList<>();
|
||||
elasticsearchSqlDao.findLogs(resultList, entity,activeSys);
|
||||
page.setList(resultList);
|
||||
}else{
|
||||
page.setList(dao.findHttpKeywordLogs(entity));
|
||||
}
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpKeywordLog> findHttpMultiPartPage(Page<DfHttpKeywordLog> page, DfHttpKeywordLog entity,String activeSys) throws Exception {
|
||||
entity.setPage(page);
|
||||
if(Constants.IS_USE_ES){
|
||||
List<DfHttpKeywordLog> resultList=new ArrayList<>();
|
||||
elasticsearchSqlDao.findLogs(resultList, entity,activeSys);
|
||||
page.setList(resultList);
|
||||
}else{
|
||||
page.setList(dao.findHttpKeywordLogs(entity));
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
@@ -373,64 +268,7 @@ public class DfLogSearchService extends BaseLogService{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询端口封堵分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfIpPortLog> findIpPortPageCluster(Page<DfIpPortLog> page, DfIpPortLog entity,String activeSys) throws Exception{
|
||||
entity.setPage(page);
|
||||
page.setList(daoCluster.findIpPortLogsCluster(entity));
|
||||
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpReqLog> findHttpReqPageCluster(Page<DfHttpReqLog> page, DfHttpReqLog entity,String activeSys) throws Exception {
|
||||
entity.setPage(page);
|
||||
page.setList(daoCluster.findHttpReqLogsCluster(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpResLog> findHttpResPageCluster(Page<DfHttpResLog> page, DfHttpResLog entity,String activeSys) throws Exception{
|
||||
entity.setPage(page);
|
||||
page.setList(daoCluster.findHttpResLogsCluster(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpKeywordLog> findHttpKeywordPageCluster(Page<DfHttpKeywordLog> page, DfHttpKeywordLog entity,String activeSys) throws Exception {
|
||||
entity.setPage(page);
|
||||
page.setList(daoCluster.findHttpKeywordLogsCluster(entity));
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<DfHttpKeywordLog> findHttpMultiPartPageCluster(Page<DfHttpKeywordLog> page, DfHttpKeywordLog entity,String activeSys) throws Exception {
|
||||
entity.setPage(page);
|
||||
page.setList(daoCluster.findHttpKeywordLogsCluster(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
|
||||
596
src/main/java/com/nis/web/service/restful/LogTestService.java
Normal file
596
src/main/java/com/nis/web/service/restful/LogTestService.java
Normal file
@@ -0,0 +1,596 @@
|
||||
package com.nis.web.service.restful;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.*;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.service.BaseLogService;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.twill.api.logging.LogEntry;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by darnell on 2018/6/10.
|
||||
* 日志测试业务类,用于接口或临时验证测试使用
|
||||
*/
|
||||
@Service
|
||||
public class LogTestService extends BaseLogService {
|
||||
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
|
||||
/**
|
||||
* IP地址日志检索测试业务方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcIpLog> findNtcIpLogPage(Page<NtcIpLog> page, NtcIpLog entity) throws Exception{
|
||||
List<NtcIpLog> ntcIpLogs = Lists.newArrayList();
|
||||
NtcIpLog ntcIpLog = new NtcIpLog();
|
||||
ntcIpLog.setId(35L);
|
||||
ntcIpLog.setCfgId(531L);
|
||||
ntcIpLog.setServiceType(16);
|
||||
ntcIpLog.setFoundTime(new Date());
|
||||
ntcIpLog.setRecvTime(new Date());
|
||||
ntcIpLog.setAddrType(4);
|
||||
ntcIpLog.setProtocol("IPv4_TCP");
|
||||
ntcIpLog.setClientIp("192.168.10.106");
|
||||
ntcIpLog.setClientPort(80);
|
||||
ntcIpLog.setServerIp("202.106.0.20");
|
||||
ntcIpLog.setServerPort(8443);
|
||||
ntcIpLog.setCljIp("10.0.6.240");
|
||||
ntcIpLog.setDeviceId(1356981);
|
||||
ntcIpLog.setDirection(0);
|
||||
ntcIpLog.setStreamType(0);
|
||||
ntcIpLog.setEntranceId(21L);
|
||||
ntcIpLog.setUserRegion("531");
|
||||
ntcIpLog.setClientLocate("本地地址");
|
||||
ntcIpLog.setServerLocate("中国 北京 电信宽带光纤");
|
||||
ntcIpLogs.add(ntcIpLog);
|
||||
|
||||
ntcIpLog = new NtcIpLog();
|
||||
ntcIpLog.setId(36L);
|
||||
ntcIpLog.setCfgId(532L);
|
||||
ntcIpLog.setServiceType(128);
|
||||
ntcIpLog.setFoundTime(new Date());
|
||||
ntcIpLog.setRecvTime(new Date());
|
||||
ntcIpLog.setAddrType(4);
|
||||
ntcIpLog.setProtocol("IPv4_TCP");
|
||||
ntcIpLog.setClientIp("192.168.10.106");
|
||||
ntcIpLog.setClientPort(80);
|
||||
ntcIpLog.setServerIp("202.106.0.20");
|
||||
ntcIpLog.setServerPort(8443);
|
||||
ntcIpLog.setCljIp("10.0.6.240");
|
||||
ntcIpLog.setDeviceId(1356981);
|
||||
ntcIpLog.setDirection(0);
|
||||
ntcIpLog.setStreamType(0);
|
||||
ntcIpLog.setEntranceId(21L);
|
||||
ntcIpLog.setUserRegion("531");
|
||||
ntcIpLog.setClientLocate("本地地址");
|
||||
ntcIpLog.setServerLocate("中国 北京 电信宽带光纤");
|
||||
ntcIpLogs.add(ntcIpLog);
|
||||
page.setCount(ntcIpLogs.size());
|
||||
|
||||
page.setList(ntcIpLogs);
|
||||
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* http 日志检索测试业务方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcHttpLog> findNtcHttpLogPage(Page<NtcHttpLog> page, NtcHttpLog entity) throws Exception {
|
||||
|
||||
List<NtcHttpLog> ntcHttpLogs = Lists.newArrayList();
|
||||
|
||||
NtcHttpLog ntcHttpLog = new NtcHttpLog();
|
||||
ntcHttpLog = (NtcHttpLog) createTestData(ntcHttpLog);
|
||||
ntcHttpLog.setId(35L);
|
||||
ntcHttpLog.setCfgId(1532L);
|
||||
ntcHttpLog.setServiceType(17);
|
||||
ntcHttpLog.setUserRegion("1532");
|
||||
ntcHttpLog.setC2sIsn(19034211L);
|
||||
ntcHttpLog.setHttpProxyFlag(211L);
|
||||
ntcHttpLog.setHttpSeq(1L);
|
||||
ntcHttpLog.setUrl("http://jd.com/get/api/json");
|
||||
ntcHttpLog.setReqLine("Get jd.com");
|
||||
ntcHttpLog.setResLine("response line content");
|
||||
ntcHttpLogs.add(ntcHttpLog);
|
||||
|
||||
|
||||
ntcHttpLog = new NtcHttpLog();
|
||||
ntcHttpLog = (NtcHttpLog) createTestData(ntcHttpLog);
|
||||
ntcHttpLog.setId(36L);
|
||||
ntcHttpLog.setCfgId(1533L);
|
||||
ntcHttpLog.setServiceType(129);
|
||||
ntcHttpLog.setUserRegion("1533");
|
||||
ntcHttpLog.setC2sIsn(19034211L);
|
||||
ntcHttpLog.setHttpProxyFlag(211L);
|
||||
ntcHttpLog.setC2sIsn(190342112L);
|
||||
ntcHttpLog.setHttpProxyFlag(212L);
|
||||
ntcHttpLog.setHttpSeq(2L);
|
||||
ntcHttpLog.setUrl("http://jd.com/get/api/json/abc");
|
||||
ntcHttpLog.setReqLine("Get jd.com");
|
||||
ntcHttpLog.setResLine("response line content");
|
||||
ntcHttpLogs.add(ntcHttpLog);
|
||||
|
||||
|
||||
page.setCount(ntcHttpLogs.size());
|
||||
page.setList(ntcHttpLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* dns 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcDnsLog> findNtcDnsLogPage(Page<NtcDnsLog> page, NtcDnsLog entity) throws Exception {
|
||||
|
||||
List<NtcDnsLog> ntcDnsLogs = Lists.newArrayList();
|
||||
|
||||
NtcDnsLog ntcDnsLog = new NtcDnsLog();
|
||||
ntcDnsLog = (NtcDnsLog) createTestData(ntcDnsLog);
|
||||
ntcDnsLog.setId(37L);
|
||||
ntcDnsLog.setCfgId(2532L);
|
||||
ntcDnsLog.setServiceType(18);
|
||||
ntcDnsLog.setUserRegion("2532");
|
||||
ntcDnsLog.setQr(0);
|
||||
ntcDnsLog.setRd(1);
|
||||
ntcDnsLog.setRa(0);
|
||||
ntcDnsLog.setRr("query");
|
||||
ntcDnsLog.setqType(0);
|
||||
ntcDnsLog.setQclass(0);
|
||||
ntcDnsLog.setOpcode(0);
|
||||
ntcDnsLog.setQname("www.sina.com.cn");
|
||||
ntcDnsLog.setCname("sina");
|
||||
ntcDnsLog.setDnsSub(1);
|
||||
|
||||
ntcDnsLogs.add(ntcDnsLog);
|
||||
|
||||
|
||||
ntcDnsLog = new NtcDnsLog();
|
||||
ntcDnsLog = (NtcDnsLog) createTestData(ntcDnsLog);
|
||||
ntcDnsLog.setId(38L);
|
||||
ntcDnsLog.setCfgId(2533L);
|
||||
ntcDnsLog.setServiceType(130);
|
||||
ntcDnsLog.setUserRegion("2533");
|
||||
ntcDnsLog.setQr(1);
|
||||
ntcDnsLog.setRd(1);
|
||||
ntcDnsLog.setRa(0);
|
||||
ntcDnsLog.setRr("query");
|
||||
ntcDnsLog.setqType(1);
|
||||
ntcDnsLog.setQclass(1);
|
||||
ntcDnsLog.setOpcode(1);
|
||||
ntcDnsLog.setQname("www.sina.com.cn");
|
||||
ntcDnsLog.setCname("sina");
|
||||
ntcDnsLog.setDnsSub(2);
|
||||
|
||||
ntcDnsLogs.add(ntcDnsLog);
|
||||
|
||||
|
||||
page.setCount(ntcDnsLogs.size());
|
||||
page.setList(ntcDnsLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* SSL 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcSslLog> findNtcSslLogPage(Page<NtcSslLog> page, NtcSslLog entity) throws Exception {
|
||||
|
||||
List<NtcSslLog> ntcSslLogs = Lists.newArrayList();
|
||||
|
||||
NtcSslLog ntcSslLog = new NtcSslLog();
|
||||
ntcSslLog = (NtcSslLog) createTestData(ntcSslLog);
|
||||
ntcSslLog.setId(39L);
|
||||
ntcSslLog.setCfgId(4532L);
|
||||
ntcSslLog.setServiceType(19);
|
||||
ntcSslLog.setUserRegion("4532");
|
||||
ntcSslLog.setVersion("版本 3");
|
||||
ntcSslLog.setSni("*.cnblogs.cn");
|
||||
ntcSslLog.setCa("DigCert Inc");
|
||||
ntcSslLog.setSan("*.cnblogs.cn");
|
||||
|
||||
|
||||
ntcSslLogs.add(ntcSslLog);
|
||||
|
||||
|
||||
ntcSslLog = new NtcSslLog();
|
||||
ntcSslLog = (NtcSslLog) createTestData(ntcSslLog);
|
||||
ntcSslLog.setId(40L);
|
||||
ntcSslLog.setCfgId(4533L);
|
||||
ntcSslLog.setServiceType(131);
|
||||
ntcSslLog.setUserRegion("4533");
|
||||
ntcSslLog.setVersion("版本 3");
|
||||
ntcSslLog.setSni("*.cnblogs.cn");
|
||||
ntcSslLog.setCa("DigCert Inc");
|
||||
ntcSslLog.setSan("*.cnblogs.cn");
|
||||
|
||||
|
||||
ntcSslLogs.add(ntcSslLog);
|
||||
|
||||
|
||||
page.setCount(ntcSslLogs.size());
|
||||
page.setList(ntcSslLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Mail日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcMailLog> findNtcMailLogPage(Page<NtcMailLog> page, NtcMailLog entity) throws Exception {
|
||||
|
||||
List<NtcMailLog> ntcMailLogs = Lists.newArrayList();
|
||||
|
||||
NtcMailLog ntcMailLog = new NtcMailLog();
|
||||
ntcMailLog = (NtcMailLog) createTestData(ntcMailLog);
|
||||
ntcMailLog.setId(38L);
|
||||
ntcMailLog.setCfgId(3532L);
|
||||
ntcMailLog.setServiceType(20);
|
||||
ntcMailLog.setUserRegion("3532");
|
||||
ntcMailLog.setMailProto("SMTP");
|
||||
ntcMailLog.setMailFrom("darnell@163.com");
|
||||
ntcMailLog.setMailTo("iamfree@163.com");
|
||||
ntcMailLog.setSubject("领导工资问题,涨涨");
|
||||
ntcMailLog.setEmlFile("http://127.0.0.1/abc.eml");
|
||||
ntcMailLogs.add(ntcMailLog);
|
||||
|
||||
|
||||
ntcMailLog = new NtcMailLog();
|
||||
ntcMailLog = (NtcMailLog) createTestData(ntcMailLog);
|
||||
ntcMailLog.setId(39L);
|
||||
ntcMailLog.setCfgId(3533L);
|
||||
ntcMailLog.setServiceType(132);
|
||||
ntcMailLog.setUserRegion("3533");
|
||||
ntcMailLog.setMailProto("smtp");
|
||||
ntcMailLog.setMailFrom("iamfree@163.com");
|
||||
ntcMailLog.setMailTo("darnell@163.com");
|
||||
ntcMailLog.setSubject("滚");
|
||||
ntcMailLog.setEmlFile("http://127.0.0.1/abc.eml");
|
||||
|
||||
ntcMailLogs.add(ntcMailLog);
|
||||
|
||||
|
||||
page.setCount(ntcMailLogs.size());
|
||||
page.setList(ntcMailLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PPTP 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcPptpLog> findNtcPptpLogPage(Page<NtcPptpLog> page, NtcPptpLog entity) throws Exception {
|
||||
|
||||
List<NtcPptpLog> ntcPptpLogs = Lists.newArrayList();
|
||||
|
||||
NtcPptpLog ntcPptpLog = new NtcPptpLog();
|
||||
ntcPptpLog = (NtcPptpLog) createTestData(ntcPptpLog);
|
||||
ntcPptpLog.setId(41L);
|
||||
ntcPptpLog.setCfgId(5532L);
|
||||
ntcPptpLog.setServiceType(22);
|
||||
ntcPptpLog.setUserRegion("5532");
|
||||
ntcPptpLog.setTunnelType(1);
|
||||
ntcPptpLog.setEncryptMode(1);
|
||||
|
||||
|
||||
|
||||
ntcPptpLogs.add(ntcPptpLog);
|
||||
|
||||
|
||||
ntcPptpLog = new NtcPptpLog();
|
||||
ntcPptpLog = (NtcPptpLog) createTestData(ntcPptpLog);
|
||||
ntcPptpLog.setId(42L);
|
||||
ntcPptpLog.setCfgId(4533L);
|
||||
ntcPptpLog.setServiceType(134);
|
||||
ntcPptpLog.setUserRegion("5533");
|
||||
ntcPptpLog.setTunnelType(2);
|
||||
ntcPptpLog.setEncryptMode(6);
|
||||
|
||||
|
||||
|
||||
ntcPptpLogs.add(ntcPptpLog);
|
||||
|
||||
|
||||
page.setCount(ntcPptpLogs.size());
|
||||
page.setList(ntcPptpLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* L2TP 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcL2tpLog> findNtcL2tpLogPage(Page<NtcL2tpLog> page, NtcL2tpLog entity) throws Exception {
|
||||
|
||||
List<NtcL2tpLog> ntcL2tpLogs = Lists.newArrayList();
|
||||
|
||||
NtcL2tpLog ntcL2tpLog = new NtcL2tpLog();
|
||||
ntcL2tpLog = (NtcL2tpLog) createTestData(ntcL2tpLog);
|
||||
ntcL2tpLog.setId(43L);
|
||||
ntcL2tpLog.setCfgId(6532L);
|
||||
ntcL2tpLog.setServiceType(23);
|
||||
ntcL2tpLog.setUserRegion("6532");
|
||||
ntcL2tpLog.setTunnelType(1);
|
||||
ntcL2tpLog.setEncryptMode(1);
|
||||
|
||||
|
||||
|
||||
ntcL2tpLogs.add(ntcL2tpLog);
|
||||
ntcL2tpLog = new NtcL2tpLog();
|
||||
ntcL2tpLog = (NtcL2tpLog) createTestData(ntcL2tpLog);
|
||||
ntcL2tpLog.setId(44L);
|
||||
ntcL2tpLog.setCfgId(6533L);
|
||||
ntcL2tpLog.setServiceType(135);
|
||||
ntcL2tpLog.setUserRegion("6533");
|
||||
ntcL2tpLog.setTunnelType(2);
|
||||
ntcL2tpLog.setEncryptMode(2);
|
||||
|
||||
|
||||
|
||||
ntcL2tpLogs.add(ntcL2tpLog);
|
||||
|
||||
|
||||
page.setCount(ntcL2tpLogs.size());
|
||||
page.setList(ntcL2tpLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
*OPENVPN 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcOpenvpnLog> findNtcOpenvpnLogPage(Page<NtcOpenvpnLog> page, NtcOpenvpnLog entity) throws Exception {
|
||||
|
||||
List<NtcOpenvpnLog> ntcOpenvpnLogs = Lists.newArrayList();
|
||||
|
||||
NtcOpenvpnLog ntcOpenvpnLog = new NtcOpenvpnLog();
|
||||
ntcOpenvpnLog = (NtcOpenvpnLog) createTestData(ntcOpenvpnLog);
|
||||
ntcOpenvpnLog.setId(45L);
|
||||
ntcOpenvpnLog.setCfgId(6532L);
|
||||
ntcOpenvpnLog.setServiceType(24);
|
||||
ntcOpenvpnLog.setUserRegion("6532");
|
||||
ntcOpenvpnLog.setVersion("版本1");
|
||||
ntcOpenvpnLog.setEncryptMode("AES");
|
||||
ntcOpenvpnLog.setHmac(1);
|
||||
ntcOpenvpnLog.setTunnelType(1);
|
||||
|
||||
|
||||
|
||||
ntcOpenvpnLogs.add(ntcOpenvpnLog);
|
||||
|
||||
|
||||
ntcOpenvpnLog = new NtcOpenvpnLog();
|
||||
ntcOpenvpnLog = (NtcOpenvpnLog) createTestData(ntcOpenvpnLog);
|
||||
ntcOpenvpnLog.setId(46L);
|
||||
ntcOpenvpnLog.setCfgId(4533L);
|
||||
ntcOpenvpnLog.setServiceType(136);
|
||||
ntcOpenvpnLog.setUserRegion("6533");
|
||||
ntcOpenvpnLog.setVersion("版本1");
|
||||
ntcOpenvpnLog.setEncryptMode("MD5");
|
||||
ntcOpenvpnLog.setHmac(1);
|
||||
ntcOpenvpnLog.setTunnelType(2);
|
||||
|
||||
|
||||
|
||||
ntcOpenvpnLogs.add(ntcOpenvpnLog);
|
||||
|
||||
|
||||
page.setCount(ntcOpenvpnLogs.size());
|
||||
page.setList(ntcOpenvpnLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IPSEC 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcIpsecLog> findNtcIpsecLogPage(Page<NtcIpsecLog> page, NtcIpsecLog entity) throws Exception {
|
||||
|
||||
List<NtcIpsecLog> ntcIpsecLogs = Lists.newArrayList();
|
||||
|
||||
NtcIpsecLog ntcIpsecLog = new NtcIpsecLog();
|
||||
ntcIpsecLog = (NtcIpsecLog) createTestData(ntcIpsecLog);
|
||||
ntcIpsecLog.setId(47L);
|
||||
ntcIpsecLog.setCfgId(7532L);
|
||||
ntcIpsecLog.setServiceType(137);
|
||||
ntcIpsecLog.setUserRegion("7532");
|
||||
ntcIpsecLog.setExProtocol(1);
|
||||
ntcIpsecLog.setIsakmpMode(1);
|
||||
|
||||
ntcIpsecLogs.add(ntcIpsecLog);
|
||||
|
||||
|
||||
ntcIpsecLog = new NtcIpsecLog();
|
||||
ntcIpsecLog = (NtcIpsecLog) createTestData(ntcIpsecLog);
|
||||
|
||||
ntcIpsecLog.setId(48L);
|
||||
ntcIpsecLog.setCfgId(7533L);
|
||||
ntcIpsecLog.setServiceType(137);
|
||||
ntcIpsecLog.setUserRegion("7533");
|
||||
ntcIpsecLog.setExProtocol(2);
|
||||
ntcIpsecLog.setIsakmpMode(2);
|
||||
|
||||
|
||||
|
||||
|
||||
ntcIpsecLogs.add(ntcIpsecLog);
|
||||
|
||||
|
||||
page.setCount(ntcIpsecLogs.size());
|
||||
page.setList(ntcIpsecLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* SSH 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcSshLog> findNtcSshLogPage(Page<NtcSshLog> page, NtcSshLog entity) throws Exception {
|
||||
|
||||
List<NtcSshLog> ntcSshLogs = Lists.newArrayList();
|
||||
|
||||
NtcSshLog ntcSshLog = new NtcSshLog();
|
||||
ntcSshLog = (NtcSshLog) createTestData(ntcSshLog);
|
||||
ntcSshLog.setId(49L);
|
||||
ntcSshLog.setCfgId(8532L);
|
||||
ntcSshLog.setServiceType(26);
|
||||
ntcSshLog.setUserRegion("8532");
|
||||
ntcSshLog.setVersion("版本2");
|
||||
ntcSshLog.setHostKey("*&SDAEAS");
|
||||
ntcSshLog.setHostCookie("87we8wewe888888");
|
||||
ntcSshLog.setEncryptMode("SHA-1");
|
||||
ntcSshLog.setMac("CRC");
|
||||
ntcSshLog.setTunnelType(1);
|
||||
|
||||
|
||||
ntcSshLogs.add(ntcSshLog);
|
||||
|
||||
|
||||
ntcSshLog = new NtcSshLog();
|
||||
ntcSshLog = (NtcSshLog) createTestData(ntcSshLog);
|
||||
ntcSshLog.setId(50L);
|
||||
ntcSshLog.setCfgId(8533L);
|
||||
ntcSshLog.setServiceType(138);
|
||||
ntcSshLog.setUserRegion("8533");
|
||||
ntcSshLog.setVersion("版本2");
|
||||
ntcSshLog.setHostKey("*&SDAEAS111");
|
||||
ntcSshLog.setHostCookie("87we8wewe88228888");
|
||||
ntcSshLog.setEncryptMode("SHA-1");
|
||||
ntcSshLog.setMac("CRC");
|
||||
ntcSshLog.setTunnelType(2);
|
||||
|
||||
|
||||
ntcSshLogs.add(ntcSshLog);
|
||||
|
||||
page.setCount(ntcSshLogs.size());
|
||||
page.setList(ntcSshLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* FTP 日志检索测试方法
|
||||
* @param page
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Page<NtcFtpLog> findNtcFtpLogPage(Page<NtcFtpLog> page, NtcFtpLog entity) throws Exception {
|
||||
|
||||
List<NtcFtpLog> ntcFtpLogs = Lists.newArrayList();
|
||||
|
||||
NtcFtpLog ntcFtpLog = new NtcFtpLog();
|
||||
ntcFtpLog = (NtcFtpLog) createTestData(ntcFtpLog);
|
||||
ntcFtpLog.setId(51L);
|
||||
ntcFtpLog.setCfgId(9532L);
|
||||
ntcFtpLog.setServiceType(21);
|
||||
ntcFtpLog.setUserRegion(" 9532");
|
||||
ntcFtpLog.setFtpUrl("ftp://127.0.0.1/a/b/c.txt");
|
||||
ntcFtpLog.setFtpContent("我能解附件内容");
|
||||
|
||||
|
||||
|
||||
ntcFtpLogs.add(ntcFtpLog);
|
||||
|
||||
|
||||
ntcFtpLog = new NtcFtpLog();
|
||||
ntcFtpLog = (NtcFtpLog) createTestData(ntcFtpLog);
|
||||
ntcFtpLog.setId(52L);
|
||||
ntcFtpLog.setCfgId(9533L);
|
||||
ntcFtpLog.setServiceType(133);
|
||||
ntcFtpLog.setUserRegion("9533");
|
||||
ntcFtpLog.setFtpUrl("ftp://127.0.0.1/a/b/d.txt");
|
||||
ntcFtpLog.setFtpContent("我能解附件内容");
|
||||
|
||||
ntcFtpLogs.add(ntcFtpLog);
|
||||
|
||||
page.setCount(ntcFtpLogs.size());
|
||||
page.setList(ntcFtpLogs);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Object createTestData(LogEntity logEntity) {
|
||||
logEntity.setProtocol("IPv4_TCP");
|
||||
logEntity.setFoundTime(new Date());
|
||||
logEntity.setRecvTime(new Date());
|
||||
logEntity.setAddrType(4);
|
||||
logEntity.setClientIp("192.168.10.106");
|
||||
logEntity.setClientPort(80);
|
||||
logEntity.setServerIp("202.106.0.20");
|
||||
logEntity.setServerPort(8443);
|
||||
logEntity.setCljIp("10.0.6.240");
|
||||
logEntity.setDeviceId(1356981);
|
||||
logEntity.setDirection(0);
|
||||
logEntity.setStreamType(0);
|
||||
logEntity.setEntranceId(21L);
|
||||
logEntity.setClientLocate("本地地址");
|
||||
logEntity.setServerLocate("中国 北京 电信宽带光纤");
|
||||
|
||||
return logEntity;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user