fix(log):日志检索模块,增加SSL、IPSEC、FTP、SSH所有服务接口,删除历史无用接口。
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.nis.web.controller.restful;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.NtcIpLog;
|
||||
import com.nis.domain.restful.*;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseRestController;
|
||||
import com.nis.web.service.SaveRequestLogThread;
|
||||
@@ -49,10 +49,209 @@ public class LogController extends BaseRestController{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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 分页对象
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
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.DfIpPortLog;
|
||||
import com.nis.domain.restful.NtcIpLog;
|
||||
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;
|
||||
@@ -83,6 +84,512 @@ public class LogTestService extends BaseLogService {
|
||||
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