1、对照库表结构修改公共日志类属性;
2、编译配置中user_region可为空,去掉不能为空的验证; 3、获取maat类型对应的表名bug修正; 4、maat配置分发到阀门;
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* @Title: LogEntity.java
|
* @Title: LogEntity.java
|
||||||
* @Package com.nis.domain
|
* @Package com.nis.domain
|
||||||
* @Description: TODO(用一句话描述该文件做什么)
|
* @Description: TODO(用一句话描述该文件做什么)
|
||||||
* @author (darnell)
|
* @author (darnell)
|
||||||
* @date 2016年9月1日 上午10:16:54
|
* @date 2016年9月1日 上午10:16:54
|
||||||
* @version V1.0
|
* @version V1.0
|
||||||
*/
|
*/
|
||||||
package com.nis.domain;
|
package com.nis.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -26,70 +26,60 @@ import com.nis.util.JsonDateSerializer;
|
|||||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: LogEntity
|
* @ClassName: LogEntity
|
||||||
* @Description: TODO(日志公共实体部分)
|
* @Description: TODO(日志公共实体部分)
|
||||||
* @author (darnell)
|
* @author (darnell)
|
||||||
* @date 2016年9月1日 上午10:16:54
|
* @date 2016年9月1日 上午10:16:54
|
||||||
* @version V1.0
|
* @version V1.0
|
||||||
*/
|
*/
|
||||||
public abstract class LogEntity<T> implements Serializable {
|
public abstract class LogEntity<T> implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
|
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value="日志编号", required=true)
|
@ApiModelProperty(value = "日志编号", required = true)
|
||||||
protected Long id;
|
protected Long id;
|
||||||
|
|
||||||
@ApiModelProperty(value="配置ID", required=true)
|
@ApiModelProperty(value = "配置ID", required = true)
|
||||||
protected Long cfgId;
|
protected Long cfgId;
|
||||||
@ApiModelProperty(value="发现时间", required=true)
|
@ApiModelProperty(value = "发现时间", required = true)
|
||||||
protected Date foundTime;
|
protected Date foundTime;
|
||||||
@ApiModelProperty(value="接收时间", required=true)
|
@ApiModelProperty(value = "接收时间", required = true)
|
||||||
protected Date recvTime;
|
protected Date recvTime;
|
||||||
@ApiModelProperty(value="协议类型", required=true)
|
@ApiModelProperty(value = "协议类型", required = true)
|
||||||
protected String protocol;
|
protected String transProto;
|
||||||
@ApiModelProperty(value="IP地址类型", required=true)
|
@ApiModelProperty(value = "IP地址类型", required = true)
|
||||||
protected Integer addrType;
|
protected Integer addrType;
|
||||||
@ApiModelProperty(value="服务端ip地址", required=true)
|
@ApiModelProperty(value = "服务端ip地址", required = true)
|
||||||
protected String serverIp;
|
protected String dIp;
|
||||||
@ApiModelProperty(value="客户端ip地址", required=true)
|
@ApiModelProperty(value = "客户端ip地址", required = true)
|
||||||
protected String clientIp;
|
protected String sIp;
|
||||||
@ApiModelProperty(value="服务端端口", required=true)
|
@ApiModelProperty(value = "服务端端口", required = true)
|
||||||
protected Integer serverPort;
|
protected String dPort;
|
||||||
@ApiModelProperty(value="客户端端口", required=true)
|
@ApiModelProperty(value = "客户端端口", required = true)
|
||||||
protected Integer clientPort;
|
protected String sPort;
|
||||||
@ApiModelProperty(value="业务类型", required=true)
|
@ApiModelProperty(value = "业务类型", required = true)
|
||||||
protected Integer serviceType;
|
protected Integer service;
|
||||||
@ApiModelProperty(value="串联设备编号", required=true)
|
@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;
|
protected Long entranceId;
|
||||||
@ApiModelProperty(value="处理机IP", required=true)
|
@ApiModelProperty(value = "串联设备编号", required = true)
|
||||||
protected String cljIp;
|
protected Integer deviceId;
|
||||||
|
@ApiModelProperty(value = "传输方向", required = true, notes = "0:域内->域外,1:域外->域内,描述的是CLIENT_IP信息")
|
||||||
@ApiModelProperty(value="用户嵌套地址列表", required=true)
|
protected Integer direction;
|
||||||
protected String nestAddrList;
|
@ApiModelProperty(value = "流类型", required = true, notes = "0:c2s,1:s2c;2;double")
|
||||||
|
protected Integer streamDir;
|
||||||
@ApiModelProperty(value="用户自定义域", required=true)
|
@ApiModelProperty(value = "处理机IP", required = true)
|
||||||
|
protected String capIp;
|
||||||
|
@ApiModelProperty(value = "嵌套地址列表", required = true)
|
||||||
|
protected String addrList;
|
||||||
|
@ApiModelProperty(value = "用户自定义域", required = true)
|
||||||
private String userRegion;
|
private String userRegion;
|
||||||
|
|
||||||
@ApiModelProperty(value="服务端地址定位信息", required=true)
|
|
||||||
protected String serverLocate;
|
|
||||||
@ApiModelProperty(value="客户端地址定位信息", required=true)
|
|
||||||
protected String clientLocate;
|
|
||||||
|
|
||||||
|
|
||||||
protected Long foundTimeCluster;
|
protected Long foundTimeCluster;
|
||||||
protected Long recvTimeCluster;
|
protected Long recvTimeCluster;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected String searchCfgId;
|
protected String searchCfgId;
|
||||||
protected String searchFoundStartTime;
|
protected String searchFoundStartTime;
|
||||||
protected String searchFoundEndTime;
|
protected String searchFoundEndTime;
|
||||||
@@ -103,18 +93,20 @@ public abstract class LogEntity<T> implements Serializable {
|
|||||||
protected String searchEntranceId;
|
protected String searchEntranceId;
|
||||||
protected String searchCljIp;
|
protected String searchCljIp;
|
||||||
|
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public Long getFoundTimeCluster() {
|
public Long getFoundTimeCluster() {
|
||||||
return foundTimeCluster;
|
return foundTimeCluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public Long getRecvTimeCluster() {
|
public Long getRecvTimeCluster() {
|
||||||
return recvTimeCluster;
|
return recvTimeCluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFoundTimeCluster(Long foundTimeCluster) {
|
public void setFoundTimeCluster(Long foundTimeCluster) {
|
||||||
this.foundTimeCluster = foundTimeCluster;
|
this.foundTimeCluster = foundTimeCluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRecvTimeCluster(Long recvTimeCluster) {
|
public void setRecvTimeCluster(Long recvTimeCluster) {
|
||||||
this.recvTimeCluster = recvTimeCluster;
|
this.recvTimeCluster = recvTimeCluster;
|
||||||
}
|
}
|
||||||
@@ -123,13 +115,16 @@ public abstract class LogEntity<T> implements Serializable {
|
|||||||
public Long getSearchFoundStartTimeCluster() {
|
public Long getSearchFoundStartTimeCluster() {
|
||||||
return searchFoundStartTimeCluster;
|
return searchFoundStartTimeCluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSearchFoundStartTimeCluster(Long searchFoundStartTimeCluster) {
|
public void setSearchFoundStartTimeCluster(Long searchFoundStartTimeCluster) {
|
||||||
this.searchFoundStartTimeCluster = searchFoundStartTimeCluster;
|
this.searchFoundStartTimeCluster = searchFoundStartTimeCluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public Long getSearchFoundEndTimeCluster() {
|
public Long getSearchFoundEndTimeCluster() {
|
||||||
return searchFoundEndTimeCluster;
|
return searchFoundEndTimeCluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSearchFoundEndTimeCluster(Long searchFoundEndTimeCluster) {
|
public void setSearchFoundEndTimeCluster(Long searchFoundEndTimeCluster) {
|
||||||
this.searchFoundEndTimeCluster = searchFoundEndTimeCluster;
|
this.searchFoundEndTimeCluster = searchFoundEndTimeCluster;
|
||||||
}
|
}
|
||||||
@@ -145,297 +140,173 @@ public abstract class LogEntity<T> implements Serializable {
|
|||||||
protected Map<String, String> sqlMap;
|
protected Map<String, String> sqlMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title:
|
* @Title:
|
||||||
* @Description: TODO
|
* @Description: TODO
|
||||||
* @param
|
* @param
|
||||||
*/
|
*/
|
||||||
public LogEntity() {
|
public LogEntity() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return id
|
* @return id
|
||||||
*/
|
*/
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param id 要设置的 id
|
* @param id
|
||||||
*/
|
* 要设置的 id
|
||||||
|
*/
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return cfgId
|
* @return cfgId
|
||||||
*/
|
*/
|
||||||
public Long getCfgId() {
|
public Long getCfgId() {
|
||||||
return cfgId;
|
return cfgId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param cfgId 要设置的 cfgId
|
* @param cfgId
|
||||||
*/
|
* 要设置的 cfgId
|
||||||
|
*/
|
||||||
public void setCfgId(Long cfgId) {
|
public void setCfgId(Long cfgId) {
|
||||||
this.cfgId = cfgId;
|
this.cfgId = cfgId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return foundTime
|
* @return foundTime
|
||||||
*/
|
*/
|
||||||
@JsonSerialize(using=JsonDateSerializer.class)
|
@JsonSerialize(using = JsonDateSerializer.class)
|
||||||
public Date getFoundTime() {
|
public Date getFoundTime() {
|
||||||
if(foundTime ==null && this.foundTimeCluster != null){
|
if (foundTime == null && this.foundTimeCluster != null) {
|
||||||
foundTime=new Date(this.foundTimeCluster*1000);
|
foundTime = new Date(this.foundTimeCluster * 1000);
|
||||||
}
|
}
|
||||||
return foundTime;
|
return foundTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param foundTime 要设置的 foundTime
|
* @param foundTime
|
||||||
*/
|
* 要设置的 foundTime
|
||||||
|
*/
|
||||||
public void setFoundTime(Date foundTime) {
|
public void setFoundTime(Date foundTime) {
|
||||||
this.foundTime = foundTime;
|
this.foundTime = foundTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return recvTime
|
* @return recvTime
|
||||||
*/
|
*/
|
||||||
@JsonSerialize(using=JsonDateSerializer.class)
|
@JsonSerialize(using = JsonDateSerializer.class)
|
||||||
public Date getRecvTime() {
|
public Date getRecvTime() {
|
||||||
if(recvTime ==null && this.recvTimeCluster != null){
|
if (recvTime == null && this.recvTimeCluster != null) {
|
||||||
recvTime=new Date(this.recvTimeCluster*1000);
|
recvTime = new Date(this.recvTimeCluster * 1000);
|
||||||
}
|
}
|
||||||
return recvTime;
|
return recvTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param recvTime 要设置的 recvTime
|
* @param recvTime
|
||||||
*/
|
* 要设置的 recvTime
|
||||||
|
*/
|
||||||
public void setRecvTime(Date recvTime) {
|
public void setRecvTime(Date recvTime) {
|
||||||
this.recvTime = recvTime;
|
this.recvTime = recvTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return protocol
|
* @return entranceId
|
||||||
*/
|
*/
|
||||||
public String getProtocol() {
|
|
||||||
return protocol;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param protocol 要设置的 protocol
|
|
||||||
*/
|
|
||||||
public void setProtocol(String protocol) {
|
|
||||||
this.protocol = protocol;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return serverIp
|
|
||||||
*/
|
|
||||||
public String getServerIp() {
|
|
||||||
return serverIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param serverIp 要设置的 serverIp
|
|
||||||
*/
|
|
||||||
public void setServerIp(String serverIp) {
|
|
||||||
this.serverIp = serverIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return clientIp
|
|
||||||
*/
|
|
||||||
public String getClientIp() {
|
|
||||||
return clientIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param clientIp 要设置的 clientIp
|
|
||||||
*/
|
|
||||||
public void setClientIp(String clientIp) {
|
|
||||||
this.clientIp = clientIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return serverPort
|
|
||||||
*/
|
|
||||||
public Integer getServerPort() {
|
|
||||||
return serverPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param serverPort 要设置的 serverPort
|
|
||||||
*/
|
|
||||||
public void setServerPort(Integer serverPort) {
|
|
||||||
this.serverPort = serverPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return clientPort
|
|
||||||
*/
|
|
||||||
public Integer getClientPort() {
|
|
||||||
return clientPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param clientPort 要设置的 clientPort
|
|
||||||
*/
|
|
||||||
public void setClientPort(Integer clientPort) {
|
|
||||||
this.clientPort = clientPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return serviceType
|
|
||||||
*/
|
|
||||||
public Integer getServiceType() {
|
|
||||||
return serviceType;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param serviceType 要设置的 serviceType
|
|
||||||
*/
|
|
||||||
public void setServiceType(Integer serviceType) {
|
|
||||||
this.serviceType = serviceType;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return entranceId
|
|
||||||
*/
|
|
||||||
public Long getEntranceId() {
|
public Long getEntranceId() {
|
||||||
return entranceId;
|
return entranceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param entranceId 要设置的 entranceId
|
* @param entranceId
|
||||||
*/
|
* 要设置的 entranceId
|
||||||
|
*/
|
||||||
public void setEntranceId(Long entranceId) {
|
public void setEntranceId(Long entranceId) {
|
||||||
this.entranceId = entranceId;
|
this.entranceId = entranceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTransProto() {
|
||||||
|
return transProto;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return cljIp
|
|
||||||
*/
|
|
||||||
public String getCljIp() {
|
|
||||||
return cljIp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTransProto(String transProto) {
|
||||||
|
this.transProto = transProto;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param cljIp 要设置的 cljIp
|
|
||||||
*/
|
|
||||||
public void setCljIp(String cljIp) {
|
|
||||||
this.cljIp = cljIp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getdIp() {
|
||||||
|
return dIp;
|
||||||
|
|
||||||
public String getServerLocate() {
|
|
||||||
return serverLocate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setdIp(String dIp) {
|
||||||
|
this.dIp = dIp;
|
||||||
|
|
||||||
public void setServerLocate(String serverLocate) {
|
|
||||||
this.serverLocate = serverLocate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getsIp() {
|
||||||
|
return sIp;
|
||||||
|
|
||||||
public String getClientLocate() {
|
|
||||||
return clientLocate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setsIp(String sIp) {
|
||||||
|
this.sIp = sIp;
|
||||||
|
|
||||||
public void setClientLocate(String clientLocate) {
|
|
||||||
this.clientLocate = clientLocate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getdPort() {
|
||||||
|
return dPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setdPort(String dPort) {
|
||||||
|
this.dPort = dPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getsPort() {
|
||||||
|
return sPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setsPort(String sPort) {
|
||||||
|
this.sPort = sPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getService() {
|
||||||
|
return service;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setService(Integer service) {
|
||||||
|
this.service = service;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStreamDir() {
|
||||||
|
return streamDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreamDir(Integer streamDir) {
|
||||||
|
this.streamDir = streamDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCapIp() {
|
||||||
|
return capIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCapIp(String capIp) {
|
||||||
|
this.capIp = capIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddrList() {
|
||||||
|
return addrList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddrList(String addrList) {
|
||||||
|
this.addrList = addrList;
|
||||||
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
public Page<T> getPage() {
|
public Page<T> getPage() {
|
||||||
if (page == null){
|
if (page == null) {
|
||||||
page = new Page<T>();
|
page = new Page<T>();
|
||||||
}
|
}
|
||||||
return page;
|
return page;
|
||||||
@@ -449,7 +320,7 @@ public abstract class LogEntity<T> implements Serializable {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
public Map<String, String> getSqlMap() {
|
public Map<String, String> getSqlMap() {
|
||||||
if (sqlMap == null){
|
if (sqlMap == null) {
|
||||||
sqlMap = Maps.newHashMap();
|
sqlMap = Maps.newHashMap();
|
||||||
}
|
}
|
||||||
return sqlMap;
|
return sqlMap;
|
||||||
@@ -463,265 +334,214 @@ public abstract class LogEntity<T> implements Serializable {
|
|||||||
* 获取数据库名称
|
* 获取数据库名称
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getDbName(){
|
public String getDbName() {
|
||||||
return Configurations.getStringProperty("jdbc.type", "mysql");
|
return Configurations.getStringProperty("jdbc.type", "mysql");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (null == obj) {
|
if (null == obj) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!getClass().equals(obj.getClass())) {
|
if (!getClass().equals(obj.getClass())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LogEntity<?> that = (LogEntity<?>) obj;
|
LogEntity<?> that = (LogEntity<?>) obj;
|
||||||
return null == this.getId() ? false : this.getId().equals(that.getId());
|
return null == this.getId() ? false : this.getId().equals(that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return searchFoundStartTime
|
||||||
/**
|
*/
|
||||||
* @return searchFoundStartTime
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchFoundStartTime() {
|
public String getSearchFoundStartTime() {
|
||||||
return searchFoundStartTime;
|
return searchFoundStartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchFoundStartTime 要设置的 searchFoundStartTime
|
* @param searchFoundStartTime
|
||||||
*/
|
* 要设置的 searchFoundStartTime
|
||||||
|
*/
|
||||||
public void setSearchFoundStartTime(String searchFoundStartTime) {
|
public void setSearchFoundStartTime(String searchFoundStartTime) {
|
||||||
this.searchFoundStartTime = searchFoundStartTime;
|
this.searchFoundStartTime = searchFoundStartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchFoundEndTime
|
* @return searchFoundEndTime
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchFoundEndTime() {
|
public String getSearchFoundEndTime() {
|
||||||
return searchFoundEndTime;
|
return searchFoundEndTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchFoundEndTime 要设置的 searchFoundEndTime
|
* @param searchFoundEndTime
|
||||||
*/
|
* 要设置的 searchFoundEndTime
|
||||||
|
*/
|
||||||
public void setSearchFoundEndTime(String searchFoundEndTime) {
|
public void setSearchFoundEndTime(String searchFoundEndTime) {
|
||||||
this.searchFoundEndTime = searchFoundEndTime;
|
this.searchFoundEndTime = searchFoundEndTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchCfgId
|
* @return searchCfgId
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchCfgId() {
|
public String getSearchCfgId() {
|
||||||
return searchCfgId;
|
return searchCfgId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchCfgId 要设置的 searchCfgId
|
* @param searchCfgId
|
||||||
*/
|
* 要设置的 searchCfgId
|
||||||
|
*/
|
||||||
public void setSearchCfgId(String searchCfgId) {
|
public void setSearchCfgId(String searchCfgId) {
|
||||||
this.searchCfgId = searchCfgId;
|
this.searchCfgId = searchCfgId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchProtocol
|
* @return searchProtocol
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchProtocol() {
|
public String getSearchProtocol() {
|
||||||
return searchProtocol;
|
return searchProtocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchProtocol 要设置的 searchProtocol
|
* @param searchProtocol
|
||||||
*/
|
* 要设置的 searchProtocol
|
||||||
|
*/
|
||||||
public void setSearchProtocol(String searchProtocol) {
|
public void setSearchProtocol(String searchProtocol) {
|
||||||
this.searchProtocol = searchProtocol;
|
this.searchProtocol = searchProtocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchServerIp
|
* @return searchServerIp
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchServerIp() {
|
public String getSearchServerIp() {
|
||||||
return searchServerIp;
|
return searchServerIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchServerIp 要设置的 searchServerIp
|
* @param searchServerIp
|
||||||
*/
|
* 要设置的 searchServerIp
|
||||||
|
*/
|
||||||
public void setSearchServerIp(String searchServerIp) {
|
public void setSearchServerIp(String searchServerIp) {
|
||||||
this.searchServerIp = searchServerIp;
|
this.searchServerIp = searchServerIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchClientIp
|
* @return searchClientIp
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchClientIp() {
|
public String getSearchClientIp() {
|
||||||
return searchClientIp;
|
return searchClientIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchClientIp 要设置的 searchClientIp
|
* @param searchClientIp
|
||||||
*/
|
* 要设置的 searchClientIp
|
||||||
|
*/
|
||||||
public void setSearchClientIp(String searchClientIp) {
|
public void setSearchClientIp(String searchClientIp) {
|
||||||
this.searchClientIp = searchClientIp;
|
this.searchClientIp = searchClientIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchEntranceId
|
* @return searchEntranceId
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchEntranceId() {
|
public String getSearchEntranceId() {
|
||||||
return searchEntranceId;
|
return searchEntranceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchEntranceId 要设置的 searchEntranceId
|
* @param searchEntranceId
|
||||||
*/
|
* 要设置的 searchEntranceId
|
||||||
|
*/
|
||||||
public void setSearchEntranceId(String searchEntranceId) {
|
public void setSearchEntranceId(String searchEntranceId) {
|
||||||
this.searchEntranceId = searchEntranceId;
|
this.searchEntranceId = searchEntranceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchCljIp
|
* @return searchCljIp
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchCljIp() {
|
public String getSearchCljIp() {
|
||||||
return searchCljIp;
|
return searchCljIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchCljIp 要设置的 searchCljIp
|
* @param searchCljIp
|
||||||
*/
|
* 要设置的 searchCljIp
|
||||||
|
*/
|
||||||
|
|
||||||
public void setSearchCljIp(String searchCljIp) {
|
public void setSearchCljIp(String searchCljIp) {
|
||||||
this.searchCljIp = searchCljIp;
|
this.searchCljIp = searchCljIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return searchServiceType
|
* @return searchServiceType
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getSearchServiceType() {
|
public String getSearchServiceType() {
|
||||||
return searchServiceType;
|
return searchServiceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchServiceType 要设置的 searchServiceType
|
* @param searchServiceType
|
||||||
*/
|
* 要设置的 searchServiceType
|
||||||
|
*/
|
||||||
public void setSearchServiceType(String searchServiceType) {
|
public void setSearchServiceType(String searchServiceType) {
|
||||||
this.searchServiceType = searchServiceType;
|
this.searchServiceType = searchServiceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getAddrType() {
|
public Integer getAddrType() {
|
||||||
return addrType;
|
return addrType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAddrType(Integer addrType) {
|
public void setAddrType(Integer addrType) {
|
||||||
this.addrType = addrType;
|
this.addrType = addrType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getDeviceId() {
|
public Integer getDeviceId() {
|
||||||
return deviceId;
|
return deviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeviceId(Integer deviceId) {
|
public void setDeviceId(Integer deviceId) {
|
||||||
this.deviceId = deviceId;
|
this.deviceId = deviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getDirection() {
|
public Integer getDirection() {
|
||||||
return direction;
|
return direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDirection(Integer direction) {
|
public void setDirection(Integer direction) {
|
||||||
this.direction = direction;
|
this.direction = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getStreamType() {
|
@JsonIgnore
|
||||||
return streamType;
|
public Integer getSearchDirection() {
|
||||||
}
|
return searchDirection;
|
||||||
|
}
|
||||||
|
|
||||||
public void setStreamType(Integer streamType) {
|
public void setSearchDirection(Integer searchDirection) {
|
||||||
this.streamType = streamType;
|
this.searchDirection = searchDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNestAddrList() {
|
public String getUserRegion() {
|
||||||
return nestAddrList;
|
return userRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNestAddrList(String nestAddrList) {
|
public void setUserRegion(String userRegion) {
|
||||||
this.nestAddrList = nestAddrList;
|
this.userRegion = userRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@Override
|
||||||
public Integer getSearchDirection() {
|
public String toString() {
|
||||||
return searchDirection;
|
return ReflectionToStringBuilder.toString(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -499,9 +499,9 @@ public class CompileVal {
|
|||||||
if (null == configCompile.getEndTime()) {
|
if (null == configCompile.getEndTime()) {
|
||||||
return "id为" + compileId + "的编译配置中endTime不能为空";
|
return "id为" + compileId + "的编译配置中endTime不能为空";
|
||||||
}
|
}
|
||||||
if (null == configCompile.getUserRegion() || configCompile.getUserRegion().equals("")) {
|
// if (null == configCompile.getUserRegion() || configCompile.getUserRegion().equals("")) {
|
||||||
return "id为" + compileId + "的编译配置中userRegion不能为空";
|
// return "id为" + compileId + "的编译配置中userRegion不能为空";
|
||||||
}
|
// }
|
||||||
if (null == configCompile.getIsValid()) {
|
if (null == configCompile.getIsValid()) {
|
||||||
return "id为" + compileId + "的编译配置中isValid不能为空";
|
return "id为" + compileId + "的编译配置中isValid不能为空";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,17 @@ public class ServiceAndRDBIndexReal {
|
|||||||
* key是业务类型,value是业务类型对应的动作(action)
|
* key是业务类型,value是业务类型对应的动作(action)
|
||||||
*/
|
*/
|
||||||
private static Map<Integer, Integer> serviceActionMap = new HashMap<Integer, Integer>();
|
private static Map<Integer, Integer> serviceActionMap = new HashMap<Integer, Integer>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存maat分发到阀门需要添加到域的属性:maat2Valve
|
||||||
|
* Map<service,Map<regionType,fields>>
|
||||||
|
*/
|
||||||
|
private static Map<Integer,Map<String, String[]>> maatToValveMap = new HashMap<Integer, Map<String,String[]>>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阀门保存的redis数据库Index,在seriveTable.properties中定义
|
||||||
|
*/
|
||||||
|
private static Integer valveDBIndex = 7;
|
||||||
static {
|
static {
|
||||||
|
|
||||||
String unMaatService = Configurations.getStringProperty("unMaatService", "");
|
String unMaatService = Configurations.getStringProperty("unMaatService", "");
|
||||||
@@ -102,6 +113,31 @@ public class ServiceAndRDBIndexReal {
|
|||||||
serviceDBIndexmap.put(Integer.parseInt(serviceDBIndex[0]), redisDbList);
|
serviceDBIndexmap.put(Integer.parseInt(serviceDBIndex[0]), redisDbList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String maat2Valve = Configurations.getStringProperty("maat2Valve", "");
|
||||||
|
if (maat2Valve!=null && !maat2Valve.trim().equals("")) {
|
||||||
|
String [] maat2ValveAry= maat2Valve.split(";");
|
||||||
|
for (String maat2ValveStr : maat2ValveAry) {
|
||||||
|
String [] serviceAndRegion = maat2ValveStr.split(":");
|
||||||
|
if (serviceAndRegion!=null&&serviceAndRegion.length==2) {
|
||||||
|
String [] regionAndFields = serviceAndRegion[1].split("@");
|
||||||
|
Map<String,String[]> fieldMap = new HashMap<String, String[]>();
|
||||||
|
String [] fields = regionAndFields[1].split("&");
|
||||||
|
//同一service有不同的域类型,多个之间用“|”分隔
|
||||||
|
if (regionAndFields[0].contains("|")) {
|
||||||
|
String [] regionTypeAry = regionAndFields[0].split("|");
|
||||||
|
for (String regionType : regionTypeAry) {
|
||||||
|
fieldMap.put(regionType, fields);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
fieldMap.put(regionAndFields[0], fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
maatToValveMap.put(Integer.parseInt(serviceAndRegion[0]), fieldMap);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -135,13 +171,19 @@ public class ServiceAndRDBIndexReal {
|
|||||||
return tableList.get(0);
|
return tableList.get(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (String str : tableList) {
|
//保存tableName在表名列表中的序号
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < tableList.size(); i++) {
|
||||||
|
String str = tableList.get(i);
|
||||||
if (str.toLowerCase().contains(tableName.toLowerCase())) {
|
if (str.toLowerCase().contains(tableName.toLowerCase())) {
|
||||||
return str;
|
index = i;
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
if (index!=-1) {
|
||||||
|
return tableList.get(index);
|
||||||
|
} else {
|
||||||
logger.error("未从业务类型和表对应关系中,找到业务类型:{},配置类型:{}表名:{}对应的真实表名", service, type, tableName);
|
logger.error("未从业务类型和表对应关系中,找到业务类型:{},配置类型:{}表名:{}对应的真实表名", service, type, tableName);
|
||||||
throw new RuntimeException("未从业务类型和表对应关系中,找到业务类型:"+service+",配置类型:"+type+"表名:"+tableName+"对应的真实表名");
|
throw new RuntimeException("未从业务类型和表对应关系中,找到业务类型:"+service+",配置类型:"+type+"表名:"+tableName+"对应的真实表名");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -184,4 +226,25 @@ public class ServiceAndRDBIndexReal {
|
|||||||
ServiceAndRDBIndexReal.serviceDBIndexmap = serviceDBIndexmap;
|
ServiceAndRDBIndexReal.serviceDBIndexmap = serviceDBIndexmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Map<Integer, Map<String, String[]>> getMaatToValveMap() {
|
||||||
|
return maatToValveMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMaatToValveMap(
|
||||||
|
Map<Integer, Map<String, String[]>> maatToValveMap) {
|
||||||
|
ServiceAndRDBIndexReal.maatToValveMap = maatToValveMap;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param valveDBIndex the valveDBIndex to set
|
||||||
|
*/
|
||||||
|
public static void setValveDBIndex(Integer valveDBIndex) {
|
||||||
|
ServiceAndRDBIndexReal.valveDBIndex = valveDBIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the valveDBIndex
|
||||||
|
*/
|
||||||
|
public static Integer getValveDBIndex() {
|
||||||
|
return valveDBIndex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ import com.nis.util.CamelUnderlineUtil;
|
|||||||
import com.nis.util.CompileVal;
|
import com.nis.util.CompileVal;
|
||||||
import com.nis.util.Configurations;
|
import com.nis.util.Configurations;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
|
import com.nis.util.JsonMapper;
|
||||||
import com.nis.util.OracleErrorCodeUtil;
|
import com.nis.util.OracleErrorCodeUtil;
|
||||||
import com.nis.util.ReadCommSourceXmlUtil;
|
import com.nis.util.ReadCommSourceXmlUtil;
|
||||||
import com.nis.util.ServiceAndRDBIndexReal;
|
import com.nis.util.ServiceAndRDBIndexReal;
|
||||||
@@ -1275,6 +1276,7 @@ public class ConfigSourcesService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//调用接口入redis
|
//调用接口入redis
|
||||||
Map<Integer, List<MaatConfig>> configMap = new HashMap<Integer, List<MaatConfig>>();
|
Map<Integer, List<MaatConfig>> configMap = new HashMap<Integer, List<MaatConfig>>();
|
||||||
Iterator serviceIterator = maatMap.keySet().iterator();
|
Iterator serviceIterator = maatMap.keySet().iterator();
|
||||||
@@ -1283,13 +1285,65 @@ public class ConfigSourcesService extends BaseService {
|
|||||||
List<Integer> dbIndexList = ServiceAndRDBIndexReal.getRedisDBByService(service);
|
List<Integer> dbIndexList = ServiceAndRDBIndexReal.getRedisDBByService(service);
|
||||||
if (!StringUtil.isEmpty(dbIndexList)&&dbIndexList.size()>0) {
|
if (!StringUtil.isEmpty(dbIndexList)&&dbIndexList.size()>0) {
|
||||||
for (Integer dbIndex : dbIndexList) {
|
for (Integer dbIndex : dbIndexList) {
|
||||||
|
//分发到阀门有些业务需要添加编译属性到域配置
|
||||||
|
List<MaatConfig> newMaatConfigList = new ArrayList<MaatConfig>();
|
||||||
|
newMaatConfigList.addAll(maatMap.get(service));
|
||||||
|
if (dbIndex.intValue()==ServiceAndRDBIndexReal.getValveDBIndex().intValue()) {
|
||||||
|
Map<Integer, Map<String, String []>> maatToValueMap = ServiceAndRDBIndexReal.getMaatToValveMap();
|
||||||
|
if (maatToValueMap.containsKey(service)) {
|
||||||
|
|
||||||
|
Map<String, String[]> regionAndFiledMap = maatToValueMap.get(service);
|
||||||
|
//for (MaatConfig maatConfig : newMaatConfigList) {
|
||||||
|
for (int i = 0; i <newMaatConfigList.size(); i++) {
|
||||||
|
MaatConfig maatConfig = newMaatConfigList.get(i);
|
||||||
|
MaatConfig newMaatConfig = (MaatConfig) JsonMapper.fromJsonString(JsonMapper.toJsonString(maatConfig), MaatConfig.class);
|
||||||
|
Iterator iterator = regionAndFiledMap.keySet().iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
String regionName = iterator.next().toString();
|
||||||
|
PropertyDescriptor pd;
|
||||||
|
try {
|
||||||
|
pd = new PropertyDescriptor(regionName+"MapList", MaatConfig.class);
|
||||||
|
Method method = pd.getReadMethod();
|
||||||
|
Object object = method.invoke(newMaatConfig);
|
||||||
|
|
||||||
|
if (object!=null) {
|
||||||
|
|
||||||
|
List<Map<String, String>> listMaps =new ArrayList<Map<String,String>>();
|
||||||
|
listMaps.addAll((List<Map<String, String>>) object);
|
||||||
|
String [] fields = regionAndFiledMap.get(regionName);
|
||||||
|
for (String fieldName : fields) {
|
||||||
|
fieldName = CamelUnderlineUtil.underlineToCamel(fieldName.toLowerCase());
|
||||||
|
String value = newMaatConfig.getCompileMap().get(fieldName);
|
||||||
|
if (!StringUtil.isEmpty(value)) {
|
||||||
|
for (Map<String, String> map: listMaps) {
|
||||||
|
map.put(fieldName, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
method = pd.getWriteMethod();
|
||||||
|
method.invoke(newMaatConfig, listMaps);
|
||||||
|
}
|
||||||
|
newMaatConfigList.set(i, newMaatConfig);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e = new RuntimeException("未找到域列表,请检查域类型是否正确!");
|
||||||
|
msgList.add(e);
|
||||||
|
return "error";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (configMap.containsKey(dbIndex)) {
|
if (configMap.containsKey(dbIndex)) {
|
||||||
configMap.get(dbIndex).addAll(maatMap.get(service));
|
configMap.get(dbIndex).addAll(newMaatConfigList);
|
||||||
}else{
|
}else{
|
||||||
List<MaatConfig> list = new ArrayList<MaatConfig>();
|
List<MaatConfig> list = new ArrayList<MaatConfig>();
|
||||||
list.addAll(maatMap.get(service));
|
list.addAll(newMaatConfigList);
|
||||||
configMap.put(dbIndex, list);
|
configMap.put(dbIndex, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
RuntimeException e = new RuntimeException("service与写入数据库序号映射关系不存在");
|
RuntimeException e = new RuntimeException("service与写入数据库序号映射关系不存在");
|
||||||
|
|||||||
@@ -48,45 +48,41 @@ public class LogTestService extends BaseLogService {
|
|||||||
NtcIpLog ntcIpLog = new NtcIpLog();
|
NtcIpLog ntcIpLog = new NtcIpLog();
|
||||||
ntcIpLog.setId(35L);
|
ntcIpLog.setId(35L);
|
||||||
ntcIpLog.setCfgId(531L);
|
ntcIpLog.setCfgId(531L);
|
||||||
ntcIpLog.setServiceType(16);
|
ntcIpLog.setService(16);
|
||||||
ntcIpLog.setFoundTime(new Date());
|
ntcIpLog.setFoundTime(new Date());
|
||||||
ntcIpLog.setRecvTime(new Date());
|
ntcIpLog.setRecvTime(new Date());
|
||||||
ntcIpLog.setAddrType(4);
|
ntcIpLog.setAddrType(4);
|
||||||
ntcIpLog.setProtocol("IPv4_TCP");
|
ntcIpLog.setTransProto("IPv4_TCP");
|
||||||
ntcIpLog.setClientIp("192.168.10.106");
|
ntcIpLog.setsIp("192.168.10.106");
|
||||||
ntcIpLog.setClientPort(80);
|
ntcIpLog.setsPort("80");
|
||||||
ntcIpLog.setServerIp("202.106.0.20");
|
ntcIpLog.setdIp("202.106.0.20");
|
||||||
ntcIpLog.setServerPort(8443);
|
ntcIpLog.setdPort("8443");
|
||||||
ntcIpLog.setCljIp("10.0.6.240");
|
ntcIpLog.setCapIp("10.0.6.240");
|
||||||
ntcIpLog.setDeviceId(1356981);
|
ntcIpLog.setDeviceId(1356981);
|
||||||
ntcIpLog.setDirection(0);
|
ntcIpLog.setDirection(0);
|
||||||
ntcIpLog.setStreamType(0);
|
ntcIpLog.setStreamDir(0);
|
||||||
ntcIpLog.setEntranceId(21L);
|
ntcIpLog.setEntranceId(21L);
|
||||||
ntcIpLog.setUserRegion("531");
|
ntcIpLog.setUserRegion("531");
|
||||||
ntcIpLog.setClientLocate("本地地址");
|
|
||||||
ntcIpLog.setServerLocate("中国 北京 电信宽带光纤");
|
|
||||||
ntcIpLogs.add(ntcIpLog);
|
ntcIpLogs.add(ntcIpLog);
|
||||||
|
|
||||||
ntcIpLog = new NtcIpLog();
|
ntcIpLog = new NtcIpLog();
|
||||||
ntcIpLog.setId(36L);
|
ntcIpLog.setId(36L);
|
||||||
ntcIpLog.setCfgId(532L);
|
ntcIpLog.setCfgId(532L);
|
||||||
ntcIpLog.setServiceType(128);
|
ntcIpLog.setService(128);
|
||||||
ntcIpLog.setFoundTime(new Date());
|
ntcIpLog.setFoundTime(new Date());
|
||||||
ntcIpLog.setRecvTime(new Date());
|
ntcIpLog.setRecvTime(new Date());
|
||||||
ntcIpLog.setAddrType(4);
|
ntcIpLog.setAddrType(4);
|
||||||
ntcIpLog.setProtocol("IPv4_TCP");
|
ntcIpLog.setTransProto("IPv4_TCP");
|
||||||
ntcIpLog.setClientIp("192.168.10.106");
|
ntcIpLog.setsIp("192.168.10.106");
|
||||||
ntcIpLog.setClientPort(80);
|
ntcIpLog.setsPort("80");
|
||||||
ntcIpLog.setServerIp("202.106.0.20");
|
ntcIpLog.setdIp("202.106.0.20");
|
||||||
ntcIpLog.setServerPort(8443);
|
ntcIpLog.setdPort("8443");
|
||||||
ntcIpLog.setCljIp("10.0.6.240");
|
ntcIpLog.setCapIp("10.0.6.240");
|
||||||
ntcIpLog.setDeviceId(1356981);
|
ntcIpLog.setDeviceId(1356981);
|
||||||
ntcIpLog.setDirection(0);
|
ntcIpLog.setDirection(0);
|
||||||
ntcIpLog.setStreamType(0);
|
ntcIpLog.setStreamDir(0);
|
||||||
ntcIpLog.setEntranceId(21L);
|
ntcIpLog.setEntranceId(21L);
|
||||||
ntcIpLog.setUserRegion("531");
|
ntcIpLog.setUserRegion("531");
|
||||||
ntcIpLog.setClientLocate("本地地址");
|
|
||||||
ntcIpLog.setServerLocate("中国 北京 电信宽带光纤");
|
|
||||||
ntcIpLogs.add(ntcIpLog);
|
ntcIpLogs.add(ntcIpLog);
|
||||||
page.setCount(ntcIpLogs.size());
|
page.setCount(ntcIpLogs.size());
|
||||||
|
|
||||||
@@ -111,7 +107,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcHttpLog = (NtcHttpLog) createTestData(ntcHttpLog);
|
ntcHttpLog = (NtcHttpLog) createTestData(ntcHttpLog);
|
||||||
ntcHttpLog.setId(35L);
|
ntcHttpLog.setId(35L);
|
||||||
ntcHttpLog.setCfgId(1532L);
|
ntcHttpLog.setCfgId(1532L);
|
||||||
ntcHttpLog.setServiceType(17);
|
ntcHttpLog.setService(17);
|
||||||
ntcHttpLog.setUserRegion("1532");
|
ntcHttpLog.setUserRegion("1532");
|
||||||
ntcHttpLog.setUrl("http://jd.com/get/api/json");
|
ntcHttpLog.setUrl("http://jd.com/get/api/json");
|
||||||
ntcHttpLog.setReqHdrFile("reqHdrFile1532.txt");
|
ntcHttpLog.setReqHdrFile("reqHdrFile1532.txt");
|
||||||
@@ -125,7 +121,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcHttpLog = (NtcHttpLog) createTestData(ntcHttpLog);
|
ntcHttpLog = (NtcHttpLog) createTestData(ntcHttpLog);
|
||||||
ntcHttpLog.setId(36L);
|
ntcHttpLog.setId(36L);
|
||||||
ntcHttpLog.setCfgId(1533L);
|
ntcHttpLog.setCfgId(1533L);
|
||||||
ntcHttpLog.setServiceType(129);
|
ntcHttpLog.setService(129);
|
||||||
ntcHttpLog.setUserRegion("1533");
|
ntcHttpLog.setUserRegion("1533");
|
||||||
ntcHttpLog.setUrl("http://jd.com/get/api/json/abc");
|
ntcHttpLog.setUrl("http://jd.com/get/api/json/abc");
|
||||||
ntcHttpLog.setReqHdrFile("reqHdrFile1533.txt");
|
ntcHttpLog.setReqHdrFile("reqHdrFile1533.txt");
|
||||||
@@ -156,7 +152,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcDnsLog = (NtcDnsLog) createTestData(ntcDnsLog);
|
ntcDnsLog = (NtcDnsLog) createTestData(ntcDnsLog);
|
||||||
ntcDnsLog.setId(37L);
|
ntcDnsLog.setId(37L);
|
||||||
ntcDnsLog.setCfgId(2532L);
|
ntcDnsLog.setCfgId(2532L);
|
||||||
ntcDnsLog.setServiceType(18);
|
ntcDnsLog.setService(18);
|
||||||
ntcDnsLog.setUserRegion("2532");
|
ntcDnsLog.setUserRegion("2532");
|
||||||
ntcDnsLog.setQr(0);
|
ntcDnsLog.setQr(0);
|
||||||
ntcDnsLog.setRd(1);
|
ntcDnsLog.setRd(1);
|
||||||
@@ -176,7 +172,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcDnsLog = (NtcDnsLog) createTestData(ntcDnsLog);
|
ntcDnsLog = (NtcDnsLog) createTestData(ntcDnsLog);
|
||||||
ntcDnsLog.setId(38L);
|
ntcDnsLog.setId(38L);
|
||||||
ntcDnsLog.setCfgId(2533L);
|
ntcDnsLog.setCfgId(2533L);
|
||||||
ntcDnsLog.setServiceType(130);
|
ntcDnsLog.setService(130);
|
||||||
ntcDnsLog.setUserRegion("2533");
|
ntcDnsLog.setUserRegion("2533");
|
||||||
ntcDnsLog.setQr(1);
|
ntcDnsLog.setQr(1);
|
||||||
ntcDnsLog.setRd(1);
|
ntcDnsLog.setRd(1);
|
||||||
@@ -213,7 +209,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcSslLog = (NtcSslLog) createTestData(ntcSslLog);
|
ntcSslLog = (NtcSslLog) createTestData(ntcSslLog);
|
||||||
ntcSslLog.setId(39L);
|
ntcSslLog.setId(39L);
|
||||||
ntcSslLog.setCfgId(4532L);
|
ntcSslLog.setCfgId(4532L);
|
||||||
ntcSslLog.setServiceType(19);
|
ntcSslLog.setService(19);
|
||||||
ntcSslLog.setUserRegion("4532");
|
ntcSslLog.setUserRegion("4532");
|
||||||
ntcSslLog.setVersion("版本 3");
|
ntcSslLog.setVersion("版本 3");
|
||||||
ntcSslLog.setSni("*.cnblogs.cn");
|
ntcSslLog.setSni("*.cnblogs.cn");
|
||||||
@@ -228,7 +224,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcSslLog = (NtcSslLog) createTestData(ntcSslLog);
|
ntcSslLog = (NtcSslLog) createTestData(ntcSslLog);
|
||||||
ntcSslLog.setId(40L);
|
ntcSslLog.setId(40L);
|
||||||
ntcSslLog.setCfgId(4533L);
|
ntcSslLog.setCfgId(4533L);
|
||||||
ntcSslLog.setServiceType(131);
|
ntcSslLog.setService(131);
|
||||||
ntcSslLog.setUserRegion("4533");
|
ntcSslLog.setUserRegion("4533");
|
||||||
ntcSslLog.setVersion("版本 3");
|
ntcSslLog.setVersion("版本 3");
|
||||||
ntcSslLog.setSni("*.cnblogs.cn");
|
ntcSslLog.setSni("*.cnblogs.cn");
|
||||||
@@ -261,7 +257,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcMailLog = (NtcMailLog) createTestData(ntcMailLog);
|
ntcMailLog = (NtcMailLog) createTestData(ntcMailLog);
|
||||||
ntcMailLog.setId(38L);
|
ntcMailLog.setId(38L);
|
||||||
ntcMailLog.setCfgId(3532L);
|
ntcMailLog.setCfgId(3532L);
|
||||||
ntcMailLog.setServiceType(20);
|
ntcMailLog.setService(20);
|
||||||
ntcMailLog.setUserRegion("3532");
|
ntcMailLog.setUserRegion("3532");
|
||||||
ntcMailLog.setMailProto("SMTP");
|
ntcMailLog.setMailProto("SMTP");
|
||||||
ntcMailLog.setMailFrom("darnell@163.com");
|
ntcMailLog.setMailFrom("darnell@163.com");
|
||||||
@@ -275,7 +271,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcMailLog = (NtcMailLog) createTestData(ntcMailLog);
|
ntcMailLog = (NtcMailLog) createTestData(ntcMailLog);
|
||||||
ntcMailLog.setId(39L);
|
ntcMailLog.setId(39L);
|
||||||
ntcMailLog.setCfgId(3533L);
|
ntcMailLog.setCfgId(3533L);
|
||||||
ntcMailLog.setServiceType(132);
|
ntcMailLog.setService(132);
|
||||||
ntcMailLog.setUserRegion("3533");
|
ntcMailLog.setUserRegion("3533");
|
||||||
ntcMailLog.setMailProto("smtp");
|
ntcMailLog.setMailProto("smtp");
|
||||||
ntcMailLog.setMailFrom("iamfree@163.com");
|
ntcMailLog.setMailFrom("iamfree@163.com");
|
||||||
@@ -308,7 +304,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcPptpLog = (NtcPptpLog) createTestData(ntcPptpLog);
|
ntcPptpLog = (NtcPptpLog) createTestData(ntcPptpLog);
|
||||||
ntcPptpLog.setId(41L);
|
ntcPptpLog.setId(41L);
|
||||||
ntcPptpLog.setCfgId(5532L);
|
ntcPptpLog.setCfgId(5532L);
|
||||||
ntcPptpLog.setServiceType(22);
|
ntcPptpLog.setService(22);
|
||||||
ntcPptpLog.setUserRegion("5532");
|
ntcPptpLog.setUserRegion("5532");
|
||||||
ntcPptpLog.setTunnelType(1);
|
ntcPptpLog.setTunnelType(1);
|
||||||
ntcPptpLog.setEncryptMode(1);
|
ntcPptpLog.setEncryptMode(1);
|
||||||
@@ -322,7 +318,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcPptpLog = (NtcPptpLog) createTestData(ntcPptpLog);
|
ntcPptpLog = (NtcPptpLog) createTestData(ntcPptpLog);
|
||||||
ntcPptpLog.setId(42L);
|
ntcPptpLog.setId(42L);
|
||||||
ntcPptpLog.setCfgId(4533L);
|
ntcPptpLog.setCfgId(4533L);
|
||||||
ntcPptpLog.setServiceType(134);
|
ntcPptpLog.setService(134);
|
||||||
ntcPptpLog.setUserRegion("5533");
|
ntcPptpLog.setUserRegion("5533");
|
||||||
ntcPptpLog.setTunnelType(2);
|
ntcPptpLog.setTunnelType(2);
|
||||||
ntcPptpLog.setEncryptMode(6);
|
ntcPptpLog.setEncryptMode(6);
|
||||||
@@ -354,7 +350,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcL2tpLog = (NtcL2tpLog) createTestData(ntcL2tpLog);
|
ntcL2tpLog = (NtcL2tpLog) createTestData(ntcL2tpLog);
|
||||||
ntcL2tpLog.setId(43L);
|
ntcL2tpLog.setId(43L);
|
||||||
ntcL2tpLog.setCfgId(6532L);
|
ntcL2tpLog.setCfgId(6532L);
|
||||||
ntcL2tpLog.setServiceType(23);
|
ntcL2tpLog.setService(23);
|
||||||
ntcL2tpLog.setUserRegion("6532");
|
ntcL2tpLog.setUserRegion("6532");
|
||||||
ntcL2tpLog.setTunnelType(1);
|
ntcL2tpLog.setTunnelType(1);
|
||||||
ntcL2tpLog.setEncryptMode(1);
|
ntcL2tpLog.setEncryptMode(1);
|
||||||
@@ -366,7 +362,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcL2tpLog = (NtcL2tpLog) createTestData(ntcL2tpLog);
|
ntcL2tpLog = (NtcL2tpLog) createTestData(ntcL2tpLog);
|
||||||
ntcL2tpLog.setId(44L);
|
ntcL2tpLog.setId(44L);
|
||||||
ntcL2tpLog.setCfgId(6533L);
|
ntcL2tpLog.setCfgId(6533L);
|
||||||
ntcL2tpLog.setServiceType(135);
|
ntcL2tpLog.setService(135);
|
||||||
ntcL2tpLog.setUserRegion("6533");
|
ntcL2tpLog.setUserRegion("6533");
|
||||||
ntcL2tpLog.setTunnelType(2);
|
ntcL2tpLog.setTunnelType(2);
|
||||||
ntcL2tpLog.setEncryptMode(2);
|
ntcL2tpLog.setEncryptMode(2);
|
||||||
@@ -397,7 +393,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcOpenvpnLog = (NtcOpenvpnLog) createTestData(ntcOpenvpnLog);
|
ntcOpenvpnLog = (NtcOpenvpnLog) createTestData(ntcOpenvpnLog);
|
||||||
ntcOpenvpnLog.setId(45L);
|
ntcOpenvpnLog.setId(45L);
|
||||||
ntcOpenvpnLog.setCfgId(6532L);
|
ntcOpenvpnLog.setCfgId(6532L);
|
||||||
ntcOpenvpnLog.setServiceType(24);
|
ntcOpenvpnLog.setService(24);
|
||||||
ntcOpenvpnLog.setUserRegion("6532");
|
ntcOpenvpnLog.setUserRegion("6532");
|
||||||
ntcOpenvpnLog.setVersion("版本1");
|
ntcOpenvpnLog.setVersion("版本1");
|
||||||
ntcOpenvpnLog.setEncryptMode("AES");
|
ntcOpenvpnLog.setEncryptMode("AES");
|
||||||
@@ -413,7 +409,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcOpenvpnLog = (NtcOpenvpnLog) createTestData(ntcOpenvpnLog);
|
ntcOpenvpnLog = (NtcOpenvpnLog) createTestData(ntcOpenvpnLog);
|
||||||
ntcOpenvpnLog.setId(46L);
|
ntcOpenvpnLog.setId(46L);
|
||||||
ntcOpenvpnLog.setCfgId(4533L);
|
ntcOpenvpnLog.setCfgId(4533L);
|
||||||
ntcOpenvpnLog.setServiceType(136);
|
ntcOpenvpnLog.setService(136);
|
||||||
ntcOpenvpnLog.setUserRegion("6533");
|
ntcOpenvpnLog.setUserRegion("6533");
|
||||||
ntcOpenvpnLog.setVersion("版本1");
|
ntcOpenvpnLog.setVersion("版本1");
|
||||||
ntcOpenvpnLog.setEncryptMode("MD5");
|
ntcOpenvpnLog.setEncryptMode("MD5");
|
||||||
@@ -447,7 +443,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcIpsecLog = (NtcIpsecLog) createTestData(ntcIpsecLog);
|
ntcIpsecLog = (NtcIpsecLog) createTestData(ntcIpsecLog);
|
||||||
ntcIpsecLog.setId(47L);
|
ntcIpsecLog.setId(47L);
|
||||||
ntcIpsecLog.setCfgId(7532L);
|
ntcIpsecLog.setCfgId(7532L);
|
||||||
ntcIpsecLog.setServiceType(137);
|
ntcIpsecLog.setService(137);
|
||||||
ntcIpsecLog.setUserRegion("7532");
|
ntcIpsecLog.setUserRegion("7532");
|
||||||
ntcIpsecLog.setExProtocol(1);
|
ntcIpsecLog.setExProtocol(1);
|
||||||
ntcIpsecLog.setIsakmpMode(1);
|
ntcIpsecLog.setIsakmpMode(1);
|
||||||
@@ -460,7 +456,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
|
|
||||||
ntcIpsecLog.setId(48L);
|
ntcIpsecLog.setId(48L);
|
||||||
ntcIpsecLog.setCfgId(7533L);
|
ntcIpsecLog.setCfgId(7533L);
|
||||||
ntcIpsecLog.setServiceType(137);
|
ntcIpsecLog.setService(137);
|
||||||
ntcIpsecLog.setUserRegion("7533");
|
ntcIpsecLog.setUserRegion("7533");
|
||||||
ntcIpsecLog.setExProtocol(2);
|
ntcIpsecLog.setExProtocol(2);
|
||||||
ntcIpsecLog.setIsakmpMode(2);
|
ntcIpsecLog.setIsakmpMode(2);
|
||||||
@@ -492,7 +488,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcSshLog = (NtcSshLog) createTestData(ntcSshLog);
|
ntcSshLog = (NtcSshLog) createTestData(ntcSshLog);
|
||||||
ntcSshLog.setId(49L);
|
ntcSshLog.setId(49L);
|
||||||
ntcSshLog.setCfgId(8532L);
|
ntcSshLog.setCfgId(8532L);
|
||||||
ntcSshLog.setServiceType(26);
|
ntcSshLog.setService(26);
|
||||||
ntcSshLog.setUserRegion("8532");
|
ntcSshLog.setUserRegion("8532");
|
||||||
ntcSshLog.setVersion("版本2");
|
ntcSshLog.setVersion("版本2");
|
||||||
ntcSshLog.setHostKey("*&SDAEAS");
|
ntcSshLog.setHostKey("*&SDAEAS");
|
||||||
@@ -509,7 +505,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcSshLog = (NtcSshLog) createTestData(ntcSshLog);
|
ntcSshLog = (NtcSshLog) createTestData(ntcSshLog);
|
||||||
ntcSshLog.setId(50L);
|
ntcSshLog.setId(50L);
|
||||||
ntcSshLog.setCfgId(8533L);
|
ntcSshLog.setCfgId(8533L);
|
||||||
ntcSshLog.setServiceType(138);
|
ntcSshLog.setService(138);
|
||||||
ntcSshLog.setUserRegion("8533");
|
ntcSshLog.setUserRegion("8533");
|
||||||
ntcSshLog.setVersion("版本2");
|
ntcSshLog.setVersion("版本2");
|
||||||
ntcSshLog.setHostKey("*&SDAEAS111");
|
ntcSshLog.setHostKey("*&SDAEAS111");
|
||||||
@@ -542,7 +538,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcFtpLog = (NtcFtpLog) createTestData(ntcFtpLog);
|
ntcFtpLog = (NtcFtpLog) createTestData(ntcFtpLog);
|
||||||
ntcFtpLog.setId(51L);
|
ntcFtpLog.setId(51L);
|
||||||
ntcFtpLog.setCfgId(9532L);
|
ntcFtpLog.setCfgId(9532L);
|
||||||
ntcFtpLog.setServiceType(21);
|
ntcFtpLog.setService(21);
|
||||||
ntcFtpLog.setUserRegion(" 9532");
|
ntcFtpLog.setUserRegion(" 9532");
|
||||||
ntcFtpLog.setFtpUrl("ftp://127.0.0.1/a/b/c.txt");
|
ntcFtpLog.setFtpUrl("ftp://127.0.0.1/a/b/c.txt");
|
||||||
ntcFtpLog.setFtpContent("我能解附件内容");
|
ntcFtpLog.setFtpContent("我能解附件内容");
|
||||||
@@ -556,7 +552,7 @@ public class LogTestService extends BaseLogService {
|
|||||||
ntcFtpLog = (NtcFtpLog) createTestData(ntcFtpLog);
|
ntcFtpLog = (NtcFtpLog) createTestData(ntcFtpLog);
|
||||||
ntcFtpLog.setId(52L);
|
ntcFtpLog.setId(52L);
|
||||||
ntcFtpLog.setCfgId(9533L);
|
ntcFtpLog.setCfgId(9533L);
|
||||||
ntcFtpLog.setServiceType(133);
|
ntcFtpLog.setService(133);
|
||||||
ntcFtpLog.setUserRegion("9533");
|
ntcFtpLog.setUserRegion("9533");
|
||||||
ntcFtpLog.setFtpUrl("ftp://127.0.0.1/a/b/d.txt");
|
ntcFtpLog.setFtpUrl("ftp://127.0.0.1/a/b/d.txt");
|
||||||
ntcFtpLog.setFtpContent("我能解附件内容");
|
ntcFtpLog.setFtpContent("我能解附件内容");
|
||||||
@@ -658,21 +654,19 @@ public class LogTestService extends BaseLogService {
|
|||||||
|
|
||||||
|
|
||||||
private Object createTestData(LogEntity logEntity) {
|
private Object createTestData(LogEntity logEntity) {
|
||||||
logEntity.setProtocol("IPv4_TCP");
|
logEntity.setTransProto("IPv4_TCP");
|
||||||
logEntity.setFoundTime(new Date());
|
logEntity.setFoundTime(new Date());
|
||||||
logEntity.setRecvTime(new Date());
|
logEntity.setRecvTime(new Date());
|
||||||
logEntity.setAddrType(4);
|
logEntity.setAddrType(4);
|
||||||
logEntity.setClientIp("192.168.10.106");
|
logEntity.setsIp("192.168.10.106");
|
||||||
logEntity.setClientPort(80);
|
logEntity.setsPort("80");
|
||||||
logEntity.setServerIp("202.106.0.20");
|
logEntity.setdIp("202.106.0.20");
|
||||||
logEntity.setServerPort(8443);
|
logEntity.setdPort("8443");
|
||||||
logEntity.setCljIp("10.0.6.240");
|
logEntity.setCapIp("10.0.6.240");
|
||||||
logEntity.setDeviceId(1356981);
|
logEntity.setDeviceId(1356981);
|
||||||
logEntity.setDirection(0);
|
logEntity.setDirection(0);
|
||||||
logEntity.setStreamType(0);
|
logEntity.setStreamDir(0);
|
||||||
logEntity.setEntranceId(21L);
|
logEntity.setEntranceId(21L);
|
||||||
logEntity.setClientLocate("本地地址");
|
|
||||||
logEntity.setServerLocate("中国 北京 电信宽带光纤");
|
|
||||||
|
|
||||||
return logEntity;
|
return logEntity;
|
||||||
|
|
||||||
|
|||||||
@@ -133,34 +133,34 @@
|
|||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{compile_table_name};,;[compile_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{compile_table_name};,;[compile_id]</p:keyExpression>
|
||||||
<p:valueExpression>[compile_id];\t;[service];\t;[action];\t;[do_blacklist];\t;[do_log];\t;[effective_range];\t;[user_region];\t;[is_valid];\t;[group_num];\t;[father_cfg_id];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[compile_id];\t;[service];\t;[action];\t;[do_blacklist];\t;[do_log];\t;[effective_range];\t;[user_region];\t;[is_valid];\t;[group_num];\t;[father_cfg_id];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>;\t;[service];\t;[action];\t;[user_region]
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{group_table_name};,;[group_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{group_table_name};,;[group_id]</p:keyExpression>
|
||||||
<p:valueExpression>[group_id];\t;[compile_id];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[group_id];\t;[compile_id];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{ip_region_table_name};,;[region_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{ip_region_table_name};,;[region_id]</p:keyExpression>
|
||||||
<p:valueExpression>[region_id];\t;[group_id];\t;[addr_type];\t;[src_ip];\t;[mask_src_ip];\t;[src_port];\t;[mask_src_port];\t;[dst_ip];\t;[mask_dst_ip];\t;[dst_port];\t;[mask_dst_port];\t;[protocol];\t;[direction];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[region_id];\t;[group_id];\t;[addr_type];\t;[src_ip];\t;[mask_src_ip];\t;[src_port];\t;[mask_src_port];\t;[dst_ip];\t;[mask_dst_ip];\t;[dst_port];\t;[mask_dst_port];\t;[protocol];\t;[direction];\t;[is_valid];\t;[op_time];&nbsp;0;\t;[service];\t;[action];\t;[user_region];\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{str_region_table_name};,;[region_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{str_region_table_name};,;[region_id]</p:keyExpression>
|
||||||
<p:valueExpression>[region_id];\t;[group_id];\t;[keywords];\t;[expr_type];\t;[match_method];\t;[is_hexbin];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[region_id];\t;[group_id];\t;[keywords];\t;[expr_type];\t;[match_method];\t;[is_hexbin];\t;[is_valid];\t;[op_time];&nbsp;0;\t;[service];\t;[action];\t;[user_region];\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{str_str_region_table_name};,;[region_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{str_str_region_table_name};,;[region_id]</p:keyExpression>
|
||||||
<p:valueExpression>[region_id];\t;[group_id];\t;[keywords];\t;[district];\t;[expr_type];\t;[match_method];\t;[is_hexbin];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[region_id];\t;[group_id];\t;[keywords];\t;[district];\t;[expr_type];\t;[match_method];\t;[is_hexbin];\t;[is_valid];\t;[op_time];&nbsp;0;\t;[service];\t;[action];\t;[user_region];\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{num_region_table_name};,;[region_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{num_region_table_name};,;[region_id]</p:keyExpression>
|
||||||
<p:valueExpression>[region_id];\t;[group_id];\t;[low_boundary];\t;[up_boundary];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[region_id];\t;[group_id];\t;[low_boundary];\t;[up_boundary];\t;[is_valid];\t;[op_time];&nbsp;0;\t;[service];\t;[action];\t;[user_region];\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{file_digest_table_name};,;[region_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{file_digest_table_name};,;[region_id]</p:keyExpression>
|
||||||
<p:valueExpression>[region_id];\t;[group_id];\t;[raw_len];\t;[digest];\t;[cfds_level];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[region_id];\t;[group_id];\t;[raw_len];\t;[digest];\t;[cfds_level];\t;[is_valid];\t;[op_time];&nbsp;0;\t;[service];\t;[action];\t;[user_region];\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>EFFECTIVE_RULE;:;{ip_client_range_table_name};,;[region_id]</p:keyExpression>
|
<p:keyExpression>EFFECTIVE_RULE;:;{ip_client_range_table_name};,;[region_id]</p:keyExpression>
|
||||||
<p:valueExpression>[region_id];\t;[group_id];\t;[addr_type];\t;[src_ip];\t;[mask_src_ip];\t;[src_port];\t;[mask_src_port];\t;[dst_ip];\t;[mask_dst_ip];\t;[dst_port];\t;[mask_dst_port];\t;[protocol];\t;[direction];\t;[is_valid];\t;[op_time];&nbsp;0;\n</p:valueExpression>
|
<p:valueExpression>[region_id];\t;[group_id];\t;[addr_type];\t;[src_ip];\t;[mask_src_ip];\t;[src_port];\t;[mask_src_port];\t;[dst_ip];\t;[mask_dst_ip];\t;[dst_port];\t;[mask_dst_port];\t;[protocol];\t;[direction];\t;[is_valid];\t;[op_time];&nbsp;0;\t;[service];\t;[action];\t;[user_region];\n</p:valueExpression>
|
||||||
</p:expressions>
|
</p:expressions>
|
||||||
<p:expressions>
|
<p:expressions>
|
||||||
<p:keyExpression>MAAT_UPDATE_STATUS</p:keyExpression>
|
<p:keyExpression>MAAT_UPDATE_STATUS</p:keyExpression>
|
||||||
|
|||||||
@@ -72,7 +72,9 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;
|
|||||||
|
|
||||||
768=10:IR_POLICY_COMPILE;11:IR_POLICY_GROUP;12:IR_POLICY_IP;18:NTC_IP_RANGE
|
768=10:IR_POLICY_COMPILE;11:IR_POLICY_GROUP;12:IR_POLICY_IP;18:NTC_IP_RANGE
|
||||||
|
|
||||||
1024=10:APP_COMPILE;11:APP_GROUP;15:APP_HTTP;14:APP_PKT_BIN;14:APP_SSL_SNI;18:NTC_IP_RANGE
|
#将APP用户定义特征发现(0x400)中APP_PKT_BIN表拆分到新的serive(0x402)
|
||||||
|
1024=10:APP_COMPILE;11:APP_GROUP;15:APP_HTTP;14:APP_DOMAIN;18:NTC_IP_RANGE
|
||||||
|
1026=10:APP_COMPILE;11:APP_GROUP;14:APP_PKT_BIN;18:NTC_IP_RANGE
|
||||||
1040=10:APP_COMPILE;11:APP_GROUP;14:APP_POLICY;18:NTC_IP_RANGE
|
1040=10:APP_COMPILE;11:APP_GROUP;14:APP_POLICY;18:NTC_IP_RANGE
|
||||||
1041=10:APP_COMPILE;11:APP_GROUP;12:APP_STATIC_SEV_IP;18:NTC_IP_RANGE
|
1041=10:APP_COMPILE;11:APP_GROUP;12:APP_STATIC_SEV_IP;18:NTC_IP_RANGE
|
||||||
1056=10:APP_COMPILE;11:APP_GROUP;14:APP_POLICY;18:NTC_IP_RANGE
|
1056=10:APP_COMPILE;11:APP_GROUP;14:APP_POLICY;18:NTC_IP_RANGE
|
||||||
@@ -107,7 +109,11 @@ unMaatService=3:32;4:96;25:32;28:32;29:32;64:16;65:16;261:16;262:16;263:16;264:1
|
|||||||
##各业务类型对应的redisdb,业务类型:redisdb,多个业务以“;”分隔,多个db以“,”数量不能超过6个
|
##各业务类型对应的redisdb,业务类型:redisdb,多个业务以“;”分隔,多个db以“,”数量不能超过6个
|
||||||
#系统简称对应的redisDBIndex: NTC(1-255):2 MM(256-511):3 PXY(512-767):4 IR(768-1023):5 DK(1024-1279):6 阀门:7
|
#系统简称对应的redisDBIndex: NTC(1-255):2 MM(256-511):3 PXY(512-767):4 IR(768-1023):5 DK(1024-1279):6 阀门:7
|
||||||
#APP 0x400-0x420 目前配置入到NTC系统对应的库中
|
#APP 0x400-0x420 目前配置入到NTC系统对应的库中
|
||||||
serviceDBIndex=1:2,3,4,6;2:2,3,4,6;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;141:2;143:2;144:2;256:3;257:3;258:3;259:3;260:3;384:3;385:3;386:3;387:3;388:3;512:4;513:4,2;528:4;529:4;544:4;545:4;560:4;561:4;3:2,7;4:2,7;25:2;28:2;29:2;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;389:3;390:3;391:3;392:3;393:3;394:3;832:5,7;768:4;1024:2,6;1040:2,6;1041:2,6;1056:2,6;1057:6;1058:6,2
|
serviceDBIndex=1:2,3,4,6;2:2,3,4,6;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;141:2;143:2;144:2;256:3;257:3;258:3;259:3;260:3;384:3;385:3;386:3;387:3;388:3;512:4,7;513:4,2,7;528:4;529:4;544:4;545:4;560:4;561:4;3:2,7;4:2,7;25:2;28:2;29:2;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;389:3;390:3;391:3;392:3;393:3;394:3;832:5,7;768:4;1024:2,6,7;1026:2;1040:2,6,7;1041:2,6,7;1056:2,6,7;1057:6,7;1058:6,2,7
|
||||||
|
|
||||||
|
|
||||||
|
##maat配置入阀门需要将编译中的部分参数写到域配置中,目前最多包含ACTION,SERVICE,USER_REGION三个属性
|
||||||
|
##业务ID:域类型1|域类型2@属性1&属性2&属性3
|
||||||
|
##域类型:IP域 =ipRegion 字符串域=strRegion 增强字符串域=strstrRegion 数值域=numRegion
|
||||||
|
############
|
||||||
|
maat2Valve=512:ipRegion@ACTION&SERVICE;513:strRegion@ACTION&SERVICE&USER_REGION;1024:strRegion|strstrRegion@USER_REGION;1040:strRegion@ACTION&SERVICE&USER_REGION;1056:strRegion@ACTION&SERVICE&USER_REGION;1041:ipRegion@ACTION&SERVICE&USER_REGION;1057:ipRegion@ACTION&SERVICE&USER_REGION;1058:strRegion@ACTION&SERVICE&USER_REGION
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user