Compare commits
114 Commits
develop_20
...
develop_20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb7197f098 | ||
|
|
de1eb563a3 | ||
|
|
af28efc76d | ||
|
|
973f071897 | ||
|
|
e8e948ce7d | ||
|
|
df9665376f | ||
|
|
2858e643ac | ||
|
|
8d2e30b952 | ||
|
|
19c8492cc8 | ||
|
|
328f266046 | ||
|
|
a9a15f4c0a | ||
|
|
025873ce76 | ||
|
|
28771355cc | ||
|
|
0629e8b1de | ||
|
|
8d7a6c69b6 | ||
|
|
fe3f632046 | ||
|
|
9527b41592 | ||
|
|
6312a65351 | ||
|
|
f6c37c7bda | ||
|
|
c81dd92aca | ||
|
|
9f4264d878 | ||
|
|
d4e153533a | ||
|
|
35ca1636ef | ||
|
|
44486b98cb | ||
|
|
ea456f83d0 | ||
|
|
b4f9eac0d3 | ||
|
|
54333afe0b | ||
|
|
48806bd775 | ||
|
|
23ae0f08d3 | ||
|
|
21ca3bc804 | ||
|
|
d9110dfa14 | ||
|
|
fd2d285b92 | ||
|
|
8a27636007 | ||
|
|
89336a3677 | ||
|
|
144900d6df | ||
|
|
ba758cab58 | ||
|
|
10fb06f5bf | ||
|
|
dd37178cfc | ||
|
|
46fff54557 | ||
|
|
f1fc6ee9aa | ||
|
|
dde951fe4a | ||
|
|
33fd4df21d | ||
|
|
1882d011cb | ||
|
|
cd977ed81a | ||
|
|
e8a5c506e9 | ||
|
|
f8e1b8f093 | ||
|
|
c30ab53f00 | ||
|
|
ea33bae40f | ||
|
|
d1082f539e | ||
|
|
c1188539b5 | ||
|
|
269f4e0644 | ||
|
|
3f6d6a6d60 | ||
|
|
00ffdd863c | ||
|
|
1eaa2e668b | ||
|
|
86c2d86565 | ||
|
|
35e491e20c | ||
|
|
ce8c273aa4 | ||
|
|
d00a855666 | ||
|
|
2b57e33d12 | ||
|
|
fa9edae028 | ||
|
|
d4ee7c7a42 | ||
|
|
eac5552be2 | ||
|
|
18c5567f58 | ||
|
|
b0a9982d54 | ||
|
|
8e724393e1 | ||
|
|
494fb0669a | ||
|
|
36d1fee141 | ||
|
|
999406cbd1 | ||
|
|
4107e0fb92 | ||
|
|
efd965f4ca | ||
|
|
6eecad82aa | ||
|
|
ab8c4448ce | ||
|
|
9ade865187 | ||
|
|
2aa3524104 | ||
|
|
35a1b72fee | ||
|
|
724eeef0f5 | ||
|
|
65d3f5013f | ||
|
|
b50d324303 | ||
|
|
26097409d6 | ||
|
|
6223c66618 | ||
|
|
0499fb845d | ||
|
|
30007d50d0 | ||
|
|
1221ce6a18 | ||
|
|
b9246ddeeb | ||
|
|
eda0103068 | ||
|
|
589cf100ee | ||
|
|
3b838aa838 | ||
|
|
b3abe1f0e5 | ||
|
|
0b1a51aa47 | ||
|
|
40e166510c | ||
|
|
47771e57e7 | ||
|
|
94f0bc56b8 | ||
|
|
0cf19aeab9 | ||
|
|
078b1a0071 | ||
|
|
728201cfbe | ||
|
|
8719ed0527 | ||
|
|
77716a9517 | ||
|
|
5e9400e723 | ||
|
|
541aaf4640 | ||
|
|
f773c95c0b | ||
|
|
77c7649b6a | ||
|
|
e8dd565262 | ||
|
|
fe90fd9935 | ||
|
|
827a43d843 | ||
|
|
34a6cb5ed4 | ||
|
|
42724b94de | ||
|
|
97d1a52d3c | ||
|
|
28f07f00f2 | ||
|
|
c716cb1fc3 | ||
|
|
1191db5fbe | ||
|
|
5b63b0237e | ||
|
|
99c3c8c84f | ||
|
|
865811b9b2 | ||
|
|
5a5bdddba4 |
21
README.md
21
README.md
@@ -1,18 +1,3 @@
|
|||||||
5.8号升级版本。
|
610功能升级:
|
||||||
|
系统需要支持对 生效中的配置 进行修改的功能;
|
||||||
1、系统支持单独配置 SubscribeID,即仅使用SubscribeID作为配置条件进行监测或者封堵,无需与其它条件组合;
|
统计的时间修改为一个月,性能是否可以;
|
||||||
|
|
||||||
|
|
||||||
2、系统增加配置30个用户并发进行导入,每次导入不超过2w条 。
|
|
||||||
|
|
||||||
|
|
||||||
3、系统增加saveAndAudit角色,拥有该角色的用户新增配置,配置不经过审核流程直接生效。
|
|
||||||
|
|
||||||
4、日志页面单次可以下载2万条以内的日志;
|
|
||||||
|
|
||||||
|
|
||||||
5、支持监测、统计志查询条件扩展到1个月 (通联日志只能是1天)。
|
|
||||||
|
|
||||||
|
|
||||||
6、配置 页面支持按照配置 id进行查询,支持配置 id输入方式为 10-15;10,13,15;
|
|
||||||
|
|
||||||
@@ -20,12 +20,14 @@ public class AsnIpCfg extends BaseCfg<AsnIpCfg> {
|
|||||||
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=6)
|
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=6)
|
||||||
@SerializedName("ipType")
|
@SerializedName("ipType")
|
||||||
private Integer ipType;
|
private Integer ipType;
|
||||||
@ExcelField(title="ip_pattern",dictType="IP_PATTERN",sort=8)
|
private Integer srcIpPattern;
|
||||||
private Integer ipPattern;
|
@ExcelField(title="dest_ip_pattern",dictType="IP_PATTERN",sort=8)
|
||||||
|
private Integer destIpPattern;
|
||||||
private String srcIpAddress;
|
private String srcIpAddress;
|
||||||
@ExcelField(title="ip",sort=7)
|
@ExcelField(title="ip",sort=7)
|
||||||
private String destIpAddress;
|
private String destIpAddress;
|
||||||
private Integer portPattern;
|
private Integer srcPortPattern;
|
||||||
|
private Integer destPortPattern;
|
||||||
private String srcPort;
|
private String srcPort;
|
||||||
private String destPort;
|
private String destPort;
|
||||||
//@ExcelField(title="group",sort=2)
|
//@ExcelField(title="group",sort=2)
|
||||||
@@ -117,11 +119,30 @@ public class AsnIpCfg extends BaseCfg<AsnIpCfg> {
|
|||||||
public void setIpType(Integer ipType) {
|
public void setIpType(Integer ipType) {
|
||||||
this.ipType = ipType;
|
this.ipType = ipType;
|
||||||
}
|
}
|
||||||
public Integer getIpPattern() {
|
|
||||||
return ipPattern;
|
public Integer getSrcIpPattern() {
|
||||||
|
return srcIpPattern;
|
||||||
}
|
}
|
||||||
public void setIpPattern(Integer ipPattern) {
|
public void setSrcIpPattern(Integer srcIpPattern) {
|
||||||
this.ipPattern = ipPattern;
|
this.srcIpPattern = srcIpPattern;
|
||||||
|
}
|
||||||
|
public Integer getDestIpPattern() {
|
||||||
|
return destIpPattern;
|
||||||
|
}
|
||||||
|
public void setDestIpPattern(Integer destIpPattern) {
|
||||||
|
this.destIpPattern = destIpPattern;
|
||||||
|
}
|
||||||
|
public Integer getSrcPortPattern() {
|
||||||
|
return srcPortPattern;
|
||||||
|
}
|
||||||
|
public void setSrcPortPattern(Integer srcPortPattern) {
|
||||||
|
this.srcPortPattern = srcPortPattern;
|
||||||
|
}
|
||||||
|
public Integer getDestPortPattern() {
|
||||||
|
return destPortPattern;
|
||||||
|
}
|
||||||
|
public void setDestPortPattern(Integer destPortPattern) {
|
||||||
|
this.destPortPattern = destPortPattern;
|
||||||
}
|
}
|
||||||
public String getSrcIpAddress() {
|
public String getSrcIpAddress() {
|
||||||
return srcIpAddress;
|
return srcIpAddress;
|
||||||
@@ -135,12 +156,6 @@ public class AsnIpCfg extends BaseCfg<AsnIpCfg> {
|
|||||||
public void setDestIpAddress(String destIpAddress) {
|
public void setDestIpAddress(String destIpAddress) {
|
||||||
this.destIpAddress = destIpAddress;
|
this.destIpAddress = destIpAddress;
|
||||||
}
|
}
|
||||||
public Integer getPortPattern() {
|
|
||||||
return portPattern;
|
|
||||||
}
|
|
||||||
public void setPortPattern(Integer portPattern) {
|
|
||||||
this.portPattern = portPattern;
|
|
||||||
}
|
|
||||||
public String getSrcPort() {
|
public String getSrcPort() {
|
||||||
return srcPort;
|
return srcPort;
|
||||||
}
|
}
|
||||||
@@ -176,9 +191,10 @@ public class AsnIpCfg extends BaseCfg<AsnIpCfg> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "AsnIpCfg [regionId=" + regionId + ", ratelimit=" + ratelimit + ", ipType=" + ipType + ", ipPattern="
|
return "AsnIpCfg [regionId=" + regionId + ", ratelimit=" + ratelimit + ", ipType=" + ipType + ", srcIpPattern="
|
||||||
+ ipPattern + ", srcIpAddress=" + srcIpAddress + ", destIpAddress=" + destIpAddress + ", portPattern="
|
+ srcIpPattern + ", destIpPattern="+ destIpPattern+ ", srcIpAddress=" + srcIpAddress + ", destIpAddress="
|
||||||
+ portPattern + ", srcPort=" + srcPort + ", destPort=" + destPort + ", asnIpGroupName=" + asnIpGroupName
|
+ destIpAddress + ", srcPortPattern="+ srcPortPattern+", destPortPattern="+ destPortPattern + ", srcPort="
|
||||||
|
+ srcPort + ", destPort=" + destPort + ", asnIpGroupName=" + asnIpGroupName
|
||||||
+ ", asnIpGroup=" + asnIpGroup + ", direction=" + direction + ", protocol=" + protocol + ", protocolId="
|
+ ", asnIpGroup=" + asnIpGroup + ", direction=" + direction + ", protocol=" + protocol + ", protocolId="
|
||||||
+ protocolId + ", compileId=" + compileId + ", isValid=" + isValid + ", userRegion1=" + userRegion1
|
+ protocolId + ", compileId=" + compileId + ", isValid=" + isValid + ", userRegion1=" + userRegion1
|
||||||
+ ", userRegion2=" + userRegion2 + ", userRegion3=" + userRegion3 + ", userRegion4=" + userRegion4
|
+ ", userRegion2=" + userRegion2 + ", userRegion3=" + userRegion3 + ", userRegion4=" + userRegion4
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
|
|
||||||
package com.nis.domain.configuration;
|
package com.nis.domain.configuration;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.nis.util.excel.ExcelField;
|
import com.nis.util.excel.ExcelField;
|
||||||
@@ -34,11 +32,13 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
|||||||
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=3)
|
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=3)
|
||||||
@SerializedName("ipType")
|
@SerializedName("ipType")
|
||||||
protected Integer ipType;
|
protected Integer ipType;
|
||||||
protected Integer ipPattern;
|
protected Integer srcIpPattern;
|
||||||
|
protected Integer destIpPattern;
|
||||||
protected String srcIpAddress;
|
protected String srcIpAddress;
|
||||||
@ExcelField(title="server_ip",sort=4)
|
@ExcelField(title="server_ip",sort=4)
|
||||||
protected String destIpAddress;
|
protected String destIpAddress;
|
||||||
protected Integer portPattern;
|
protected Integer srcPortPattern;
|
||||||
|
protected Integer destPortPattern;
|
||||||
protected String srcPort;
|
protected String srcPort;
|
||||||
@ExcelField(title="server_port",sort=5)
|
@ExcelField(title="server_port",sort=5)
|
||||||
protected String destPort;
|
protected String destPort;
|
||||||
@@ -121,34 +121,7 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
|||||||
// this.protocolId = protocolId;
|
// this.protocolId = protocolId;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
|
||||||
* ipPattern
|
|
||||||
* @return ipPattern
|
|
||||||
*/
|
|
||||||
|
|
||||||
public Integer getIpPattern() {
|
|
||||||
return ipPattern;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param ipPattern the ipPattern to set
|
|
||||||
*/
|
|
||||||
public void setIpPattern(Integer ipPattern) {
|
|
||||||
this.ipPattern = ipPattern;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* portPattern
|
|
||||||
* @return portPattern
|
|
||||||
*/
|
|
||||||
|
|
||||||
public Integer getPortPattern() {
|
|
||||||
return portPattern;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param portPattern the portPattern to set
|
|
||||||
*/
|
|
||||||
public void setPortPattern(Integer portPattern) {
|
|
||||||
this.portPattern = portPattern;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* srcIpAddress
|
* srcIpAddress
|
||||||
@@ -158,6 +131,30 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
|||||||
public String getSrcIpAddress() {
|
public String getSrcIpAddress() {
|
||||||
return srcIpAddress;
|
return srcIpAddress;
|
||||||
}
|
}
|
||||||
|
public Integer getSrcIpPattern() {
|
||||||
|
return srcIpPattern;
|
||||||
|
}
|
||||||
|
public void setSrcIpPattern(Integer srcIpPattern) {
|
||||||
|
this.srcIpPattern = srcIpPattern;
|
||||||
|
}
|
||||||
|
public Integer getDestIpPattern() {
|
||||||
|
return destIpPattern;
|
||||||
|
}
|
||||||
|
public void setDestIpPattern(Integer destIpPattern) {
|
||||||
|
this.destIpPattern = destIpPattern;
|
||||||
|
}
|
||||||
|
public Integer getSrcPortPattern() {
|
||||||
|
return srcPortPattern;
|
||||||
|
}
|
||||||
|
public void setSrcPortPattern(Integer srcPortPattern) {
|
||||||
|
this.srcPortPattern = srcPortPattern;
|
||||||
|
}
|
||||||
|
public Integer getDestPortPattern() {
|
||||||
|
return destPortPattern;
|
||||||
|
}
|
||||||
|
public void setDestPortPattern(Integer destPortPattern) {
|
||||||
|
this.destPortPattern = destPortPattern;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param srcIpAddress the srcIpAddress to set
|
* @param srcIpAddress the srcIpAddress to set
|
||||||
*/
|
*/
|
||||||
@@ -257,16 +254,10 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "AppIpCfg [compileId=" + compileId + ", ratelimit=" + ratelimit + ", appCode=" + appCode + ", behavCode="
|
return "AppIpCfg [compileId=" + compileId + ", ratelimit=" + ratelimit + ", appCode=" + appCode + ", behavCode="
|
||||||
+ behavCode + ", specServiceId=" + specServiceId + ", appName=" + appName + ", ipType=" + ipType
|
+ behavCode + ", specServiceId=" + specServiceId + ", appName=" + appName + ", ipType=" + ipType
|
||||||
+ ", ipPattern=" + ipPattern + ", srcIpAddress=" + srcIpAddress + ", destIpAddress=" + destIpAddress
|
+ ", srcIpPattern=" + srcIpPattern + ", destIpPattern=" + destIpPattern + ", srcIpAddress="
|
||||||
+ ", portPattern=" + portPattern + ", srcPort=" + srcPort + ", destPort=" + destPort + ", direction="
|
+ srcIpAddress + ", destIpAddress=" + destIpAddress + ", srcPortPattern=" + srcPortPattern
|
||||||
+ direction + ", protocol=" + protocol + ", userRegion1=" + userRegion1 + ", userRegion2=" + userRegion2
|
+ ", destPortPattern=" + destPortPattern + ", srcPort=" + srcPort + ", destPort=" + destPort
|
||||||
+ ", userRegion3=" + userRegion3 + ", userRegion4=" + userRegion4 + ", userRegion5=" + userRegion5
|
+ ", direction=" + direction + ", protocol=" + protocol + "]";
|
||||||
+ ", cfgId=" + cfgId + ", cfgDesc=" + cfgDesc + ", action=" + action + ", isValid=" + isValid
|
|
||||||
+ ", isAudit=" + isAudit + ", creatorId=" + creatorId + ", createTime=" + createTime + ", editorId="
|
|
||||||
+ editorId + ", editTime=" + editTime + ", auditorId=" + auditorId + ", auditTime=" + auditTime
|
|
||||||
+ ", serviceId=" + serviceId + ", requestId=" + requestId + ", cancelRequestId=" + cancelRequestId
|
|
||||||
+ ", isAreaEffective=" + isAreaEffective + ", classify=" + classify + ", attribute=" + attribute
|
|
||||||
+ ", lable=" + lable + ", areaEffectiveIds=" + areaEffectiveIds + ", cfgRegionCode=" + cfgRegionCode
|
|
||||||
+ ", cfgType=" + cfgType + ", functionId=" + functionId + ", doLog=" + doLog + "]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ public class AreaIpCfg extends BaseIpCfg {
|
|||||||
this.cfgType=Constants.AREA_REGION;
|
this.cfgType=Constants.AREA_REGION;
|
||||||
this.cfgRegionCode=1;
|
this.cfgRegionCode=1;
|
||||||
this.protocol=0;
|
this.protocol=0;
|
||||||
this.portPattern=1;
|
this.srcPortPattern=1;
|
||||||
|
this.destPortPattern=1;
|
||||||
this.srcPort="0";
|
this.srcPort="0";
|
||||||
this.destPort="0";
|
this.destPort="0";
|
||||||
this.direction=0;
|
this.direction=0;
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
|||||||
protected String hColumns;//导出隐藏列
|
protected String hColumns;//导出隐藏列
|
||||||
|
|
||||||
protected String compileIdNew;// 查询 配置ID 范围
|
protected String compileIdNew;// 查询 配置ID 范围
|
||||||
|
|
||||||
|
//批量操作时,记录isAudit和isValid检索条件
|
||||||
|
protected String batchAuditValue;
|
||||||
|
protected String batchValidValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务信息
|
* 定时任务信息
|
||||||
@@ -1004,6 +1008,17 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
|||||||
public void setSchedule(ScheduleCfg schedule) {
|
public void setSchedule(ScheduleCfg schedule) {
|
||||||
this.schedule = schedule;
|
this.schedule = schedule;
|
||||||
}
|
}
|
||||||
|
public String getBatchAuditValue() {
|
||||||
|
return batchAuditValue;
|
||||||
|
}
|
||||||
|
public String getBatchValidValue() {
|
||||||
|
return batchValidValue;
|
||||||
|
}
|
||||||
|
public void setBatchAuditValue(String batchAuditValue) {
|
||||||
|
this.batchAuditValue = batchAuditValue;
|
||||||
|
}
|
||||||
|
public void setBatchValidValue(String batchValidValue) {
|
||||||
|
this.batchValidValue = batchValidValue;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,14 +45,18 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
|||||||
@SerializedName("ipType")
|
@SerializedName("ipType")
|
||||||
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=50)
|
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=50)
|
||||||
protected Integer ipType;
|
protected Integer ipType;
|
||||||
@ExcelField(title="ip_pattern",dictType="IP_PATTERN",sort=51)
|
@ExcelField(title="src_ip_pattern",dictType="IP_PATTERN",sort=51)
|
||||||
protected Integer ipPattern;
|
protected Integer srcIpPattern;
|
||||||
@ExcelField(title="client_ip",sort=53)
|
@ExcelField(title="client_ip",sort=52)
|
||||||
protected String srcIpAddress;
|
protected String srcIpAddress;
|
||||||
@ExcelField(title="server_ip",sort=52)
|
@ExcelField(title="dest_ip_pattern",dictType="IP_PATTERN",sort=53)
|
||||||
|
protected Integer destIpPattern;
|
||||||
|
@ExcelField(title="server_ip",sort=54)
|
||||||
protected String destIpAddress;
|
protected String destIpAddress;
|
||||||
@ExcelField(title="port_pattern",dictType="PORT_PATTERN",sort=54)
|
@ExcelField(title="src_port_pattern",dictType="PORT_PATTERN",sort=54)
|
||||||
protected Integer portPattern;
|
protected Integer srcPortPattern;
|
||||||
|
@ExcelField(title="dest_port_pattern",dictType="PORT_PATTERN",sort=54)
|
||||||
|
protected Integer destPortPattern;
|
||||||
@ExcelField(title="client_port",sort=55)
|
@ExcelField(title="client_port",sort=55)
|
||||||
protected String srcPort;
|
protected String srcPort;
|
||||||
@ExcelField(title="server_port",sort=56)
|
@ExcelField(title="server_port",sort=56)
|
||||||
@@ -269,35 +273,31 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
|||||||
this.protocolId = protocolId;
|
this.protocolId = protocolId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ipPattern
|
|
||||||
* @return ipPattern
|
|
||||||
*/
|
|
||||||
|
|
||||||
public Integer getIpPattern() {
|
public Integer getSrcIpPattern() {
|
||||||
return ipPattern;
|
return srcIpPattern;
|
||||||
}
|
}
|
||||||
/**
|
public void setSrcIpPattern(Integer srcIpPattern) {
|
||||||
* @param ipPattern the ipPattern to set
|
this.srcIpPattern = srcIpPattern;
|
||||||
*/
|
|
||||||
public void setIpPattern(Integer ipPattern) {
|
|
||||||
this.ipPattern = ipPattern;
|
|
||||||
}
|
}
|
||||||
/**
|
public Integer getDestIpPattern() {
|
||||||
* portPattern
|
return destIpPattern;
|
||||||
* @return portPattern
|
|
||||||
*/
|
|
||||||
|
|
||||||
public Integer getPortPattern() {
|
|
||||||
return portPattern;
|
|
||||||
}
|
}
|
||||||
/**
|
public void setDestIpPattern(Integer destIpPattern) {
|
||||||
* @param portPattern the portPattern to set
|
this.destIpPattern = destIpPattern;
|
||||||
*/
|
}
|
||||||
public void setPortPattern(Integer portPattern) {
|
public Integer getSrcPortPattern() {
|
||||||
this.portPattern = portPattern;
|
return srcPortPattern;
|
||||||
|
}
|
||||||
|
public void setSrcPortPattern(Integer srcPortPattern) {
|
||||||
|
this.srcPortPattern = srcPortPattern;
|
||||||
|
}
|
||||||
|
public Integer getDestPortPattern() {
|
||||||
|
return destPortPattern;
|
||||||
|
}
|
||||||
|
public void setDestPortPattern(Integer destPortPattern) {
|
||||||
|
this.destPortPattern = destPortPattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* srcIpAddress
|
* srcIpAddress
|
||||||
* @return srcIpAddress
|
* @return srcIpAddress
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.nis.domain.configuration.template;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wx 将部分字段的标题改变,或者不需要的字段隐藏
|
|
||||||
* 隐藏方法,对于不需要的字段或者方法,Override该字段方法,但是@ExcelField注解不需要加上了
|
|
||||||
* @author dell
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class IpAddrTemplate extends IpCfgTemplate {
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getIrType() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getIrType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getDnsStrategyId() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getDnsStrategyId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRatelimit() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getRatelimit();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.nis.domain.configuration.template;
|
package com.nis.domain.configuration.template;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.nis.util.excel.ExcelField;
|
import com.nis.util.excel.ExcelField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,310 +0,0 @@
|
|||||||
/**
|
|
||||||
*@Title: BaseStringConfig.java
|
|
||||||
*@Package com.nis.domain.restful
|
|
||||||
*@Description TODO
|
|
||||||
*@author dell
|
|
||||||
*@date 2018年2月5日 下午5:26:02
|
|
||||||
*@version 版本号
|
|
||||||
*/
|
|
||||||
package com.nis.domain.configuration.template;
|
|
||||||
|
|
||||||
import com.nis.util.excel.ExcelField;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: excel导入IP类配置
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class IpCfgTemplate {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Long cfgId;
|
|
||||||
private Integer ipType;//1
|
|
||||||
private Integer ipPattern;//2
|
|
||||||
private String srcIpAddress; //3
|
|
||||||
private String destIpAddress; //4
|
|
||||||
private Integer portPattern; //5
|
|
||||||
private String srcPort; //6
|
|
||||||
private String destPort;//7
|
|
||||||
private Integer protocol;//8
|
|
||||||
protected Integer direction;//9
|
|
||||||
private String cfgDesc;//10
|
|
||||||
private Integer requestId;//11
|
|
||||||
private String requestName;//12
|
|
||||||
private Integer isAreaEffective;//13
|
|
||||||
private String classify;//14
|
|
||||||
private String attribute;//15
|
|
||||||
private String lable;//16
|
|
||||||
private String classifyName;//17
|
|
||||||
private String attributeName;//18
|
|
||||||
private String lableName;//19
|
|
||||||
private String areaEffectiveIds;//20
|
|
||||||
private String ratelimit;//21
|
|
||||||
private Integer dnsStrategyId;//22
|
|
||||||
private Integer irType;//23
|
|
||||||
private String userRegion1;//77
|
|
||||||
private String userRegion2;//78
|
|
||||||
private String userRegion3;//79
|
|
||||||
private String userRegion4;//80
|
|
||||||
private String userRegion5;//81
|
|
||||||
|
|
||||||
/**
|
|
||||||
* userRegion1
|
|
||||||
* @return userRegion1
|
|
||||||
*/
|
|
||||||
// @ExcelField(title="userregion1",align=2,sort=77)
|
|
||||||
public String getUserRegion1() {
|
|
||||||
return userRegion1;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param userRegion1 the userRegion1 to set
|
|
||||||
*/
|
|
||||||
public void setUserRegion1(String userRegion1) {
|
|
||||||
this.userRegion1 = userRegion1;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* userRegion2
|
|
||||||
* @return userRegion2
|
|
||||||
*/
|
|
||||||
// @ExcelField(title="userregion2",align=2,sort=78)
|
|
||||||
public String getUserRegion2() {
|
|
||||||
return userRegion2;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param userRegion2 the userRegion2 to set
|
|
||||||
*/
|
|
||||||
public void setUserRegion2(String userRegion2) {
|
|
||||||
this.userRegion2 = userRegion2;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* userRegion3
|
|
||||||
* @return userRegion3
|
|
||||||
*/
|
|
||||||
// @ExcelField(title="userregion3",align=2,sort=79)
|
|
||||||
public String getUserRegion3() {
|
|
||||||
return userRegion3;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param userRegion3 the userRegion3 to set
|
|
||||||
*/
|
|
||||||
public void setUserRegion3(String userRegion3) {
|
|
||||||
this.userRegion3 = userRegion3;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* userRegion4
|
|
||||||
* @return userRegion4
|
|
||||||
*/
|
|
||||||
// @ExcelField(title="userregion4",align=2,sort=80)
|
|
||||||
public String getUserRegion4() {
|
|
||||||
return userRegion4;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param userRegion4 the userRegion4 to set
|
|
||||||
*/
|
|
||||||
public void setUserRegion4(String userRegion4) {
|
|
||||||
this.userRegion4 = userRegion4;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* userRegion5
|
|
||||||
* @return userRegion5
|
|
||||||
*/
|
|
||||||
// @ExcelField(title="userregion5",align=2,sort=81)
|
|
||||||
public String getUserRegion5() {
|
|
||||||
return userRegion5;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param userRegion5 the userRegion5 to set
|
|
||||||
*/
|
|
||||||
public void setUserRegion5(String userRegion5) {
|
|
||||||
this.userRegion5 = userRegion5;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* ratelimit
|
|
||||||
* @return ratelimit
|
|
||||||
*/
|
|
||||||
@ExcelField(title="ratelimit",align=2,sort=74)
|
|
||||||
public String getRatelimit() {
|
|
||||||
return ratelimit;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param ratelimit the ratelimit to set
|
|
||||||
*/
|
|
||||||
public void setRatelimit(String ratelimit) {
|
|
||||||
this.ratelimit = ratelimit;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* irType
|
|
||||||
* @return irType
|
|
||||||
*/
|
|
||||||
@ExcelField(title="ir_type",align=2,sort=76)
|
|
||||||
public Integer getIrType() {
|
|
||||||
return irType;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param irType the irType to set
|
|
||||||
*/
|
|
||||||
public void setIrType(Integer irType) {
|
|
||||||
this.irType = irType;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* dnsStrategyId
|
|
||||||
* @return dnsStrategyId
|
|
||||||
*/
|
|
||||||
@ExcelField(title="dns_strategy_id",align=2,sort=75)
|
|
||||||
public Integer getDnsStrategyId() {
|
|
||||||
return dnsStrategyId;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param dnsStrategyId the dnsStrategyId to set
|
|
||||||
*/
|
|
||||||
public void setDnsStrategyId(Integer dnsStrategyId) {
|
|
||||||
this.dnsStrategyId = dnsStrategyId;
|
|
||||||
}
|
|
||||||
@ExcelField(title="ip_type",align=2,sort=1)
|
|
||||||
public Integer getIpType() {
|
|
||||||
return ipType;
|
|
||||||
}
|
|
||||||
public void setIpType(Integer ipType) {
|
|
||||||
this.ipType = ipType;
|
|
||||||
}
|
|
||||||
@ExcelField(title="ip_pattern",align=2,sort=2)
|
|
||||||
public Integer getIpPattern() {
|
|
||||||
return ipPattern;
|
|
||||||
}
|
|
||||||
public void setIpPattern(Integer ipPattern) {
|
|
||||||
this.ipPattern = ipPattern;
|
|
||||||
}
|
|
||||||
@ExcelField(title="client_ip",align=2,sort=3)
|
|
||||||
public String getSrcIpAddress() {
|
|
||||||
return srcIpAddress;
|
|
||||||
}
|
|
||||||
public void setSrcIpAddress(String srcIpAddress) {
|
|
||||||
this.srcIpAddress = srcIpAddress;
|
|
||||||
}
|
|
||||||
@ExcelField(title="server_ip",align=2,sort=4)
|
|
||||||
public String getDestIpAddress() {
|
|
||||||
return destIpAddress;
|
|
||||||
}
|
|
||||||
public void setDestIpAddress(String destIpAddress) {
|
|
||||||
this.destIpAddress = destIpAddress;
|
|
||||||
}
|
|
||||||
@ExcelField(title="port_pattern",align=2,sort=5)
|
|
||||||
public Integer getPortPattern() {
|
|
||||||
return portPattern;
|
|
||||||
}
|
|
||||||
public void setPortPattern(Integer portPattern) {
|
|
||||||
this.portPattern = portPattern;
|
|
||||||
}
|
|
||||||
@ExcelField(title="client_port",align=2,sort=6)
|
|
||||||
public String getSrcPort() {
|
|
||||||
return srcPort;
|
|
||||||
}
|
|
||||||
public void setSrcPort(String srcPort) {
|
|
||||||
this.srcPort = srcPort;
|
|
||||||
}
|
|
||||||
@ExcelField(title="server_port",align=2,sort=7)
|
|
||||||
public String getDestPort() {
|
|
||||||
return destPort;
|
|
||||||
}
|
|
||||||
public void setDestPort(String destPort) {
|
|
||||||
this.destPort = destPort;
|
|
||||||
}
|
|
||||||
public Long getCfgId() {
|
|
||||||
return cfgId;
|
|
||||||
}
|
|
||||||
public void setCfgId(Long cfgId) {
|
|
||||||
this.cfgId = cfgId;
|
|
||||||
}
|
|
||||||
@ExcelField(title="direction",align=2,sort=8)
|
|
||||||
public Integer getDirection() {
|
|
||||||
return direction;
|
|
||||||
}
|
|
||||||
public void setDirection(Integer direction) {
|
|
||||||
this.direction = direction;
|
|
||||||
}
|
|
||||||
@ExcelField(title="config_describe",align=2,sort=11)
|
|
||||||
public String getCfgDesc() {
|
|
||||||
return cfgDesc;
|
|
||||||
}
|
|
||||||
public void setCfgDesc(String cfgDesc) {
|
|
||||||
this.cfgDesc = cfgDesc;
|
|
||||||
}
|
|
||||||
@ExcelField(title="letter",align=2,sort=13)
|
|
||||||
public Integer getRequestId() {
|
|
||||||
return requestId;
|
|
||||||
}
|
|
||||||
public void setRequestId(Integer requestId) {
|
|
||||||
this.requestId = requestId;
|
|
||||||
}
|
|
||||||
public String getRequestName() {
|
|
||||||
return requestName;
|
|
||||||
}
|
|
||||||
public void setRequestName(String requestName) {
|
|
||||||
this.requestName = requestName;
|
|
||||||
}
|
|
||||||
public Integer getIsAreaEffective() {
|
|
||||||
return isAreaEffective;
|
|
||||||
}
|
|
||||||
public void setIsAreaEffective(Integer isAreaEffective) {
|
|
||||||
this.isAreaEffective = isAreaEffective;
|
|
||||||
}
|
|
||||||
@ExcelField(title="classification",align=2,sort=71)
|
|
||||||
public String getClassify() {
|
|
||||||
return classify;
|
|
||||||
}
|
|
||||||
public void setClassify(String classify) {
|
|
||||||
this.classify = classify;
|
|
||||||
}
|
|
||||||
@ExcelField(title="attribute",align=2,sort=72)
|
|
||||||
public String getAttribute() {
|
|
||||||
return attribute;
|
|
||||||
}
|
|
||||||
public void setAttribute(String attribute) {
|
|
||||||
this.attribute = attribute;
|
|
||||||
}
|
|
||||||
@ExcelField(title="label",align=2,sort=73)
|
|
||||||
public String getLable() {
|
|
||||||
return lable;
|
|
||||||
}
|
|
||||||
public void setLable(String lable) {
|
|
||||||
this.lable = lable;
|
|
||||||
}
|
|
||||||
public String getClassifyName() {
|
|
||||||
return classifyName;
|
|
||||||
}
|
|
||||||
public void setClassifyName(String classifyName) {
|
|
||||||
this.classifyName = classifyName;
|
|
||||||
}
|
|
||||||
public String getAttributeName() {
|
|
||||||
return attributeName;
|
|
||||||
}
|
|
||||||
public void setAttributeName(String attributeName) {
|
|
||||||
this.attributeName = attributeName;
|
|
||||||
}
|
|
||||||
public String getLableName() {
|
|
||||||
return lableName;
|
|
||||||
}
|
|
||||||
public void setLableName(String lableName) {
|
|
||||||
this.lableName = lableName;
|
|
||||||
}
|
|
||||||
// @ExcelField(title="area_effective",align=2,sort=70)
|
|
||||||
public String getAreaEffectiveIds() {
|
|
||||||
return areaEffectiveIds;
|
|
||||||
}
|
|
||||||
public void setAreaEffectiveIds(String areaEffectiveIds) {
|
|
||||||
this.areaEffectiveIds = areaEffectiveIds;
|
|
||||||
}
|
|
||||||
@ExcelField(title="protocol",align=2,sort=9)
|
|
||||||
public Integer getProtocol() {
|
|
||||||
return protocol;
|
|
||||||
}
|
|
||||||
public void setProtocol(Integer protocol) {
|
|
||||||
this.protocol = protocol;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
package com.nis.domain.configuration.template;
|
|
||||||
|
|
||||||
import com.nis.util.excel.ExcelField;
|
|
||||||
/**
|
|
||||||
* wx 将部分字段的标题改变,或者不需要的字段隐藏
|
|
||||||
* 隐藏方法,对于不需要的字段或者方法,Override该字段方法,但是@ExcelField注解不需要加上了
|
|
||||||
* @author dell
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class IpMultiplexPolicyTemplate extends IpCfgTemplate {
|
|
||||||
@Override
|
|
||||||
@ExcelField(title="IP",align=2,sort=3)
|
|
||||||
public String getSrcIpAddress() {
|
|
||||||
return super.getSrcIpAddress();
|
|
||||||
}
|
|
||||||
@ExcelField(title="port",align=2,sort=6)
|
|
||||||
@Override
|
|
||||||
public String getSrcPort() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getSrcPort();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@ExcelField(title="group_name",align=2,sort=75)
|
|
||||||
public Integer getDnsStrategyId() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getDnsStrategyId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRatelimit() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getRatelimit();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public String getDestPort() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getDestPort();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public String getDestIpAddress() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getDestIpAddress();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.nis.domain.configuration.template;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wx 将部分字段的标题改变,或者不需要的字段隐藏
|
|
||||||
* 隐藏方法,对于不需要的字段或者方法,Override该字段方法,但是@ExcelField注解不需要加上了
|
|
||||||
* @author dell
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class IpsecTemplate extends IpCfgTemplate {
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getIrType() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getIrType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getDnsStrategyId() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getDnsStrategyId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRatelimit() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getRatelimit();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
package com.nis.domain.configuration.template;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wx 将部分字段的标题改变,或者不需要的字段隐藏
|
|
||||||
* 隐藏方法,对于不需要的字段或者方法,Override该字段方法,但是@ExcelField注解不需要加上了
|
|
||||||
* @author dell
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class TunnelIpTemplate extends IpCfgTemplate {
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getIrType() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getIrType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getDnsStrategyId() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getDnsStrategyId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRatelimit() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getRatelimit();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getProtocol() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
package com.nis.domain.configuration.template;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wx 将部分字段的标题改变,或者不需要的字段隐藏
|
|
||||||
* 隐藏方法,对于不需要的字段或者方法,Override该字段方法,但是@ExcelField注解不需要加上了
|
|
||||||
* @author dell
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class WhiteListIpTemplate extends IpCfgTemplate {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getDirection() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getProtocol() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getIrType() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getIrType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getDnsStrategyId() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getDnsStrategyId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getRequestId() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getRequestId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getClassify() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getClassify();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAttribute() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getAttribute();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getLable() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getLable();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRatelimit() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return super.getRatelimit();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -30,13 +30,15 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
|||||||
@Expose
|
@Expose
|
||||||
private Integer protocol; //protocol 协议 int N 6表示tcp,17表示udp,0表示任意
|
private Integer protocol; //protocol 协议 int N 6表示tcp,17表示udp,0表示任意
|
||||||
@Expose
|
@Expose
|
||||||
private Integer ipPattern; //ip格式
|
private Integer srcIpPattern; //ip格式
|
||||||
|
private Integer destIpPattern; //ip格式
|
||||||
@Expose
|
@Expose
|
||||||
private String srcIpAddress; //源(客户端)IP地址
|
private String srcIpAddress; //源(客户端)IP地址
|
||||||
@Expose
|
@Expose
|
||||||
private String destIpAddress; //目的(服务器)IP地址
|
private String destIpAddress; //目的(服务器)IP地址
|
||||||
@Expose
|
@Expose
|
||||||
private Integer portPattern; //端口格式
|
private Integer srcPortPattern; //端口格式
|
||||||
|
private Integer destPortPattern; //端口格式
|
||||||
@Expose
|
@Expose
|
||||||
private String srcPort; //源(客户端)端口
|
private String srcPort; //源(客户端)端口
|
||||||
@Expose
|
@Expose
|
||||||
@@ -114,19 +116,33 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
|||||||
public void setDestPort(String destPort) {
|
public void setDestPort(String destPort) {
|
||||||
this.destPort = destPort;
|
this.destPort = destPort;
|
||||||
}
|
}
|
||||||
@ExcelField(title="ip_pattern",align=2,sort=21,fieldType=Integer.class)
|
@ExcelField(title="src_ip_pattern",align=2,sort=21,fieldType=Integer.class)
|
||||||
public Integer getIpPattern() {
|
public Integer getSrcIpPattern() {
|
||||||
return ipPattern;
|
return srcIpPattern;
|
||||||
}
|
}
|
||||||
public void setIpPattern(Integer ipPattern) {
|
public void setSrcIpPattern(Integer srcIpPattern) {
|
||||||
this.ipPattern = ipPattern;
|
this.srcIpPattern = srcIpPattern;
|
||||||
}
|
}
|
||||||
@ExcelField(title="port_pattern",align=2,sort=40,fieldType=Integer.class)
|
@ExcelField(title="dest_ip_pattern",align=2,sort=22,fieldType=Integer.class)
|
||||||
public Integer getPortPattern() {
|
public Integer getDestIpPattern() {
|
||||||
return portPattern;
|
return destIpPattern;
|
||||||
}
|
}
|
||||||
public void setPortPattern(Integer portPattern) {
|
public void setDestIpPattern(Integer destIpPattern) {
|
||||||
this.portPattern = portPattern;
|
this.destIpPattern = destIpPattern;
|
||||||
|
}
|
||||||
|
@ExcelField(title="src_port_pattern",align=2,sort=40,fieldType=Integer.class)
|
||||||
|
public Integer getSrcPortPattern() {
|
||||||
|
return srcPortPattern;
|
||||||
|
}
|
||||||
|
public void setSrcPortPattern(Integer srcPortPattern) {
|
||||||
|
this.srcPortPattern = srcPortPattern;
|
||||||
|
}
|
||||||
|
@ExcelField(title="dest_port_pattern",align=2,sort=41,fieldType=Integer.class)
|
||||||
|
public Integer getDestPortPattern() {
|
||||||
|
return destPortPattern;
|
||||||
|
}
|
||||||
|
public void setDestPortPattern(Integer destPortPattern) {
|
||||||
|
this.destPortPattern = destPortPattern;
|
||||||
}
|
}
|
||||||
@ExcelField(title="direction",align=2,sort=110)
|
@ExcelField(title="direction",align=2,sort=110)
|
||||||
public Integer getDirection() {
|
public Integer getDirection() {
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ public class ScheduleCfgJob implements Job {
|
|||||||
Calendar invalidCal=Calendar.getInstance();
|
Calendar invalidCal=Calendar.getInstance();
|
||||||
invalidCal.setTime(invalidTime);
|
invalidCal.setTime(invalidTime);
|
||||||
invalidCal.add(Calendar.MINUTE, 2);
|
invalidCal.add(Calendar.MINUTE, 2);
|
||||||
long invalidTimes=validStartCal.getTime().getTime();
|
long invalidTimes=invalidCal.getTime().getTime();
|
||||||
long currentTimes=new Date().getTime();
|
long currentTimes=new Date().getTime();
|
||||||
//开始时间设置为今天已过时,则将开始时间加上周期
|
//开始时间设置为今天已过时,则将开始时间加上周期
|
||||||
if((currentTimes-validStartTimes) > 0) {
|
if((currentTimes-validStartTimes) > 0) {
|
||||||
|
|||||||
@@ -395,31 +395,45 @@ public class ConfigConvertUtil {
|
|||||||
*/
|
*/
|
||||||
public static List<IpCfg> ipConvert(IpCfg dstIp, BaseIpCfg srcIp) {
|
public static List<IpCfg> ipConvert(IpCfg dstIp, BaseIpCfg srcIp) {
|
||||||
List<IpCfg> ipConvertList = Lists.newArrayList();
|
List<IpCfg> ipConvertList = Lists.newArrayList();
|
||||||
boolean isRange = ((srcIp.getIpPattern() != null && srcIp.getIpPattern() == 2)
|
List<IpCfg> tempList = Lists.newArrayList();
|
||||||
|| (srcIp.getSrcIpAddress() != null && srcIp.getSrcIpAddress().indexOf("-") > -1)
|
List<IpCfg> tempList1 = Lists.newArrayList();
|
||||||
|| (srcIp.getDestIpAddress() != null && srcIp.getDestIpAddress().indexOf("-") > -1));
|
if (srcIp.getIpType().equals(4)) {// IP V4
|
||||||
if (isRange) {
|
if(srcIp.getSrcIpPattern().equals(2)) {//源IP范围
|
||||||
List<IpCfg> tempList = Lists.newArrayList();
|
if (srcIp.getSrcIpAddress() != null) {
|
||||||
List<IpCfg> tempList1 = Lists.newArrayList();
|
String startIpPart = srcIp.getSrcIpAddress().split("-")[0];
|
||||||
if (srcIp.getIpType().intValue() == 4) {
|
String endIpPart = srcIp.getSrcIpAddress().split("-")[1];
|
||||||
if (srcIp.getSrcIpAddress() != null) {
|
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
||||||
String startIpPart = srcIp.getSrcIpAddress().split("-")[0];
|
Integer endNum = Integer.parseInt(endIpPart.split("\\.")[3]);
|
||||||
String endIpPart = srcIp.getSrcIpAddress().split("-")[1];
|
for (int i = startNum; i <= endNum; i++) {
|
||||||
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
IpCfg tempIp = new IpCfg();
|
||||||
Integer endNum = Integer.parseInt(endIpPart.split("\\.")[3]);
|
BeanUtils.copyProperties(dstIp, tempIp);
|
||||||
for (int i = startNum; i <= endNum; i++) {
|
tempIp.setSrcIp(startIpPart.substring(0, startIpPart.lastIndexOf(".") + 1) + i);
|
||||||
IpCfg tempIp = new IpCfg();
|
tempIp.setSrcIpMask("255.255.255.255");
|
||||||
BeanUtils.copyProperties(dstIp, tempIp);
|
tempList.add(tempIp);
|
||||||
tempIp.setSrcIp(startIpPart.substring(0, startIpPart.lastIndexOf(".") + 1) + i);
|
}
|
||||||
tempIp.setSrcIpMask("255.255.255.255");
|
}else {
|
||||||
tempList.add(tempIp);
|
dstIp.setSrcIp("0.0.0.0");
|
||||||
|
dstIp.setSrcIpMask("255.255.255.255");
|
||||||
|
tempList.add(dstIp);
|
||||||
}
|
}
|
||||||
|
}else if(srcIp.getSrcIpPattern().equals(1)){
|
||||||
|
Integer srcMaskNum = Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]);
|
||||||
|
if (srcMaskNum == 0) {
|
||||||
|
dstIp.setSrcIpMask("0.0.0.0");
|
||||||
} else {
|
} else {
|
||||||
dstIp.setSrcIp("0.0.0.0");
|
dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum));
|
||||||
dstIp.setSrcIpMask("255.255.255.255");
|
|
||||||
tempList.add(dstIp);
|
|
||||||
}
|
}
|
||||||
if (srcIp.getDestIpAddress() != null) {
|
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||||
|
tempList.add(dstIp);
|
||||||
|
}else if(srcIp.getSrcIpPattern().equals(3)){
|
||||||
|
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||||
|
dstIp.setSrcIpMask("255.255.255.255");
|
||||||
|
tempList.add(dstIp);
|
||||||
|
}else {
|
||||||
|
throw new RuntimeException("Unsupported IP Pattern " + srcIp.getSrcIpPattern());
|
||||||
|
}
|
||||||
|
if (srcIp.getDestIpAddress() != null) {
|
||||||
|
if(srcIp.getDestIpPattern().equals(2)) {
|
||||||
String startIpPart = srcIp.getDestIpAddress().split("-")[0];
|
String startIpPart = srcIp.getDestIpAddress().split("-")[0];
|
||||||
String endIpPart = srcIp.getDestIpAddress().split("-")[1];
|
String endIpPart = srcIp.getDestIpAddress().split("-")[1];
|
||||||
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
||||||
@@ -439,217 +453,93 @@ public class ConfigConvertUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
tempList.clear();
|
tempList.clear();
|
||||||
} else {
|
}else if(srcIp.getDestIpPattern().equals(1)) {
|
||||||
|
Integer dstMaskNum = Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]);
|
||||||
for (IpCfg _cfg : tempList) {
|
for (IpCfg _cfg : tempList) {
|
||||||
_cfg.setDstIp("0.0.0.0");
|
IpCfg tempIp = new IpCfg();
|
||||||
_cfg.setSrcIpMask("255.255.255.255");
|
BeanUtils.copyProperties(_cfg, tempIp);
|
||||||
convertPortValues(_cfg, srcIp);
|
if (dstMaskNum == 0) {
|
||||||
|
tempIp.setDstIpMask("0.0.0.0");
|
||||||
|
} else {
|
||||||
|
tempIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));
|
||||||
|
}
|
||||||
|
tempIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||||
|
if (!tempIp.getSrcIp().equals(tempIp.getDstIp())) {
|
||||||
|
// 处理
|
||||||
|
convertPortValues(tempIp, srcIp);
|
||||||
|
tempList1.add(tempIp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
tempList.clear();
|
||||||
|
}else {
|
||||||
|
for (IpCfg _cfg : tempList) {
|
||||||
|
IpCfg tempIp = new IpCfg();
|
||||||
|
BeanUtils.copyProperties(_cfg, tempIp);
|
||||||
|
tempIp.setDstIp(srcIp.getDestIpAddress());
|
||||||
|
if (!tempIp.getSrcIp().equals(tempIp.getDstIp())) {
|
||||||
|
tempIp.setDstIpMask("255.255.255.255");
|
||||||
|
// 处理
|
||||||
|
convertPortValues(tempIp, srcIp);
|
||||||
|
tempList1.add(tempIp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tempList.clear();
|
||||||
}
|
}
|
||||||
if (tempList1.size() > 0) {
|
}else {
|
||||||
ipConvertList.addAll(tempList1);
|
for (IpCfg _cfg : tempList) {
|
||||||
} else {
|
_cfg.setDstIp("0.0.0.0");
|
||||||
ipConvertList.addAll(tempList);
|
_cfg.setSrcIpMask("255.255.255.255");
|
||||||
|
convertPortValues(_cfg, srcIp);
|
||||||
}
|
}
|
||||||
} else if (srcIp.getIpType().intValue() == 6) {
|
}
|
||||||
if (srcIp.getSrcIpAddress() != null) {
|
if (tempList1.size() > 0) {
|
||||||
|
ipConvertList.addAll(tempList1);
|
||||||
|
} else {
|
||||||
|
ipConvertList.addAll(tempList);
|
||||||
|
}
|
||||||
|
}else if(srcIp.getIpType().equals(6)){// IP V6
|
||||||
|
if (srcIp.getSrcIpAddress() != null) {
|
||||||
|
if(srcIp.getSrcIpPattern().equals(2)) {
|
||||||
IPv6Address address1 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[0]);
|
IPv6Address address1 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[0]);
|
||||||
IPv6Address address2 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[1]);
|
IPv6Address address2 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[1]);
|
||||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
||||||
dstIp.setSrcIp(address1.toString());
|
dstIp.setSrcIp(address1.toString());
|
||||||
dstIp.setSrcIpMask(network.getNetmask().asAddress().toString());
|
dstIp.setSrcIpMask(network.getNetmask().asAddress().toString());
|
||||||
} else {
|
}else if(srcIp.getSrcIpPattern().equals(1)){// IP/掩码
|
||||||
dstIp.setSrcIp("::");
|
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getSrcIpAddress());
|
||||||
|
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||||
|
dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||||
|
}else {// IP
|
||||||
|
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
}
|
}
|
||||||
if (srcIp.getDestIpAddress() != null) {
|
} else {
|
||||||
|
dstIp.setSrcIp("::");
|
||||||
|
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
|
}
|
||||||
|
if (srcIp.getDestIpAddress() != null) {
|
||||||
|
if(srcIp.getDestIpPattern().equals(2)) {
|
||||||
IPv6Address address1 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[0]);
|
IPv6Address address1 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[0]);
|
||||||
IPv6Address address2 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[1]);
|
IPv6Address address2 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[1]);
|
||||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
||||||
dstIp.setDstIp(address1.toString());
|
dstIp.setDstIp(address1.toString());
|
||||||
dstIp.setDstIpMask(network.getNetmask().asAddress().toString());
|
dstIp.setDstIpMask(network.getNetmask().asAddress().toString());
|
||||||
} else {
|
}else if(srcIp.getDestIpPattern().equals(1)) {// IP/掩码
|
||||||
dstIp.setDstIp("::");
|
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getDestIpAddress());
|
||||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||||
}
|
dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||||
|
}else {// IP
|
||||||
ipConvertList.add(dstIp);
|
|
||||||
} else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getSrcIpAddress() != null) {
|
|
||||||
if (srcIp.getSrcIpAddress().indexOf("/") != -1) {
|
|
||||||
if (srcIp.getIpType() == 4 /* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
Integer srcMaskNum = Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]);
|
|
||||||
if (srcMaskNum == 0) {
|
|
||||||
dstIp.setSrcIpMask("0.0.0.0");
|
|
||||||
} else {
|
|
||||||
dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum));
|
|
||||||
}
|
|
||||||
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
|
||||||
dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
|
||||||
} /*
|
|
||||||
* else { Pattern
|
|
||||||
* patternV4Subnet=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP); Pattern
|
|
||||||
* patternV6Subnet=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP); Matcher
|
|
||||||
* matchernV4Subnet=patternV4Subnet.matcher(srcIp.getSrcIpAddress()); Matcher
|
|
||||||
* matcherV6Subnet=patternV6Subnet.matcher(srcIp.getSrcIpAddress());
|
|
||||||
* if(matchernV4Subnet.matches()) { Integer srcMaskNum =
|
|
||||||
* Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]); if(srcMaskNum==0){
|
|
||||||
* dstIp.setSrcIpMask("0.0.0.0"); }else{
|
|
||||||
* dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum)); }
|
|
||||||
* dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]); }else
|
|
||||||
* if(matcherV6Subnet.matches()){ IPv6Network strangeNetwork =
|
|
||||||
* IPv6Network.fromString(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
|
||||||
* dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString()); }else
|
|
||||||
* { throw new RuntimeException("Invalid IP/subnet mask format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
|
||||||
} /*
|
|
||||||
* else {//all Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
|
||||||
* Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP); Matcher
|
|
||||||
* matcherV4=patternV4.matcher(srcIp.getSrcIpAddress()); Matcher
|
|
||||||
* matcherV6=patternV6.matcher(srcIp.getSrcIpAddress()); if(matcherV4.matches())
|
|
||||||
* { dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIpMask("255.255.255.255"); }else if(matcherV6.matches()) {
|
|
||||||
* dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"); }else { throw
|
|
||||||
* new RuntimeException("Invalid IP format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
|
||||||
} /*
|
|
||||||
* else {//all dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIpMask("255.255.255.255"); }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (srcIp.getDestIpAddress() != null) {
|
|
||||||
if (srcIp.getDestIpAddress().indexOf("/") != -1) {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
Integer dstMaskNum = Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]);
|
|
||||||
if (dstMaskNum == 0) {
|
|
||||||
dstIp.setDstIpMask("0.0.0.0");
|
|
||||||
} else {
|
|
||||||
dstIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));
|
|
||||||
;
|
|
||||||
}
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
|
||||||
dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
|
||||||
} /*
|
|
||||||
* else { Pattern
|
|
||||||
* patternV4Subnet=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP); Pattern
|
|
||||||
* patternV6Subnet=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP); Matcher
|
|
||||||
* matchernV4Subnet=patternV4Subnet.matcher(srcIp.getDestIpAddress()); Matcher
|
|
||||||
* matcherV6Subnet=patternV6Subnet.matcher(srcIp.getDestIpAddress());
|
|
||||||
* if(matchernV4Subnet.matches()) { Integer dstMaskNum =
|
|
||||||
* Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]); if(dstMaskNum==0){
|
|
||||||
* dstIp.setDstIpMask("0.0.0.0"); }else{
|
|
||||||
* dstIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));; }
|
|
||||||
* dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]); }else
|
|
||||||
* if(matcherV6Subnet.matches()){ IPv6Network strangeNetwork =
|
|
||||||
* IPv6Network.fromString(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
|
||||||
* dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString()); }else
|
|
||||||
* { throw new RuntimeException("Invalid IP/subnet mask format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
|
||||||
} /*
|
|
||||||
* else {//all Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
|
||||||
* Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP); Matcher
|
|
||||||
* matcherV4=patternV4.matcher(srcIp.getDestIpAddress()); Matcher
|
|
||||||
* matcherV6=patternV6.matcher(srcIp.getDestIpAddress());
|
|
||||||
* if(matcherV4.matches()) { dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIpMask("255.255.255.255"); }else if(matcherV6.matches()) {
|
|
||||||
* dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"); }else { throw
|
|
||||||
* new RuntimeException("invalid ip format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
} /*
|
|
||||||
* else {//all dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIpMask("255.255.255.255"); }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (srcIp.getSrcPort() != null) {
|
|
||||||
if (srcIp.getSrcPort().indexOf("/") != -1) {
|
|
||||||
String srcMaskNum = srcIp.getSrcPort().split("/")[1];
|
|
||||||
dstIp.setSrcPortMask(srcMaskNum);
|
|
||||||
dstIp.setSrcPort(srcIp.getSrcPort().split("/")[0]);
|
|
||||||
} else {
|
|
||||||
dstIp.setSrcPort(srcIp.getSrcPort());
|
|
||||||
dstIp.setSrcPortMask("65535");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dstIp.setSrcPort("0");
|
dstIp.setDstIp("::");
|
||||||
dstIp.setSrcPortMask("65535");
|
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
}
|
|
||||||
if (srcIp.getDestPort() != null) {
|
|
||||||
if (srcIp.getDestPort().indexOf("/") != -1) {
|
|
||||||
String dstMaskNum = srcIp.getDestPort().split("/")[1];
|
|
||||||
dstIp.setDstPortMask(dstMaskNum);
|
|
||||||
dstIp.setDstPort(srcIp.getDestPort().split("/")[0]);
|
|
||||||
} else {
|
|
||||||
dstIp.setDstPort(srcIp.getDestPort());
|
|
||||||
dstIp.setDstPortMask("65535");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dstIp.setDstPort("0");
|
|
||||||
dstIp.setDstPortMask("65535");
|
|
||||||
}
|
}
|
||||||
|
convertPortValues(dstIp, srcIp);
|
||||||
ipConvertList.add(dstIp);
|
ipConvertList.add(dstIp);
|
||||||
|
}else {
|
||||||
|
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
||||||
}
|
}
|
||||||
return ipConvertList;
|
return ipConvertList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ public class ConfigServiceUtil {
|
|||||||
result=response.readEntity(String.class);
|
result=response.readEntity(String.class);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("request_service_failed",e);
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
if(response != null && response.getStatus() == 200){
|
if(response != null && response.getStatus() == 200){
|
||||||
@@ -189,6 +190,7 @@ public class ConfigServiceUtil {
|
|||||||
result=response.readEntity(String.class);
|
result=response.readEntity(String.class);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
if(response != null && response.getStatus() == 200){
|
if(response != null && response.getStatus() == 200){
|
||||||
@@ -234,6 +236,7 @@ public class ConfigServiceUtil {
|
|||||||
result=response.readEntity(String.class);
|
result=response.readEntity(String.class);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
if(response != null && response.getStatus() == 200){
|
if(response != null && response.getStatus() == 200){
|
||||||
@@ -243,6 +246,7 @@ public class ConfigServiceUtil {
|
|||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
logger.error("postCallbackCfg()",e);
|
logger.error("postCallbackCfg()",e);
|
||||||
throw e;
|
throw e;
|
||||||
}finally {
|
}finally {
|
||||||
@@ -278,6 +282,7 @@ public class ConfigServiceUtil {
|
|||||||
result=response.readEntity(String.class);
|
result=response.readEntity(String.class);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
if(response != null && response.getStatus() == 200){
|
if(response != null && response.getStatus() == 200){
|
||||||
@@ -325,6 +330,7 @@ public class ConfigServiceUtil {
|
|||||||
result=response.readEntity(String.class);
|
result=response.readEntity(String.class);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
if(response != null && response.getStatus() == 200){
|
if(response != null && response.getStatus() == 200){
|
||||||
@@ -374,6 +380,7 @@ public class ConfigServiceUtil {
|
|||||||
result=response.readEntity(String.class);
|
result=response.readEntity(String.class);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
if(response !=null && response.getStatus() == 200){
|
if(response !=null && response.getStatus() == 200){
|
||||||
@@ -417,6 +424,7 @@ public class ConfigServiceUtil {
|
|||||||
// bean = (ToMaatResult) JSONObject.toBean(resObject,ToMaatResult.class);
|
// bean = (ToMaatResult) JSONObject.toBean(resObject,ToMaatResult.class);
|
||||||
//获取响应结果
|
//获取响应结果
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -451,6 +459,7 @@ public class ConfigServiceUtil {
|
|||||||
result=response.readEntity(String.class);
|
result=response.readEntity(String.class);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
}
|
}
|
||||||
if(response !=null && response.getStatus() == 200){
|
if(response !=null && response.getStatus() == 200){
|
||||||
|
|||||||
@@ -322,56 +322,18 @@ public final class Constants {
|
|||||||
// public static final boolean IS_USE_HIVE_DB =
|
// public static final boolean IS_USE_HIVE_DB =
|
||||||
// Configurations.getBooleanProperty("isUseHiveDb", true);
|
// Configurations.getBooleanProperty("isUseHiveDb", true);
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否获取数据中心查询记录的总条数
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static final boolean IS_GET_HIVECOUNT = Configurations.getBooleanProperty("isGetHiveCount", true);
|
|
||||||
/**
|
|
||||||
* 是否获取数据中心[神通]查询记录的总条数
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static final boolean IS_SELECT_CLUSTER = Configurations.getBooleanProperty("isSelectCluster", false);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 神通数据库A的数据最早时间
|
|
||||||
*/
|
|
||||||
public static final Long CLUSTER_A_START_TIME = Configurations.getLongProperty("clusterAStartTime", new Date().getTime());
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 神通数据库B的数据最早时间
|
|
||||||
*/
|
|
||||||
public static final Long CLUSTER_B_START_TIME = Configurations.getLongProperty("clusterBStartTime", new Date().getTime());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每次获取数据中心多少条数据,咱们在对获取的数据进行分页处理
|
* 每次获取数据中心多少条数据,咱们在对获取的数据进行分页处理
|
||||||
*/
|
*/
|
||||||
public static final Long EVERY_GETHIVEDATANUM = Configurations.getLongProperty("everyGetHiveDataNum", 10000);
|
public static final Long EVERY_GETHIVEDATANUM = Configurations.getLongProperty("everyGetHiveDataNum", 10000);
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否开启基础校验
|
|
||||||
*/
|
|
||||||
public static final boolean BASE_VALIDATE = Configurations.getBooleanProperty("baseValidate", true);
|
|
||||||
|
|
||||||
public static final Long DATACENTER_TIME = Configurations.getLongProperty("dataCenterTime", 48);
|
public static final Long DATACENTER_TIME = Configurations.getLongProperty("dataCenterTime", 48);
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否开启业务校验
|
|
||||||
*/
|
|
||||||
public static final boolean SERVICE_VALIDATE = Configurations.getBooleanProperty("serviceValidate", true);
|
|
||||||
/**
|
|
||||||
* 日志本地存储时间
|
|
||||||
*/
|
|
||||||
public static final Long LOG_LOCAL_TIME = Configurations.getLongProperty("logLocalTime", 48);
|
|
||||||
/**
|
|
||||||
* 实时统计默认时间
|
|
||||||
*/
|
|
||||||
public static final Long REPORT_LOCAL_TIME = Configurations.getLongProperty("reportLocalTime", 1);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志是否从hive中查询
|
* 日志是否从hive中查询
|
||||||
*/
|
*/
|
||||||
public static final boolean SEL_FROM_HIVE = Configurations.getBooleanProperty("selFromHive", true);
|
|
||||||
public static final boolean ONLY_SEL_FROM_HIVE = Configurations.getBooleanProperty("onlySelFromHive", true);
|
public static final boolean ONLY_SEL_FROM_HIVE = Configurations.getBooleanProperty("onlySelFromHive", true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -385,12 +347,6 @@ public final class Constants {
|
|||||||
*/
|
*/
|
||||||
public static final String SEARCH_DATEFORMAT = Configurations.getStringProperty("search.dateformat",
|
public static final String SEARCH_DATEFORMAT = Configurations.getStringProperty("search.dateformat",
|
||||||
"yyyy-MM-dd HH:mm:ss");
|
"yyyy-MM-dd HH:mm:ss");
|
||||||
public static final String SEARCH_ES_HOSTANDPORT_A = Configurations.getStringProperty("search.eshostandport_A",
|
|
||||||
null);
|
|
||||||
public static final String SEARCH_ES_HOSTANDPORT_B = Configurations.getStringProperty("search.eshostandport_B",
|
|
||||||
null);
|
|
||||||
public static final String SEARCH_ES_HOSTANDPORT_C = Configurations.getStringProperty("search.eshostandport_C",
|
|
||||||
null);
|
|
||||||
/**
|
/**
|
||||||
* 数据中心A版数据库名称,程序中每次查询时使用的数据库名称 use HIVEADBNAME
|
* 数据中心A版数据库名称,程序中每次查询时使用的数据库名称 use HIVEADBNAME
|
||||||
*/
|
*/
|
||||||
@@ -407,6 +363,7 @@ public final class Constants {
|
|||||||
public static final String FILE_UPLOAD_CFG = Configurations.getStringProperty("fileUploadCfg","fileUploadSources");
|
public static final String FILE_UPLOAD_CFG = Configurations.getStringProperty("fileUploadCfg","fileUploadSources");
|
||||||
public static final String FILE_DIGEST_CFG=Configurations.getStringProperty("fileDigestCfg","fileDigestSources");
|
public static final String FILE_DIGEST_CFG=Configurations.getStringProperty("fileDigestCfg","fileDigestSources");
|
||||||
public static final String CONFIG_ID_SOURCES=Configurations.getStringProperty("configIdSources","configPzIdSources");
|
public static final String CONFIG_ID_SOURCES=Configurations.getStringProperty("configIdSources","configPzIdSources");
|
||||||
|
public static final String DEL_ALL_CFG=Configurations.getStringProperty("delAllCfg","delAllConfig");
|
||||||
//日志查询接口URL
|
//日志查询接口URL
|
||||||
public static final String LOG_BASE_URL = Configurations.getStringProperty("logBaseUrl","");
|
public static final String LOG_BASE_URL = Configurations.getStringProperty("logBaseUrl","");
|
||||||
public static final String NTC_SERVICE_REPORT=Configurations.getStringProperty("ntcServiceReport","ntcServiceReport");
|
public static final String NTC_SERVICE_REPORT=Configurations.getStringProperty("ntcServiceReport","ntcServiceReport");
|
||||||
|
|||||||
@@ -306,6 +306,13 @@ public class ExcelCsv {
|
|||||||
dict="block_drop";
|
dict="block_drop";
|
||||||
val = msgProp.getProperty(dict,dict);
|
val = msgProp.getProperty(dict,dict);
|
||||||
}
|
}
|
||||||
|
if ("action".equals(ef.title()) && dict.equals("action_reject")
|
||||||
|
&& (Reflections.invokeGetter(e, "service").toString().equals("35")
|
||||||
|
|| Reflections.invokeGetter(e, "service").toString().equals("33")
|
||||||
|
|| Reflections.invokeGetter(e, "service").toString().equals("36"))) {
|
||||||
|
dict="block_drop";
|
||||||
|
val = msgProp.getProperty(dict,dict);
|
||||||
|
}
|
||||||
//ip spoofing redirect动作修改为Spoofing
|
//ip spoofing redirect动作修改为Spoofing
|
||||||
if(ef.title().equals("block_type")
|
if(ef.title().equals("block_type")
|
||||||
&& (Reflections.invokeGetter(e, "serviceId").toString().equals("518"))) {
|
&& (Reflections.invokeGetter(e, "serviceId").toString().equals("518"))) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
|
|||||||
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
@@ -265,6 +266,9 @@ public class ExportExcel {
|
|||||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||||
index++;
|
index++;
|
||||||
//1、非空
|
//1、非空
|
||||||
|
commentStr=commentStr+"▶"+msgProp.getProperty("https_url_format_tip")+"\n";
|
||||||
|
index++;
|
||||||
|
//1、非空
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("required")+"\n";
|
commentStr=commentStr+"▶"+msgProp.getProperty("required")+"\n";
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
@@ -597,25 +601,28 @@ public class ExportExcel {
|
|||||||
commentStr="";
|
commentStr="";
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
String[] ipPatterns=region.getConfigIpPattern().split(";");
|
||||||
if("client_ip".equals(headerStr)){
|
if("client_ip".equals(headerStr)){
|
||||||
|
Assert.isTrue(ipPatterns.length==2);
|
||||||
|
String srcIpPattern=ipPatterns[0];
|
||||||
if(((","+region.getConfigIpPortShow()+",").indexOf(",1,") > -1) ){
|
if(((","+region.getConfigIpPortShow()+",").indexOf(",1,") > -1) ){
|
||||||
commentStr="";
|
commentStr="";
|
||||||
if((","+region.getConfigIpType()+",").indexOf(",4,") > -1){
|
if((","+region.getConfigIpType()+",").indexOf(",4,") > -1){
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",3,") > -1){
|
if((","+srcIpPattern+",").indexOf(",3,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_VALUE+"(IPv4)"+"\n";
|
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_VALUE+"(IPv4)"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV4_DEFAULT_IP_VALUE;
|
defaultValue=Constants.IPV4_DEFAULT_IP_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){
|
if((","+srcIpPattern+",").indexOf(",2,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip")+")"+"\n";
|
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip")+")"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV4_DEFAULT_IP_RANGE_VALUE;
|
defaultValue=Constants.IPV4_DEFAULT_IP_RANGE_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){
|
if((","+srcIpPattern+",").indexOf(",1,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")"+"\n";
|
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV4_DEFAULT_IP_SUBNET_VALUE;
|
defaultValue=Constants.IPV4_DEFAULT_IP_SUBNET_VALUE;
|
||||||
@@ -624,21 +631,21 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpType()+",").indexOf(",6,") > -1){
|
if((","+region.getConfigIpType()+",").indexOf(",6,") > -1){
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",3,") > -1){
|
if((","+srcIpPattern+",").indexOf(",3,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_VALUE+"(IPv6)"+"\n";
|
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_VALUE+"(IPv6)"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV6_DEFAULT_IP_VALUE;
|
defaultValue=Constants.IPV6_DEFAULT_IP_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){
|
if((","+srcIpPattern+",").indexOf(",2,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")"+"\n";
|
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV6_DEFAULT_IP_RANGE_VALUE;
|
defaultValue=Constants.IPV6_DEFAULT_IP_RANGE_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){
|
if((","+srcIpPattern+",").indexOf(",1,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")"+"\n\n";
|
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")"+"\n\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV6_DEFAULT_IP_SUBNET_VALUE;
|
defaultValue=Constants.IPV6_DEFAULT_IP_SUBNET_VALUE;
|
||||||
@@ -687,12 +694,12 @@ public class ExportExcel {
|
|||||||
,msgProp.getProperty("serverip"))+"\n";
|
,msgProp.getProperty("serverip"))+"\n";
|
||||||
index++;
|
index++;
|
||||||
index++;
|
index++;
|
||||||
commentStr=commentStr+"▶"+String.format(msgProp.getProperty("the_same_ip_type_pattern"))+"\n";
|
commentStr=commentStr+"▶"+String.format(msgProp.getProperty("the_same_ip_type"))+"\n";
|
||||||
index++;
|
index++;
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
//4、IP Range 开始IP和结束IP必须在同一网段
|
//4、IP Range 开始IP和结束IP必须在同一网段
|
||||||
if(((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1)){
|
if(((","+srcIpPattern+",").indexOf(",2,") > -1)){
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_bit_field")+"\n";
|
commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_bit_field")+"\n";
|
||||||
index++;
|
index++;
|
||||||
index++;
|
index++;
|
||||||
@@ -703,7 +710,7 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//6、IPv4 Mask 掩码范围16-32
|
//6、IPv4 Mask 掩码范围16-32
|
||||||
if(((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1)){
|
if(((","+srcIpPattern+",").indexOf(",1,") > -1)){
|
||||||
if(((","+region.getConfigIpType()+",").indexOf(",4,") > -1)){
|
if(((","+region.getConfigIpType()+",").indexOf(",4,") > -1)){
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("ipv4_subnet_tip")+","+msgProp.getProperty("ipv4_mask_range_tip")+"\n";
|
commentStr=commentStr+"▶"+msgProp.getProperty("ipv4_subnet_tip")+","+msgProp.getProperty("ipv4_mask_range_tip")+"\n";
|
||||||
index++;
|
index++;
|
||||||
@@ -719,24 +726,25 @@ public class ExportExcel {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if("server_ip".equals(headerStr)){
|
if("server_ip".equals(headerStr)){
|
||||||
|
String destIpPattern=ipPatterns[1];
|
||||||
if((","+region.getConfigIpPortShow()+",").indexOf(",3,") > -1){
|
if((","+region.getConfigIpPortShow()+",").indexOf(",3,") > -1){
|
||||||
commentStr="";
|
commentStr="";
|
||||||
if((","+region.getConfigIpType()+",").indexOf(",4,") > -1){
|
if((","+region.getConfigIpType()+",").indexOf(",4,") > -1){
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",3,") > -1){
|
if((","+destIpPattern+",").indexOf(",3,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_VALUE+"(IPv4)"+"\n";
|
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_VALUE+"(IPv4)"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV4_DEFAULT_IP_VALUE;
|
defaultValue=Constants.IPV4_DEFAULT_IP_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){
|
if((","+destIpPattern+",").indexOf(",2,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip")+")"+"\n";
|
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip")+")"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV4_DEFAULT_IP_RANGE_VALUE;
|
defaultValue=Constants.IPV4_DEFAULT_IP_RANGE_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){
|
if((","+destIpPattern+",").indexOf(",1,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")"+"\n";
|
commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV4_DEFAULT_IP_SUBNET_VALUE;
|
defaultValue=Constants.IPV4_DEFAULT_IP_SUBNET_VALUE;
|
||||||
@@ -745,21 +753,21 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpType()+",").indexOf(",6,") > -1){
|
if((","+region.getConfigIpType()+",").indexOf(",6,") > -1){
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",3,") > -1){
|
if((","+destIpPattern+",").indexOf(",3,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_VALUE+"(IPv6)"+"\n";
|
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_VALUE+"(IPv6)"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV6_DEFAULT_IP_VALUE;
|
defaultValue=Constants.IPV6_DEFAULT_IP_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){
|
if((","+destIpPattern+",").indexOf(",2,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")"+"\n";
|
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV6_DEFAULT_IP_RANGE_VALUE;
|
defaultValue=Constants.IPV6_DEFAULT_IP_RANGE_VALUE;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){
|
if((","+destIpPattern+",").indexOf(",1,") > -1){
|
||||||
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")"+"\n\n";
|
commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")"+"\n\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.IPV6_DEFAULT_IP_SUBNET_VALUE;
|
defaultValue=Constants.IPV6_DEFAULT_IP_SUBNET_VALUE;
|
||||||
@@ -792,12 +800,12 @@ public class ExportExcel {
|
|||||||
,msgProp.getProperty("serverip"))+"\n";
|
,msgProp.getProperty("serverip"))+"\n";
|
||||||
index++;
|
index++;
|
||||||
index++;
|
index++;
|
||||||
commentStr=commentStr+"▶"+String.format(msgProp.getProperty("the_same_ip_type_pattern"))+"\n";
|
commentStr=commentStr+"▶"+String.format(msgProp.getProperty("the_same_ip_type"))+"\n";
|
||||||
index++;
|
index++;
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
//4、IP Range 开始IP和结束IP必须在同一网段
|
//4、IP Range 开始IP和结束IP必须在同一网段
|
||||||
if(((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1)){
|
if(((","+destIpPattern+",").indexOf(",2,") > -1)){
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_bit_field")+"\n";
|
commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_bit_field")+"\n";
|
||||||
index++;
|
index++;
|
||||||
index++;
|
index++;
|
||||||
@@ -808,7 +816,7 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//6、IPv4 Mask 掩码范围16-32
|
//6、IPv4 Mask 掩码范围16-32
|
||||||
if(((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1)){
|
if(((","+destIpPattern+",").indexOf(",1,") > -1)){
|
||||||
if(((","+region.getConfigIpType()+",").indexOf(",4,") > -1)){
|
if(((","+region.getConfigIpType()+",").indexOf(",4,") > -1)){
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("ipv4_subnet_tip")+","+msgProp.getProperty("ipv4_mask_range_tip")+"\n";
|
commentStr=commentStr+"▶"+msgProp.getProperty("ipv4_subnet_tip")+","+msgProp.getProperty("ipv4_mask_range_tip")+"\n";
|
||||||
index++;
|
index++;
|
||||||
@@ -834,17 +842,20 @@ public class ExportExcel {
|
|||||||
}else{
|
}else{
|
||||||
protocol=region.getConfigProtocol();
|
protocol=region.getConfigProtocol();
|
||||||
}
|
}
|
||||||
|
String[] portPatterns=region.getConfigPortPattern().split(";");
|
||||||
|
Assert.isTrue(portPatterns.length==2);
|
||||||
if("client_port".equals(headerStr)){
|
if("client_port".equals(headerStr)){
|
||||||
|
String srcPortPattern=portPatterns[0];
|
||||||
if(((","+region.getConfigIpPortShow()+",").indexOf(",2,") > -1)){
|
if(((","+region.getConfigIpPortShow()+",").indexOf(",2,") > -1)){
|
||||||
commentStr="";
|
commentStr="";
|
||||||
if((","+region.getConfigPortPattern()+",").indexOf(",1,") > -1){
|
if((","+srcPortPattern+",").indexOf(",1,") > -1){
|
||||||
commentStr=commentStr+Constants.PORT_DEFAULT+"(Port)"+"\n";
|
commentStr=commentStr+Constants.PORT_DEFAULT+"(Port)"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.PORT_DEFAULT;
|
defaultValue=Constants.PORT_DEFAULT;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigPortPattern()+",").indexOf(",2,") > -1){
|
if((","+srcPortPattern+",").indexOf(",2,") > -1){
|
||||||
commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_mask")+")"+"\n\n";
|
commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_mask")+")"+"\n\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.PORT_MASK_DEFAULT;
|
defaultValue=Constants.PORT_MASK_DEFAULT;
|
||||||
@@ -870,11 +881,11 @@ public class ExportExcel {
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
//2、源端口、目的端口格式必须一致
|
//2、源端口、目的端口格式必须一致
|
||||||
if(((","+region.getConfigIpPortShow()+",").indexOf(",2,") > -1) && ((","+region.getConfigIpPortShow()+",").indexOf(",4,") > -1)){
|
// if(((","+region.getConfigIpPortShow()+",").indexOf(",2,") > -1) && ((","+region.getConfigIpPortShow()+",").indexOf(",4,") > -1)){
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("the_same_port_pattern")+"\n";
|
// commentStr=commentStr+"▶"+msgProp.getProperty("the_same_port_pattern")+"\n";
|
||||||
index++;
|
// index++;
|
||||||
index++;
|
// index++;
|
||||||
}
|
// }
|
||||||
//3、端口和端口掩码范围0-65535
|
//3、端口和端口掩码范围0-65535
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("port_mask_comment_tip")+"\n";
|
commentStr=commentStr+"▶"+msgProp.getProperty("port_mask_comment_tip")+"\n";
|
||||||
index++;
|
index++;
|
||||||
@@ -909,16 +920,17 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("server_port".equals(headerStr)){
|
if("server_port".equals(headerStr)){
|
||||||
|
String destPortPattern=portPatterns[1];
|
||||||
if((","+region.getConfigIpPortShow()+",").indexOf(",4,") > -1){
|
if((","+region.getConfigIpPortShow()+",").indexOf(",4,") > -1){
|
||||||
commentStr="";
|
commentStr="";
|
||||||
if((","+region.getConfigPortPattern()+",").indexOf(",1,") > -1){
|
if((","+destPortPattern+",").indexOf(",1,") > -1){
|
||||||
commentStr=commentStr+Constants.PORT_DEFAULT+"(Port)"+"\n";
|
commentStr=commentStr+Constants.PORT_DEFAULT+"(Port)"+"\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.PORT_DEFAULT;
|
defaultValue=Constants.PORT_DEFAULT;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if((","+region.getConfigPortPattern()+",").indexOf(",2,") > -1){
|
if((","+destPortPattern+",").indexOf(",2,") > -1){
|
||||||
commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_mask")+")"+"\n\n";
|
commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_mask")+")"+"\n\n";
|
||||||
if(StringUtil.isEmpty(defaultValue)){
|
if(StringUtil.isEmpty(defaultValue)){
|
||||||
defaultValue=Constants.PORT_MASK_DEFAULT;
|
defaultValue=Constants.PORT_MASK_DEFAULT;
|
||||||
@@ -944,11 +956,11 @@ public class ExportExcel {
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
//2、源端口、目的端口格式必须一致
|
//2、源端口、目的端口格式必须一致
|
||||||
if(((","+region.getConfigIpPortShow()+",").indexOf(",2,") > -1) && ((","+region.getConfigIpPortShow()+",").indexOf(",4,") > -1)){
|
// if(((","+region.getConfigIpPortShow()+",").indexOf(",2,") > -1) && ((","+region.getConfigIpPortShow()+",").indexOf(",4,") > -1)){
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("the_same_port_pattern")+"\n";
|
// commentStr=commentStr+"▶"+msgProp.getProperty("the_same_port_pattern")+"\n";
|
||||||
index++;
|
// index++;
|
||||||
index++;
|
// index++;
|
||||||
}
|
// }
|
||||||
//3、端口和端口掩码范围0-65535
|
//3、端口和端口掩码范围0-65535
|
||||||
commentStr=commentStr+"▶"+msgProp.getProperty("port_mask_comment_tip")+"\n";
|
commentStr=commentStr+"▶"+msgProp.getProperty("port_mask_comment_tip")+"\n";
|
||||||
index++;
|
index++;
|
||||||
@@ -2299,6 +2311,13 @@ public class ExportExcel {
|
|||||||
dict="block_drop";
|
dict="block_drop";
|
||||||
val = msgProp.getProperty(dict,dict);
|
val = msgProp.getProperty(dict,dict);
|
||||||
}
|
}
|
||||||
|
if ("action".equals(ef.title()) && dict.equals("action_reject")
|
||||||
|
&& (Reflections.invokeGetter(e, "service").toString().equals("35")
|
||||||
|
|| Reflections.invokeGetter(e, "service").toString().equals("33")
|
||||||
|
|| Reflections.invokeGetter(e, "service").toString().equals("36"))) {
|
||||||
|
dict="block_drop";
|
||||||
|
val = msgProp.getProperty(dict,dict);
|
||||||
|
}
|
||||||
//ip spoofing redirect动作修改为Spoofing
|
//ip spoofing redirect动作修改为Spoofing
|
||||||
if(ef.title().equals("block_type")
|
if(ef.title().equals("block_type")
|
||||||
&& (Reflections.invokeGetter(e, "serviceId").toString().equals("518"))) {
|
&& (Reflections.invokeGetter(e, "serviceId").toString().equals("518"))) {
|
||||||
@@ -2358,7 +2377,7 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
end=System.currentTimeMillis();
|
end=System.currentTimeMillis();
|
||||||
log.info("setDataList cost:"+(end-start));
|
System.err.println("setDataList cost:"+(end-start));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -488,11 +488,11 @@ public class ImportBigExcel extends XLSXCovertCSVReader{
|
|||||||
if (valType == String.class){
|
if (valType == String.class){
|
||||||
String s = String.valueOf(val.toString().trim());
|
String s = String.valueOf(val.toString().trim());
|
||||||
//0.0.0.0表示任意IP的含义
|
//0.0.0.0表示任意IP的含义
|
||||||
if(StringUtils.endsWith(s, ".0") && !s.endsWith("0.0.0.0")){
|
// if(StringUtils.endsWith(s, ".0") && !s.endsWith("0.0.0.0")){
|
||||||
val = StringUtils.substringBefore(s, ".0");
|
// val = StringUtils.substringBefore(s, ".0");
|
||||||
}else{
|
// }else{
|
||||||
val=val == null ? "" : StringEscapeUtils.escapeHtml4(val.toString().trim());
|
val=val == null ? "" : StringEscapeUtils.escapeHtml4(val.toString().trim());
|
||||||
}
|
// }
|
||||||
}else if (valType == Integer.class){
|
}else if (valType == Integer.class){
|
||||||
val = Double.valueOf(val.toString().trim()).intValue();
|
val = Double.valueOf(val.toString().trim()).intValue();
|
||||||
}else if (valType == Long.class){
|
}else if (valType == Long.class){
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.jets3t.service.ServiceException;
|
import org.jets3t.service.ServiceException;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import com.beust.jcommander.internal.Lists;
|
import com.beust.jcommander.internal.Lists;
|
||||||
import com.nis.domain.FunctionRegionDict;
|
import com.nis.domain.FunctionRegionDict;
|
||||||
@@ -27,6 +28,7 @@ import com.nis.domain.configuration.template.IpRateLimitTemplate;
|
|||||||
//import com.nis.util.AsnCacheUtils;
|
//import com.nis.util.AsnCacheUtils;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
|
import com.nis.util.IPUtil;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
|
|
||||||
public class CheckIpFormatThread implements Callable<String>{
|
public class CheckIpFormatThread implements Callable<String>{
|
||||||
@@ -92,14 +94,20 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
}
|
}
|
||||||
boolean canIPv4 = ipType.indexOf("4") > -1;
|
boolean canIPv4 = ipType.indexOf("4") > -1;
|
||||||
boolean canIPv6 = ipType.indexOf("6") > -1;
|
boolean canIPv6 = ipType.indexOf("6") > -1;
|
||||||
String ipPattern = regionDict.getConfigIpPattern();
|
String[] ipPattern = regionDict.getConfigIpPattern().split(";");
|
||||||
if (StringUtils.isBlank(ipPattern)) {
|
Assert.isTrue(ipPattern!=null&&ipPattern.length==2);
|
||||||
|
String srcIpPattern = ipPattern[0];
|
||||||
|
String destIpPattern = ipPattern[1];
|
||||||
|
if (StringUtils.isBlank(srcIpPattern)||StringUtils.isBlank(destIpPattern)) {
|
||||||
throw new RuntimeException("Found IP region,but ipPattern is Empty");
|
throw new RuntimeException("Found IP region,but ipPattern is Empty");
|
||||||
}
|
}
|
||||||
boolean canIPFormat = ipType.indexOf("3") > -1;
|
boolean canIPFormat = ipType.indexOf("3") > -1;
|
||||||
boolean canIPSubnetFormat = ipType.indexOf("1") > -1;
|
boolean canIPSubnetFormat = ipType.indexOf("1") > -1;
|
||||||
boolean canIPRangeFormat = ipType.indexOf("2") > -1;
|
boolean canIPRangeFormat = ipType.indexOf("2") > -1;
|
||||||
String portPattern = regionDict.getConfigPortPattern();
|
String[] portPattern = regionDict.getConfigPortPattern().split(";");
|
||||||
|
Assert.isTrue(ipPattern!=null&&ipPattern.length==2);
|
||||||
|
String srcPortPattern=portPattern[0];
|
||||||
|
String destPortPattern=portPattern[1];
|
||||||
String protocol = regionDict.getConfigProtocol();
|
String protocol = regionDict.getConfigProtocol();
|
||||||
String direction = regionDict.getConfigDirection();
|
String direction = regionDict.getConfigDirection();
|
||||||
StringBuffer errTip = new StringBuffer();
|
StringBuffer errTip = new StringBuffer();
|
||||||
@@ -130,6 +138,7 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
// doLog属性检验
|
// doLog属性检验
|
||||||
this.validDoLog(baseIpCfg,errInfo);
|
this.validDoLog(baseIpCfg,errInfo);
|
||||||
|
|
||||||
|
|
||||||
// 特殊字段验证
|
// 特殊字段验证
|
||||||
// packet ip ratelimit
|
// packet ip ratelimit
|
||||||
if (serviceDict!=null && serviceDict.getAction().intValue() == 64 && (serviceDict.getFunctionId().intValue() == 5
|
if (serviceDict!=null && serviceDict.getAction().intValue() == 64 && (serviceDict.getFunctionId().intValue() == 5
|
||||||
@@ -586,6 +595,23 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
String subfix=baseIpCfg.getSrcIpAddress().split("-")[1];
|
String subfix=baseIpCfg.getSrcIpAddress().split("-")[1];
|
||||||
baseIpCfg.setSrcIpAddress(prefix+"-"+prefix.substring(0, prefix.lastIndexOf(".")+1)+subfix);
|
baseIpCfg.setSrcIpAddress(prefix+"-"+prefix.substring(0, prefix.lastIndexOf(".")+1)+subfix);
|
||||||
}
|
}
|
||||||
|
//Tip:判断业务是否只展示源IP列,如果是,判断源IP是否是默认值,如果是默认值,提示源IP不能是默认值
|
||||||
|
if (configIpPortShow.indexOf("1") > -1 && configIpPortShow.indexOf("3") == -1) {// 源IP必填
|
||||||
|
String srcIpAddress = baseIpCfg.getSrcIpAddress();
|
||||||
|
Pattern ip4 = Constants.IPV4_IP_PATTERN;
|
||||||
|
Pattern ip6 = Constants.IPV6_IP_PATTERN;
|
||||||
|
Matcher ip4Matcher = ip4.matcher(srcIpAddress);
|
||||||
|
Matcher ip6Matcher = ip6.matcher(srcIpAddress);
|
||||||
|
if (ip4Matcher.matches() && srcIpAddress.startsWith("0.0.0.0")) {
|
||||||
|
errInfo.append(prop.getProperty("client_ip")+" "
|
||||||
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)
|
||||||
|
+ ";");
|
||||||
|
} else if (ip6Matcher.matches() && srcIpAddress.startsWith("::")) {
|
||||||
|
errInfo.append(prop.getProperty("client_ip")+" "
|
||||||
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)
|
||||||
|
+ ";");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(baseIpCfg.getDestIpAddress())) {
|
if (StringUtils.isBlank(baseIpCfg.getDestIpAddress())) {
|
||||||
destIpEmpty = true;
|
destIpEmpty = true;
|
||||||
@@ -597,6 +623,23 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
String subfix=baseIpCfg.getDestIpAddress().split("-")[1];
|
String subfix=baseIpCfg.getDestIpAddress().split("-")[1];
|
||||||
baseIpCfg.setDestIpAddress(prefix+"-"+prefix.substring(0, prefix.lastIndexOf(".")+1)+subfix);
|
baseIpCfg.setDestIpAddress(prefix+"-"+prefix.substring(0, prefix.lastIndexOf(".")+1)+subfix);
|
||||||
}
|
}
|
||||||
|
//Tip:判断业务是否只展示目的IP列,如果是,判断目的IP是否是默认值,如果是默认值,提示目的IP不能是默认值
|
||||||
|
if (configIpPortShow.indexOf("3") > -1 && configIpPortShow.indexOf("1") == -1) {// 目的IP必填
|
||||||
|
String destIpAddress = baseIpCfg.getDestIpAddress();
|
||||||
|
Pattern ip4 = Constants.IPV4_IP_PATTERN;
|
||||||
|
Pattern ip6 = Constants.IPV6_IP_PATTERN;
|
||||||
|
Matcher ip4Matcher = ip4.matcher(destIpAddress);
|
||||||
|
Matcher ip6Matcher = ip6.matcher(destIpAddress);
|
||||||
|
if (ip4Matcher.matches() && destIpAddress.startsWith("0.0.0.0")) {
|
||||||
|
errInfo.append(prop.getProperty("server_ip")+" "
|
||||||
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)
|
||||||
|
+ ";");
|
||||||
|
} else if (ip6Matcher.matches() && destIpAddress.startsWith("::")) {
|
||||||
|
errInfo.append(prop.getProperty("server_ip")+" "
|
||||||
|
+ String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)
|
||||||
|
+ ";");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(baseIpCfg.getSrcPort())) {
|
if (StringUtils.isBlank(baseIpCfg.getSrcPort())) {
|
||||||
srcPortEmpty = true;
|
srcPortEmpty = true;
|
||||||
@@ -621,77 +664,49 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
prop.getProperty("server_ip", "Server IP")) + ";");
|
prop.getProperty("server_ip", "Server IP")) + ";");
|
||||||
} else if (configIpPortShow.indexOf("1") > -1) {
|
} else if (configIpPortShow.indexOf("1") > -1) {
|
||||||
String matchType = this.validIPAddress("client_ip", errInfo, baseIpCfg.getSrcIpAddress(),
|
String matchType = this.validIPAddress("client_ip", errInfo, baseIpCfg.getSrcIpAddress(),
|
||||||
ipType, ipPattern);
|
ipType, srcIpPattern);
|
||||||
|
//设置源IP pattern
|
||||||
|
if (matchType.endsWith("RANGE")) {
|
||||||
|
baseIpCfg.setSrcIpPattern(2);
|
||||||
|
} else if (matchType.endsWith("SUBNET")) {
|
||||||
|
baseIpCfg.setSrcIpPattern(1);
|
||||||
|
}else {
|
||||||
|
baseIpCfg.setSrcIpPattern(3);
|
||||||
|
}
|
||||||
if (matchType.startsWith("IPV6")) {
|
if (matchType.startsWith("IPV6")) {
|
||||||
if (matchType.endsWith("RANGE")) {
|
//设置dest ip值
|
||||||
// baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress());
|
if(destIpPattern.indexOf("3")>-1) {//优先设置IP类型,因为拆分的IP较少
|
||||||
baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(2);
|
|
||||||
if (baseIpCfg.getSrcIpAddress()
|
|
||||||
.startsWith(Constants.IPV6_DEFAULT_IP_RANGE_VALUE.split("-")[0])) {
|
|
||||||
errInfo.append(prop.getProperty("client_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV6_DEFAULT_IP_RANGE_VALUE.split("-")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else if (matchType.endsWith("SUBNET")) {
|
|
||||||
// baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress());
|
|
||||||
baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(1);
|
|
||||||
if (baseIpCfg.getSrcIpAddress()
|
|
||||||
.startsWith(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) {
|
|
||||||
errInfo.append(
|
|
||||||
prop.getProperty("client_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.split("/")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress());
|
|
||||||
baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_VALUE);
|
baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_VALUE);
|
||||||
baseIpCfg.setIpPattern(3);
|
baseIpCfg.setDestIpPattern(3);
|
||||||
if (baseIpCfg.getSrcIpAddress().equals(Constants.IPV6_DEFAULT_IP_VALUE)) {
|
}else if(destIpPattern.indexOf("1")>-1) {
|
||||||
errInfo.append(prop.getProperty("client_ip")+" " + String.format(
|
baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE);
|
||||||
prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE) + ";");
|
baseIpCfg.setDestIpPattern(1);
|
||||||
}
|
}else {
|
||||||
|
baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE);
|
||||||
|
baseIpCfg.setDestIpPattern(2);
|
||||||
}
|
}
|
||||||
|
//设置IP类型
|
||||||
baseIpCfg.setIpType(6);
|
baseIpCfg.setIpType(6);
|
||||||
} else {
|
} else {
|
||||||
if (matchType.endsWith("RANGE")) {
|
//设置dest ip值
|
||||||
this.validIPv4Range("client_ip", errInfo, baseIpCfg.getSrcIpAddress());
|
if(destIpPattern.indexOf("3")>-1) {//优先设置IP类型,因为拆分的IP较少
|
||||||
// baseIpCfg.setSrcIpAddress("0.0.0.0-"+baseIpCfg.getSrcIpAddress().split("-")[0].substring(0,baseIpCfg.getSrcIpAddress().indexOf("-")+1)+baseIpCfg.getSrcIpAddress().split("-")[1]);
|
|
||||||
baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(2);
|
|
||||||
if (baseIpCfg.getSrcIpAddress()
|
|
||||||
.startsWith(Constants.IPV4_DEFAULT_IP_RANGE_VALUE.split("-")[0])) {
|
|
||||||
errInfo.append(prop.getProperty("client_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV4_DEFAULT_IP_RANGE_VALUE.split("-")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else if (matchType.endsWith("SUBNET")) {
|
|
||||||
// baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress());
|
|
||||||
baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(1);
|
|
||||||
if (baseIpCfg.getSrcIpAddress()
|
|
||||||
.startsWith(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) {
|
|
||||||
errInfo.append(
|
|
||||||
prop.getProperty("client_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.split("/")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress());
|
|
||||||
baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_VALUE);
|
baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_VALUE);
|
||||||
baseIpCfg.setIpPattern(3);
|
baseIpCfg.setDestIpPattern(3);
|
||||||
if (baseIpCfg.getSrcIpAddress().equals(Constants.IPV4_DEFAULT_IP_VALUE)) {
|
}else if(destIpPattern.indexOf("1")>-1) {
|
||||||
errInfo.append(prop.getProperty("client_ip")+" " + String.format(
|
baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE);
|
||||||
prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE) + ";");
|
baseIpCfg.setDestIpPattern(1);
|
||||||
}
|
}else {
|
||||||
|
baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE);
|
||||||
|
baseIpCfg.setDestIpPattern(2);
|
||||||
}
|
}
|
||||||
baseIpCfg.setIpType(4);
|
baseIpCfg.setIpType(4);
|
||||||
}
|
}
|
||||||
|
//Tip:增加源IP和目的IP是否相等,如果相等,提示目的IP不能为空
|
||||||
|
if ((configIpPortShow.indexOf("3") > -1 && configIpPortShow.indexOf("1") > -1)
|
||||||
|
&& (baseIpCfg.getDestIpAddress().equals(baseIpCfg.getSrcIpAddress()))) {
|
||||||
|
errInfo.append(String.format(prop.getProperty("can_not_null"),
|
||||||
|
prop.getProperty("server_ip", "Server IP")) + ";");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (srcIpEmpty) {// 源IP为空
|
} else if (srcIpEmpty) {// 源IP为空
|
||||||
@@ -700,166 +715,175 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
prop.getProperty("client_ip", "Client IP")) + ";");
|
prop.getProperty("client_ip", "Client IP")) + ";");
|
||||||
} else if (configIpPortShow.indexOf("3") > -1) {
|
} else if (configIpPortShow.indexOf("3") > -1) {
|
||||||
String matchType = this.validIPAddress("server_ip", errInfo, baseIpCfg.getDestIpAddress(),
|
String matchType = this.validIPAddress("server_ip", errInfo, baseIpCfg.getDestIpAddress(),
|
||||||
ipType, ipPattern);
|
ipType, destIpPattern);
|
||||||
|
if (matchType.endsWith("RANGE")) {
|
||||||
|
baseIpCfg.setDestIpPattern(2);
|
||||||
|
} else if (matchType.endsWith("SUBNET")) {
|
||||||
|
baseIpCfg.setDestIpPattern(1);
|
||||||
|
}else {
|
||||||
|
baseIpCfg.setDestIpPattern(3);
|
||||||
|
}
|
||||||
if (matchType.startsWith("IPV6")) {
|
if (matchType.startsWith("IPV6")) {
|
||||||
if (matchType.endsWith("RANGE")) {
|
if(srcIpPattern.indexOf("3")>-1) {
|
||||||
// baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress());
|
|
||||||
baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(2);
|
|
||||||
if (baseIpCfg.getDestIpAddress()
|
|
||||||
.startsWith(Constants.IPV6_DEFAULT_IP_RANGE_VALUE.split("-")[0])) {
|
|
||||||
errInfo.append(prop.getProperty("server_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV6_DEFAULT_IP_RANGE_VALUE.split("-")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else if (matchType.endsWith("SUBNET")) {
|
|
||||||
// baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress());
|
|
||||||
baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(1);
|
|
||||||
if (baseIpCfg.getDestIpAddress()
|
|
||||||
.startsWith(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) {
|
|
||||||
errInfo.append(
|
|
||||||
prop.getProperty("server_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.split("/")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress());
|
|
||||||
baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_VALUE);
|
baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_VALUE);
|
||||||
baseIpCfg.setIpPattern(3);
|
baseIpCfg.setSrcIpPattern(3);
|
||||||
if (baseIpCfg.getDestIpAddress().equals(Constants.IPV6_DEFAULT_IP_VALUE)) {
|
}else if(srcIpPattern.indexOf("1")>-1) {
|
||||||
errInfo.append(prop.getProperty("server_ip")+" " + String.format(
|
baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE);
|
||||||
prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE) + ";");
|
baseIpCfg.setSrcIpPattern(1);
|
||||||
}
|
}else {
|
||||||
|
baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE);
|
||||||
|
baseIpCfg.setSrcIpPattern(2);
|
||||||
}
|
}
|
||||||
baseIpCfg.setIpType(6);
|
baseIpCfg.setIpType(6);
|
||||||
} else {
|
} else {
|
||||||
if (matchType.endsWith("RANGE")) {
|
if(srcIpPattern.indexOf("3")>-1) {
|
||||||
this.validIPv4Range("server_ip", errInfo, baseIpCfg.getDestIpAddress());
|
|
||||||
// baseIpCfg.setDestIpAddress("0.0.0.0-"+baseIpCfg.getDestIpAddress().split("-")[0]
|
|
||||||
// .substring(0,baseIpCfg.getDestIpAddress().indexOf("-")+1)
|
|
||||||
// +baseIpCfg.getDestIpAddress().split("-")[1]);
|
|
||||||
baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(2);
|
|
||||||
if (baseIpCfg.getDestIpAddress()
|
|
||||||
.startsWith(Constants.IPV4_DEFAULT_IP_RANGE_VALUE.split("-")[0])) {
|
|
||||||
errInfo.append(prop.getProperty("server_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV4_DEFAULT_IP_RANGE_VALUE.split("-")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else if (matchType.endsWith("SUBNET")) {
|
|
||||||
// baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress());
|
|
||||||
baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE);
|
|
||||||
baseIpCfg.setIpPattern(1);
|
|
||||||
if (baseIpCfg.getDestIpAddress()
|
|
||||||
.startsWith(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) {
|
|
||||||
errInfo.append(
|
|
||||||
prop.getProperty("server_ip")+" "
|
|
||||||
+ String.format(prop.getProperty("can_not_be"),
|
|
||||||
Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.split("/")[0])
|
|
||||||
+ ";");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress());
|
|
||||||
baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_VALUE);
|
baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_VALUE);
|
||||||
baseIpCfg.setIpPattern(3);
|
baseIpCfg.setSrcIpPattern(3);
|
||||||
if (baseIpCfg.getDestIpAddress().equals(Constants.IPV4_DEFAULT_IP_VALUE)) {
|
}else if(srcIpPattern.indexOf("1")>-1) {
|
||||||
errInfo.append(prop.getProperty("server_ip")+" " + String.format(
|
baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE);
|
||||||
prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE) + ";");
|
baseIpCfg.setSrcIpPattern(1);
|
||||||
}
|
}else {
|
||||||
|
baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE);
|
||||||
|
baseIpCfg.setSrcIpPattern(2);
|
||||||
}
|
}
|
||||||
baseIpCfg.setIpType(4);
|
baseIpCfg.setIpType(4);
|
||||||
}
|
}
|
||||||
|
//Tip:增加源IP和目的IP是否相等,如果相等,提示源的IP不能为空
|
||||||
|
if ((configIpPortShow.indexOf("3") > -1 && configIpPortShow.indexOf("1") > -1)
|
||||||
|
&& (baseIpCfg.getSrcIpAddress().equals(baseIpCfg.getDestIpAddress()))) {
|
||||||
|
errInfo.append(String.format(prop.getProperty("can_not_null"),
|
||||||
|
prop.getProperty("client_ip", "Client IP")) + ";");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {// 全不为空
|
} else {// 全不为空
|
||||||
String matchType = this.validIPAddress("client_ip", errInfo, baseIpCfg.getSrcIpAddress(), ipType,
|
String srcMatchType = this.validIPAddress("client_ip", errInfo, baseIpCfg.getSrcIpAddress(), ipType,
|
||||||
ipPattern);
|
srcIpPattern);
|
||||||
String matchType1 = this.validIPAddress("server_ip", errInfo, baseIpCfg.getDestIpAddress(), ipType,
|
String destMatchType = this.validIPAddress("server_ip", errInfo, baseIpCfg.getDestIpAddress(), ipType,
|
||||||
ipPattern);
|
destIpPattern);
|
||||||
if (StringUtils.isNotBlank(matchType) && StringUtils.isNotBlank(matchType1)
|
if (StringUtils.isNotBlank(srcMatchType) && StringUtils.isNotBlank(destMatchType)
|
||||||
&& !matchType.equals(matchType1)) {
|
&& ((srcMatchType.startsWith("IPV6")&&destMatchType.startsWith("IPV4"))
|
||||||
errInfo.append(prop.get("the_same_ip_type_pattern") + ";");
|
||(srcMatchType.startsWith("IPV4")&&destMatchType.startsWith("IPV6")))) {
|
||||||
|
errInfo.append(prop.get("the_same_ip_type") + ";");
|
||||||
}
|
}
|
||||||
// baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress());
|
// baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress());
|
||||||
// baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress());
|
// baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress());
|
||||||
if (matchType.startsWith("IPV6")) {
|
if (srcMatchType.startsWith("IPV6")) {
|
||||||
baseIpCfg.setIpType(6);
|
baseIpCfg.setIpType(6);
|
||||||
} else {
|
} else {
|
||||||
baseIpCfg.setIpType(4);
|
baseIpCfg.setIpType(4);
|
||||||
}
|
}
|
||||||
if (matchType.endsWith("RANGE")) {
|
if (srcMatchType.endsWith("RANGE")) {
|
||||||
if (matchType.startsWith("IPV4")) {
|
baseIpCfg.setSrcIpPattern(2);
|
||||||
|
}else if(srcMatchType.endsWith("SUBNET")) {
|
||||||
|
baseIpCfg.setSrcIpPattern(1);
|
||||||
|
}else {
|
||||||
|
baseIpCfg.setSrcIpPattern(3);
|
||||||
|
}
|
||||||
|
if (destMatchType.endsWith("RANGE")) {
|
||||||
|
baseIpCfg.setDestIpPattern(2);
|
||||||
|
}else if(destMatchType.endsWith("SUBNET")) {
|
||||||
|
baseIpCfg.setDestIpPattern(1);
|
||||||
|
}else {
|
||||||
|
baseIpCfg.setDestIpPattern(3);
|
||||||
|
}
|
||||||
|
if(baseIpCfg.getIpType().equals(4)) {
|
||||||
|
if (srcMatchType.endsWith("RANGE")) {
|
||||||
this.validIPv4Range("client_ip", errInfo, baseIpCfg.getSrcIpAddress());
|
this.validIPv4Range("client_ip", errInfo, baseIpCfg.getSrcIpAddress());
|
||||||
|
}
|
||||||
|
if (destMatchType.endsWith("RANGE")) {
|
||||||
this.validIPv4Range("server_ip", errInfo, baseIpCfg.getDestIpAddress());
|
this.validIPv4Range("server_ip", errInfo, baseIpCfg.getDestIpAddress());
|
||||||
}
|
}
|
||||||
|
//验证Ip范围
|
||||||
if (baseIpCfg.getSrcIpAddress().split("-")[0]
|
if(StringUtils.isEmpty(errInfo)&&(srcMatchType.endsWith("RANGE")||destMatchType.endsWith("RANGE"))) {
|
||||||
.equals(baseIpCfg.getDestIpAddress().split("-")[0])) {
|
this.ValidateRangeCross(baseIpCfg.getSrcIpAddress(),baseIpCfg.getDestIpAddress(), errInfo);
|
||||||
errInfo.append(String.format(prop.getProperty("are_the_same"),
|
|
||||||
baseIpCfg.getSrcIpAddress().split("-")[0],
|
|
||||||
baseIpCfg.getDestIpAddress().split("-")[0]) + ";");
|
|
||||||
}
|
}
|
||||||
baseIpCfg.setIpPattern(2);
|
}
|
||||||
} else if (matchType.endsWith("SUBNET")) {
|
boolean same=false;
|
||||||
if (baseIpCfg.getSrcIpAddress().split("/")[0]
|
if(baseIpCfg.getSrcIpAddress().indexOf("-")>-1) {
|
||||||
.equals(baseIpCfg.getDestIpAddress().split("/")[0])) {
|
if(baseIpCfg.getDestIpAddress().indexOf("-")>-1) {
|
||||||
errInfo.append(String.format(prop.getProperty("are_the_same"),
|
if(baseIpCfg.getSrcIpAddress().split("-")[0].equals(baseIpCfg.getDestIpAddress().split("-")[0])) {
|
||||||
baseIpCfg.getSrcIpAddress().split("/")[0],
|
same=true;
|
||||||
baseIpCfg.getDestIpAddress().split("/")[0]) + ";");
|
}
|
||||||
|
}else if(baseIpCfg.getDestIpAddress().indexOf("/")>-1) {
|
||||||
|
if(baseIpCfg.getSrcIpAddress().split("-")[0].equals(baseIpCfg.getDestIpAddress().split("/")[0])) {
|
||||||
|
same=true;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(baseIpCfg.getSrcIpAddress().split("-")[0].equals(baseIpCfg.getDestIpAddress())) {
|
||||||
|
same=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
baseIpCfg.setIpPattern(1);
|
}else if(baseIpCfg.getSrcIpAddress().indexOf("/")>-1){
|
||||||
} else {
|
if(baseIpCfg.getDestIpAddress().indexOf("-")>-1) {
|
||||||
if (baseIpCfg.getSrcIpAddress().equals(baseIpCfg.getDestIpAddress())) {
|
if(baseIpCfg.getSrcIpAddress().split("/")[0].equals(baseIpCfg.getDestIpAddress().split("-")[0])) {
|
||||||
errInfo.append(String.format(prop.getProperty("are_the_same"),
|
same=true;
|
||||||
prop.getProperty("client_ip"), prop.getProperty("server_ip")) + ";");
|
}
|
||||||
|
}else if(baseIpCfg.getDestIpAddress().indexOf("/")>-1) {
|
||||||
|
if(baseIpCfg.getSrcIpAddress().split("/")[0].equals(baseIpCfg.getDestIpAddress().split("/")[0])) {
|
||||||
|
same=true;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(baseIpCfg.getSrcIpAddress().split("/")[0].equals(baseIpCfg.getDestIpAddress())) {
|
||||||
|
same=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
baseIpCfg.setIpPattern(3);
|
}else {
|
||||||
|
if(baseIpCfg.getDestIpAddress().indexOf("-")>-1) {
|
||||||
|
if(baseIpCfg.getSrcIpAddress().equals(baseIpCfg.getDestIpAddress().split("-")[0])) {
|
||||||
|
same=true;
|
||||||
|
}
|
||||||
|
}else if(baseIpCfg.getDestIpAddress().indexOf("/")>-1) {
|
||||||
|
if(baseIpCfg.getSrcIpAddress().equals(baseIpCfg.getDestIpAddress().split("/")[0])) {
|
||||||
|
same=true;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(baseIpCfg.getSrcIpAddress().equals(baseIpCfg.getDestIpAddress())) {
|
||||||
|
same=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(same) {
|
||||||
|
errInfo.append(String.format(prop.getProperty("are_the_same"),
|
||||||
|
baseIpCfg.getSrcIpAddress().split("-")[0],
|
||||||
|
baseIpCfg.getDestIpAddress().split("-")[0]) + ";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO 判断源IP和目的IP的值
|
// TODO 判断源IP和目的IP的值
|
||||||
// TODO 判断源IP和目的IP格式
|
// TODO 判断源IP和目的IP格式
|
||||||
if (destPortEmpty) {
|
if (srcPortEmpty) {
|
||||||
if (srcPortEmpty) {
|
if(srcPortPattern.indexOf("1")>-1) {
|
||||||
baseIpCfg.setSrcPort("0");
|
baseIpCfg.setSrcPort("0");
|
||||||
baseIpCfg.setDestPort("0");
|
baseIpCfg.setSrcPortPattern(1);
|
||||||
baseIpCfg.setPortPattern(1);
|
}else {
|
||||||
} else {
|
baseIpCfg.setSrcPort("0/0");
|
||||||
if (baseIpCfg.getSrcPort().indexOf("/") > -1) {
|
baseIpCfg.setSrcPortPattern(2);
|
||||||
baseIpCfg.setDestPort("0/0");
|
|
||||||
baseIpCfg.setPortPattern(2);
|
|
||||||
} else {
|
|
||||||
baseIpCfg.setDestPort("0");
|
|
||||||
baseIpCfg.setPortPattern(1);
|
|
||||||
}
|
|
||||||
baseIpCfg.setSrcPort(baseIpCfg.getSrcPort().trim());
|
|
||||||
}
|
}
|
||||||
} else {
|
}else if(baseIpCfg.getSrcPort().indexOf("/")>-1) {
|
||||||
if (srcPortEmpty) {
|
baseIpCfg.setSrcPortPattern(2);
|
||||||
if (baseIpCfg.getDestPort().indexOf("/") > -1) {
|
}else {
|
||||||
baseIpCfg.setSrcPort("0/0");
|
baseIpCfg.setSrcPortPattern(1);
|
||||||
baseIpCfg.setPortPattern(2);
|
|
||||||
} else {
|
|
||||||
baseIpCfg.setSrcPort("0");
|
|
||||||
baseIpCfg.setPortPattern(1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (baseIpCfg.getSrcPort().indexOf("/") > -1) {
|
|
||||||
baseIpCfg.setPortPattern(2);
|
|
||||||
} else {
|
|
||||||
baseIpCfg.setPortPattern(1);
|
|
||||||
}
|
|
||||||
baseIpCfg.setSrcPort(baseIpCfg.getSrcPort().trim());
|
|
||||||
}
|
|
||||||
baseIpCfg.setDestPort(baseIpCfg.getDestPort().trim());
|
|
||||||
}
|
}
|
||||||
// TODO 判断源端口和目的端口格式
|
baseIpCfg.setSrcPort(baseIpCfg.getSrcPort().trim());
|
||||||
// TODO 判断源和目的端口的值
|
boolean validSrcPort = this.validPort(errInfo, baseIpCfg.getSrcPort(),
|
||||||
boolean validPort = this.validPort(errInfo, baseIpCfg.getSrcPort(), baseIpCfg.getDestPort(),
|
srcPortPattern,"client_port");
|
||||||
portPattern);
|
if (destPortEmpty) {
|
||||||
|
if(destPortPattern.indexOf("1")>-1) {
|
||||||
|
baseIpCfg.setDestPort("0");
|
||||||
|
baseIpCfg.setDestPortPattern(1);
|
||||||
|
}else {
|
||||||
|
baseIpCfg.setDestPort("0/0");
|
||||||
|
baseIpCfg.setDestPortPattern(2);
|
||||||
|
}
|
||||||
|
}else if(baseIpCfg.getDestPort().indexOf("/")>-1) {
|
||||||
|
baseIpCfg.setDestPortPattern(2);
|
||||||
|
}else {
|
||||||
|
baseIpCfg.setDestPortPattern(1);
|
||||||
|
}
|
||||||
|
baseIpCfg.setDestPort(baseIpCfg.getDestPort().trim());
|
||||||
|
boolean validDestPort = this.validPort(errInfo, baseIpCfg.getDestPort(),
|
||||||
|
srcPortPattern,"server_port");
|
||||||
|
|
||||||
if (baseIpCfg.getProtocol()==null) {
|
if (baseIpCfg.getProtocol()==null) {
|
||||||
//packet ip reject
|
//packet ip reject
|
||||||
if(regionDict.getFunctionId().equals(5)&&serviceDict!=null&&serviceDict.getServiceId().equals(16)) {
|
if(regionDict.getFunctionId().equals(5)&&serviceDict!=null&&serviceDict.getServiceId().equals(16)) {
|
||||||
@@ -901,7 +925,7 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
}
|
}
|
||||||
boolean validProtocol = this.validProtocol(errInfo, baseIpCfg.getProtocol(), protocol);
|
boolean validProtocol = this.validProtocol(errInfo, baseIpCfg.getProtocol(), protocol);
|
||||||
// 验证protocol与port是否符合逻辑
|
// 验证protocol与port是否符合逻辑
|
||||||
if (validProtocol && validPort) {
|
if (validProtocol && validSrcPort&&validDestPort) {
|
||||||
validProtocolAndPort(errInfo, baseIpCfg.getProtocol(), baseIpCfg.getSrcPort(),
|
validProtocolAndPort(errInfo, baseIpCfg.getProtocol(), baseIpCfg.getSrcPort(),
|
||||||
baseIpCfg.getDestPort());
|
baseIpCfg.getDestPort());
|
||||||
}
|
}
|
||||||
@@ -924,6 +948,10 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
// TODO 判断Direction的值
|
// TODO 判断Direction的值
|
||||||
this.validDirection(errInfo, baseIpCfg.getDirection(), direction);
|
this.validDirection(errInfo, baseIpCfg.getDirection(), direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//IP校验
|
||||||
|
// this.validSrcAndDescIp(baseIpCfg.getSrcIpAddress(), baseIpCfg.getDestIpAddress(), configIpPortShow,errInfo);
|
||||||
|
|
||||||
if (errInfo.toString().length() > 0) {//
|
if (errInfo.toString().length() > 0) {//
|
||||||
errTip.append(String.format(prop.getProperty("line"), baseIpCfg.getIndex()) + ",");
|
errTip.append(String.format(prop.getProperty("line"), baseIpCfg.getIndex()) + ",");
|
||||||
errTip.append(errInfo);
|
errTip.append(errInfo);
|
||||||
@@ -1030,153 +1058,85 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
* @param portPattern
|
* @param portPattern
|
||||||
* @throws ServiceException
|
* @throws ServiceException
|
||||||
*/
|
*/
|
||||||
public boolean validPort(StringBuffer errInfo, String srcPortStr, String destPortStr, String portPattern)
|
public boolean validPort(StringBuffer errInfo, String portStr, String portPattern,String portName)
|
||||||
throws ServiceException {
|
throws ServiceException {
|
||||||
boolean valid = true;
|
boolean valid = true;
|
||||||
if (portPattern.equals("1")) {
|
if (portPattern.equals("1")) {
|
||||||
try {
|
try {
|
||||||
Integer srcPort = Integer.parseInt(srcPortStr);
|
Integer srcPort = Integer.parseInt(portStr);
|
||||||
if (srcPort < 0 || srcPort > 65535) {
|
if (srcPort < 0 || srcPort > 65535) {
|
||||||
errInfo.append(prop.getProperty("client_port")
|
errInfo.append(prop.getProperty(portName)
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
errInfo.append(String.format(prop.getProperty("not_number"), prop.getProperty("client_port")) + ";");
|
errInfo.append(String.format(prop.getProperty("not_number"), prop.getProperty(portName)) + ";");
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
Integer destPort = Integer.parseInt(destPortStr);
|
|
||||||
if (destPort < 0 || destPort > 65535) {
|
|
||||||
errInfo.append(prop.getProperty("server_port")
|
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
// TODO: handle exception
|
|
||||||
errInfo.append(String.format(prop.getProperty("not_number"), prop.getProperty("server_port")) + ";");
|
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (portPattern.equals("2")) {
|
} else if (portPattern.equals("2")) {
|
||||||
Pattern p = Constants.PORT_MASK_PATTERN;
|
Pattern p = Constants.PORT_MASK_PATTERN;
|
||||||
Matcher m = p.matcher(srcPortStr);
|
Matcher m = p.matcher(portStr);
|
||||||
if (!m.matches()) {
|
if (!m.matches()) {
|
||||||
errInfo.append(
|
errInfo.append(
|
||||||
String.format(prop.getProperty("is_in_wrong_format"), prop.getProperty("client_port")) + ";");
|
String.format(prop.getProperty("is_in_wrong_format"), prop.getProperty(portName)) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
m = p.matcher(destPortStr);
|
|
||||||
if (!m.matches()) {
|
Integer port = Integer.parseInt(portStr.split("/")[0]);
|
||||||
errInfo.append(
|
Integer portMask = Integer.parseInt(portStr.split("/")[1]);
|
||||||
String.format(prop.getProperty("is_in_wrong_format"), prop.getProperty("server_port")) + ";");
|
|
||||||
valid = false;
|
if (port < 0 || port > 65535) {
|
||||||
}
|
errInfo.append(prop.getProperty(portName)
|
||||||
Integer srcPort = Integer.parseInt(srcPortStr.split("/")[0]);
|
|
||||||
Integer srcPortMask = Integer.parseInt(srcPortStr.split("/")[1]);
|
|
||||||
Integer destPort = Integer.parseInt(destPortStr.split("/")[0]);
|
|
||||||
Integer destPortMask = Integer.parseInt(destPortStr.split("/")[1]);
|
|
||||||
if (srcPort < 0 || srcPort > 65535) {
|
|
||||||
errInfo.append(prop.getProperty("client_port")
|
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
if (srcPortMask < 0 || srcPortMask > 65535) {
|
if (portMask < 0 || portMask > 65535) {
|
||||||
errInfo.append(prop.getProperty("client_port_mask")
|
errInfo.append(prop.getProperty(portName+"_mask")
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
if (destPort < 0 || destPort > 65535) {
|
|
||||||
errInfo.append(prop.getProperty("server_port")
|
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
if (destPortMask < 0 || destPortMask > 65535) {
|
|
||||||
errInfo.append(prop.getProperty("server_port_mask")
|
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (portPattern.indexOf("1") > -1 && portPattern.indexOf("2") > -1) {
|
} else if (portPattern.indexOf("1") > -1 && portPattern.indexOf("2") > -1) {
|
||||||
Pattern p = Constants.PORT_MASK_PATTERN;
|
Pattern p = Constants.PORT_MASK_PATTERN;
|
||||||
Pattern p1 = Constants.PORT_PATTERN;
|
Pattern p1 = Constants.PORT_PATTERN;
|
||||||
Matcher m = p.matcher(srcPortStr);// 源端口是端口掩码格式
|
Matcher m = p.matcher(portStr);// 源端口是端口掩码格式
|
||||||
Matcher m1 = p.matcher(destPortStr);// 目的端口是端口掩码格式
|
Matcher m2 = p1.matcher(portStr);// 源端口是端口格式
|
||||||
Matcher m2 = p1.matcher(srcPortStr);// 源端口是端口格式
|
|
||||||
Matcher m3 = p1.matcher(destPortStr);// 目的端口是端口格式
|
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
Integer srcPort = Integer.parseInt(srcPortStr.split("/")[0]);
|
Integer srcPort = Integer.parseInt(portStr.split("/")[0]);
|
||||||
Integer srcPortMask = Integer.parseInt(srcPortStr.split("/")[1]);
|
Integer srcPortMask = Integer.parseInt(portStr.split("/")[1]);
|
||||||
if (srcPort < 0 || srcPort > 65535) {
|
if (srcPort < 0 || srcPort > 65535) {
|
||||||
errInfo.append(prop.getProperty("client_port")
|
errInfo.append(prop.getProperty(portName)
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
if (srcPortMask < 0 || srcPortMask > 65535) {
|
if (srcPortMask < 0 || srcPortMask > 65535) {
|
||||||
errInfo.append(prop.getProperty("client_port_mask")
|
errInfo.append(prop.getProperty(portName+"_mask")
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m1.matches()) {
|
|
||||||
Integer destPort = Integer.parseInt(destPortStr.split("/")[0]);
|
|
||||||
Integer destPortMask = Integer.parseInt(destPortStr.split("/")[1]);
|
|
||||||
|
|
||||||
if (destPort < 0 || destPort > 65535) {
|
|
||||||
errInfo.append(prop.getProperty("server_port")
|
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
if (destPortMask < 0 || destPortMask > 65535) {
|
|
||||||
errInfo.append(prop.getProperty("server_port_mask")
|
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m2.matches()) {
|
if (m2.matches()) {
|
||||||
try {
|
try {
|
||||||
Integer srcPort = Integer.parseInt(srcPortStr);
|
Integer srcPort = Integer.parseInt(portStr);
|
||||||
if (srcPort < 0 || srcPort > 65535) {
|
if (srcPort < 0 || srcPort > 65535) {
|
||||||
errInfo.append(prop.getProperty("client_port")
|
errInfo.append(prop.getProperty(portName)
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
errInfo.append(
|
errInfo.append(
|
||||||
String.format(prop.getProperty("not_number"), prop.getProperty("client_port")) + ";");
|
String.format(prop.getProperty("not_number"), prop.getProperty(portName)) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m3.matches()) {
|
|
||||||
try {
|
|
||||||
Integer destPort = Integer.parseInt(destPortStr);
|
|
||||||
if (destPort < 0 || destPort > 65535) {
|
|
||||||
errInfo.append(prop.getProperty("server_port")
|
|
||||||
+ String.format(prop.getProperty("must_between"), 0, 65535) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
// TODO: handle exception
|
|
||||||
errInfo.append(
|
|
||||||
String.format(prop.getProperty("not_number"), prop.getProperty("server_port")) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((m.matches() && m3.matches()) || (m2.matches() && m1.matches())) {
|
|
||||||
errInfo.append(prop.getProperty("the_same_port_pattern") + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
if (!m.matches() && !m2.matches()) {
|
if (!m.matches() && !m2.matches()) {
|
||||||
errInfo.append(
|
errInfo.append(
|
||||||
String.format(prop.getProperty("is_in_wrong_format"), prop.getProperty("client_port")) + ";");
|
String.format(prop.getProperty("is_in_wrong_format"), prop.getProperty(portName)) + ";");
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
if (!m1.matches() && !m3.matches()) {
|
|
||||||
errInfo.append(
|
|
||||||
String.format(prop.getProperty("is_in_wrong_format"), prop.getProperty("server_port")) + ";");
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
@@ -1369,7 +1329,44 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
}
|
}
|
||||||
return matchType;
|
return matchType;
|
||||||
}
|
}
|
||||||
|
public void ValidateRangeCross(String srcIp,String destIp,StringBuffer errInfo) {
|
||||||
|
long srcStart=0l,srcEnd=0,srcNum=0l,destStart=0l,destEnd=0l,destNum=0l;
|
||||||
|
if(srcIp.indexOf("-")>-1) {
|
||||||
|
String[] srcArr=srcIp.split("\\-");
|
||||||
|
srcStart=IPUtil.getIpHostDesimal(srcArr[0]);
|
||||||
|
srcEnd=IPUtil.getIpHostDesimal(srcArr[1]);
|
||||||
|
}else if(srcIp.indexOf("/")>-1) {
|
||||||
|
srcNum=IPUtil.getIpHostDesimal(srcIp.split("/")[0]);
|
||||||
|
}else {
|
||||||
|
srcNum=IPUtil.getIpHostDesimal(srcIp);
|
||||||
|
}
|
||||||
|
if(destIp.indexOf("-")>-1) {
|
||||||
|
String[] destArr=destIp.split("\\-");
|
||||||
|
destStart=IPUtil.getIpHostDesimal(destArr[0]);
|
||||||
|
destEnd=IPUtil.getIpHostDesimal(destArr[1]);
|
||||||
|
}else if(destIp.indexOf("/")>-1) {
|
||||||
|
destNum=IPUtil.getIpHostDesimal(destIp.split("/")[0]);
|
||||||
|
}else {
|
||||||
|
destNum=IPUtil.getIpHostDesimal(destIp);
|
||||||
|
}
|
||||||
|
if(srcNum==0l) {
|
||||||
|
if(destNum==0l) {
|
||||||
|
if(!(destEnd<srcStart||srcEnd<destStart)) {
|
||||||
|
errInfo.append(prop.getProperty("range_cross")+";");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(destNum>=srcStart&&destNum<=srcEnd) {
|
||||||
|
errInfo.append(prop.getProperty("range_cross")+";");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(destNum==0l) {
|
||||||
|
if(srcNum>=destStart&&srcNum<=destEnd) {
|
||||||
|
errInfo.append(prop.getProperty("range_cross")+";");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public List<Map<Long, AsnGroupInfo>> getAsnNoMaps() {
|
public List<Map<Long, AsnGroupInfo>> getAsnNoMaps() {
|
||||||
return asnNoMaps;
|
return asnNoMaps;
|
||||||
}
|
}
|
||||||
@@ -1382,5 +1379,4 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
public void setAsnGroupInfos(Map<Long, AsnGroupInfo> asnGroupInfos) {
|
public void setAsnGroupInfos(Map<Long, AsnGroupInfo> asnGroupInfos) {
|
||||||
this.asnGroupInfos = asnGroupInfos;
|
this.asnGroupInfos = asnGroupInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ import com.nis.domain.configuration.BaseCfg;
|
|||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.ComplexStringCfgTemplate;
|
|
||||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||||
import com.nis.domain.configuration.DdosIpCfg;
|
import com.nis.domain.configuration.DdosIpCfg;
|
||||||
import com.nis.domain.configuration.DnsIpCfg;
|
import com.nis.domain.configuration.DnsIpCfg;
|
||||||
@@ -75,7 +74,6 @@ import com.nis.domain.configuration.PxyObjKeyring;
|
|||||||
import com.nis.domain.configuration.PxyObjTrustedCaCert;
|
import com.nis.domain.configuration.PxyObjTrustedCaCert;
|
||||||
import com.nis.domain.configuration.PxyObjTrustedCaCrl;
|
import com.nis.domain.configuration.PxyObjTrustedCaCrl;
|
||||||
import com.nis.domain.configuration.RequestInfo;
|
import com.nis.domain.configuration.RequestInfo;
|
||||||
import com.nis.domain.configuration.StringCfgTemplate;
|
|
||||||
import com.nis.domain.configuration.template.AppDomainTemplate;
|
import com.nis.domain.configuration.template.AppDomainTemplate;
|
||||||
import com.nis.domain.configuration.template.AppPayloadTemplate;
|
import com.nis.domain.configuration.template.AppPayloadTemplate;
|
||||||
import com.nis.domain.configuration.template.AsnIpTemplate;
|
import com.nis.domain.configuration.template.AsnIpTemplate;
|
||||||
@@ -100,7 +98,6 @@ import com.nis.domain.configuration.template.HttpsReplaceIpTemplate;
|
|||||||
import com.nis.domain.configuration.template.HttpsReplaceTemplate;
|
import com.nis.domain.configuration.template.HttpsReplaceTemplate;
|
||||||
import com.nis.domain.configuration.template.IpAllNotDoLogTemplate;
|
import com.nis.domain.configuration.template.IpAllNotDoLogTemplate;
|
||||||
import com.nis.domain.configuration.template.IpAllTemplate;
|
import com.nis.domain.configuration.template.IpAllTemplate;
|
||||||
import com.nis.domain.configuration.template.IpCfgTemplate;
|
|
||||||
import com.nis.domain.configuration.template.IpPayloadTemplate;
|
import com.nis.domain.configuration.template.IpPayloadTemplate;
|
||||||
import com.nis.domain.configuration.template.IpRateLimitTemplate;
|
import com.nis.domain.configuration.template.IpRateLimitTemplate;
|
||||||
import com.nis.domain.configuration.template.IpSpoofingTemplate;
|
import com.nis.domain.configuration.template.IpSpoofingTemplate;
|
||||||
@@ -771,75 +768,6 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
return msgProp;
|
return msgProp;
|
||||||
}
|
}
|
||||||
@Deprecated
|
|
||||||
public void importCfgTemplate(HttpServletRequest request, HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) {
|
|
||||||
Properties msgProp = getMsgProp();
|
|
||||||
try {
|
|
||||||
List<FunctionRegionDict> dictList = DictUtils.getFunctionRegionDictList(functionId);
|
|
||||||
for (FunctionRegionDict dict : dictList) {
|
|
||||||
if (dict.getConfigRegionCode() == cfgRegionCode) {
|
|
||||||
String fileName = dict.getConfigRegionValue() + ".xlsx";
|
|
||||||
if (dict.getRegionType() == 1) {
|
|
||||||
List<IpCfgTemplate> list = Lists.newArrayList();
|
|
||||||
list.add(new IpCfgTemplate());
|
|
||||||
new ExportExcel(new FunctionServiceDict(), new FunctionRegionDict(), msgProp, null,
|
|
||||||
IpCfgTemplate.class, 2).setDataList(msgProp, list, null)
|
|
||||||
.write(request, response, fileName).dispose();
|
|
||||||
} else if (dict.getRegionType() == 2) {
|
|
||||||
List<StringCfgTemplate> list = Lists.newArrayList();
|
|
||||||
list.add(new StringCfgTemplate());
|
|
||||||
new ExportExcel(new FunctionServiceDict(), new FunctionRegionDict(), msgProp, null,
|
|
||||||
StringCfgTemplate.class, 2).setDataList(msgProp, list, null)
|
|
||||||
.write(request, response, fileName).dispose();
|
|
||||||
} else if (dict.getRegionType() == 3) {
|
|
||||||
List<ComplexStringCfgTemplate> list = Lists.newArrayList();
|
|
||||||
list.add(new ComplexStringCfgTemplate());
|
|
||||||
new ExportExcel(new FunctionServiceDict(), new FunctionRegionDict(), msgProp, null,
|
|
||||||
ComplexStringCfgTemplate.class, 2).setDataList(msgProp, list, null)
|
|
||||||
.write(request, response, fileName).dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
msgProp = null;
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Deprecated
|
|
||||||
public void importCfgTemplate(HttpServletRequest request, HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode, Class clazz) {
|
|
||||||
Properties msgProp = getMsgProp();
|
|
||||||
try {
|
|
||||||
List<FunctionRegionDict> dictList = DictUtils.getFunctionRegionDictList(functionId);
|
|
||||||
for (FunctionRegionDict dict : dictList) {
|
|
||||||
if (dict.getConfigRegionCode() == cfgRegionCode) {
|
|
||||||
String fileName = dict.getConfigRegionValue() + ".xlsx";
|
|
||||||
if (dict.getRegionType() == 1) {
|
|
||||||
List<IpCfgTemplate> list = Lists.newArrayList();
|
|
||||||
list.add((IpCfgTemplate) clazz.newInstance());
|
|
||||||
new ExportExcel(new FunctionServiceDict(), new FunctionRegionDict(), msgProp, null, clazz, 2)
|
|
||||||
.setDataList(msgProp, list, null).write(request, response, fileName).dispose();
|
|
||||||
} else if (dict.getRegionType() == 2) {
|
|
||||||
List<StringCfgTemplate> list = Lists.newArrayList();
|
|
||||||
list.add(new StringCfgTemplate());
|
|
||||||
new ExportExcel(new FunctionServiceDict(), new FunctionRegionDict(), msgProp, null, clazz, 2)
|
|
||||||
.setDataList(msgProp, list, null).write(request, response, fileName).dispose();
|
|
||||||
} else if (dict.getRegionType() == 3) {
|
|
||||||
List<ComplexStringCfgTemplate> list = Lists.newArrayList();
|
|
||||||
list.add(new ComplexStringCfgTemplate());
|
|
||||||
new ExportExcel(new FunctionServiceDict(), new FunctionRegionDict(), msgProp, null, clazz, 2)
|
|
||||||
.setDataList(msgProp, list, null).write(request, response, fileName).dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
msgProp = null;
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLogAction(BaseLogEntity log, List<FunctionServiceDict> serviceList) {
|
public void setLogAction(BaseLogEntity log, List<FunctionServiceDict> serviceList) {
|
||||||
if (!StringUtil.isEmpty(serviceList)) {
|
if (!StringUtil.isEmpty(serviceList)) {
|
||||||
@@ -2821,45 +2749,6 @@ public class BaseController {
|
|||||||
|
|
||||||
//全部审核通过,只查询当前条件下的所有未审核的配置 -批量审核通过/不通过
|
//全部审核通过,只查询当前条件下的所有未审核的配置 -批量审核通过/不通过
|
||||||
if(auditType.equals(1) || auditType.equals(2)) {
|
if(auditType.equals(1) || auditType.equals(2)) {
|
||||||
searchCfg.setIsValid(0);
|
|
||||||
searchCfg.setIsAudit(0);
|
|
||||||
searchAppCfg.setIsValid(0);
|
|
||||||
searchAppCfg.setIsAudit(0);
|
|
||||||
searchDigestCfg.setIsValid(0);
|
|
||||||
searchDigestCfg.setIsAudit(0);
|
|
||||||
searchFileSampleCfg.setIsValid(0);
|
|
||||||
searchFileSampleCfg.setIsAudit(0);
|
|
||||||
searchObjKeyringCfg.setIsValid(0);
|
|
||||||
searchObjKeyringCfg.setIsAudit(0);
|
|
||||||
searchTrustedCaCertCfg.setIsValid(0);
|
|
||||||
searchTrustedCaCertCfg.setIsAudit(0);
|
|
||||||
searchTrustedCaCrlCfg.setIsValid(0);
|
|
||||||
searchTrustedCaCrlCfg.setIsAudit(0);
|
|
||||||
searchDnsResStrategy.setIsValid(0);
|
|
||||||
searchDnsResStrategy.setIsAudit(0);
|
|
||||||
searchDnsIpCfg.setIsValid(0);
|
|
||||||
searchDnsIpCfg.setIsAudit(0);
|
|
||||||
searchIpPortCfg.setIsValid(0);
|
|
||||||
searchIpPortCfg.setIsAudit(0);
|
|
||||||
searchSignSampleCfg.setIsValid(0);
|
|
||||||
searchSignSampleCfg.setIsAudit(0);
|
|
||||||
searchDdosIpCfg.setIsValid(0);
|
|
||||||
searchDdosIpCfg.setIsAudit(0);
|
|
||||||
searchAppIpCfg.setIsValid(0);
|
|
||||||
searchAppIpCfg.setIsAudit(0);
|
|
||||||
searchAppHttpCfg.setIsValid(0);
|
|
||||||
searchAppHttpCfg.setIsAudit(0);
|
|
||||||
searchAppDomainCfg.setIsValid(0);
|
|
||||||
searchAppDomainCfg.setIsAudit(0);
|
|
||||||
searchAppTopicCfg.setIsValid(0);
|
|
||||||
searchAppTopicCfg.setIsAudit(0);
|
|
||||||
searchAppFeatureIndex.setIsValid(0);
|
|
||||||
searchAppFeatureIndex.setIsAudit(0);
|
|
||||||
searchAppSslCertCfg.setIsValid(0);
|
|
||||||
searchAppSslCertCfg.setIsAudit(0);
|
|
||||||
searchAsnIpCfg.setIsValid(0);
|
|
||||||
searchAsnIpCfg.setIsAudit(0);
|
|
||||||
|
|
||||||
if(auditType.equals(1)) {
|
if(auditType.equals(1)) {
|
||||||
auditBatchCfg.setIsAudit(1);
|
auditBatchCfg.setIsAudit(1);
|
||||||
auditBatchCfg.setIsValid(1);
|
auditBatchCfg.setIsValid(1);
|
||||||
@@ -2870,45 +2759,6 @@ public class BaseController {
|
|||||||
auditBatchCfg.setAuditTime(new Date());
|
auditBatchCfg.setAuditTime(new Date());
|
||||||
auditBatchCfg.setAuditorId(UserUtils.getUser().getId());
|
auditBatchCfg.setAuditorId(UserUtils.getUser().getId());
|
||||||
}else {
|
}else {
|
||||||
//全部取消通过,只查询当前条件下的所有审核通过的配置
|
|
||||||
searchCfg.setIsValid(1);
|
|
||||||
searchCfg.setIsAudit(1);
|
|
||||||
searchAppCfg.setIsValid(1);
|
|
||||||
searchAppCfg.setIsAudit(1);
|
|
||||||
searchDigestCfg.setIsValid(1);
|
|
||||||
searchDigestCfg.setIsAudit(1);
|
|
||||||
searchFileSampleCfg.setIsValid(1);
|
|
||||||
searchFileSampleCfg.setIsAudit(1);
|
|
||||||
searchObjKeyringCfg.setIsValid(1);
|
|
||||||
searchObjKeyringCfg.setIsAudit(1);
|
|
||||||
searchTrustedCaCertCfg.setIsValid(1);
|
|
||||||
searchTrustedCaCertCfg.setIsAudit(1);
|
|
||||||
searchTrustedCaCrlCfg.setIsValid(1);
|
|
||||||
searchTrustedCaCrlCfg.setIsAudit(1);
|
|
||||||
searchDnsResStrategy.setIsValid(1);
|
|
||||||
searchDnsResStrategy.setIsAudit(1);
|
|
||||||
searchDnsIpCfg.setIsValid(1);
|
|
||||||
searchDnsIpCfg.setIsAudit(1);
|
|
||||||
searchIpPortCfg.setIsValid(1);
|
|
||||||
searchIpPortCfg.setIsAudit(1);
|
|
||||||
searchSignSampleCfg.setIsValid(1);
|
|
||||||
searchSignSampleCfg.setIsAudit(1);
|
|
||||||
searchDdosIpCfg.setIsValid(1);
|
|
||||||
searchDdosIpCfg.setIsAudit(1);
|
|
||||||
searchAppIpCfg.setIsValid(1);
|
|
||||||
searchAppIpCfg.setIsAudit(1);
|
|
||||||
searchAppHttpCfg.setIsValid(1);
|
|
||||||
searchAppHttpCfg.setIsAudit(1);
|
|
||||||
searchAppDomainCfg.setIsValid(1);
|
|
||||||
searchAppDomainCfg.setIsAudit(1);
|
|
||||||
searchAppTopicCfg.setIsValid(1);
|
|
||||||
searchAppTopicCfg.setIsAudit(1);
|
|
||||||
searchAppFeatureIndex.setIsValid(1);
|
|
||||||
searchAppFeatureIndex.setIsAudit(1);
|
|
||||||
searchAppSslCertCfg.setIsValid(1);
|
|
||||||
searchAppSslCertCfg.setIsAudit(1);
|
|
||||||
searchAsnIpCfg.setIsValid(1);
|
|
||||||
searchAsnIpCfg.setIsAudit(1);
|
|
||||||
|
|
||||||
auditBatchCfg.setIsAudit(3);
|
auditBatchCfg.setIsAudit(3);
|
||||||
auditBatchCfg.setIsValid(0);
|
auditBatchCfg.setIsValid(0);
|
||||||
@@ -3368,11 +3218,42 @@ public class BaseController {
|
|||||||
//批量审核通过时,如果没有携带isValid检索条件,返回界面需要将isValid置为null
|
//批量审核通过时,如果没有携带isValid检索条件,返回界面需要将isValid置为null
|
||||||
if(!StringUtil.isEmpty(entity)) {
|
if(!StringUtil.isEmpty(entity)) {
|
||||||
BaseCfg base=(BaseCfg)entity ;
|
BaseCfg base=(BaseCfg)entity ;
|
||||||
if(!StringUtil.isEmpty(base.getSeltype()) && !base.getSeltype().equals("isValid")) {
|
base.setBatchAuditValue("");
|
||||||
base.setIsValid(null);
|
base.setBatchValidValue("");
|
||||||
BeanUtils.copyProperties(base, entity);
|
//配置目标状态:1 1 生效,isAudit条件置为1,有selType条件,且不是isValid不改,没有sel改为isValid并且为1
|
||||||
|
if(base.getIsAudit()==1 && base.getIsValid()==1){
|
||||||
|
base.setIsAudit(1);
|
||||||
|
if(!StringUtil.isEmpty(base.getSeltype()) && !base.getSeltype().equals("isValid")) {
|
||||||
|
base.setIsValid(null);
|
||||||
|
}else{
|
||||||
|
base.setIsValid(1);
|
||||||
|
base.setSeltype("isValid");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
//配置目标状态:2 0 不通过,isAudit条件置为2,有selType条件,且不是isValid不改,没有sel改为isValid并且为0
|
||||||
|
if(base.getIsAudit()==2 && base.getIsValid()==0){
|
||||||
|
base.setIsAudit(2);
|
||||||
|
if(!StringUtil.isEmpty(base.getSeltype()) && !base.getSeltype().equals("isValid")) {
|
||||||
|
base.setIsValid(null);
|
||||||
|
}else{
|
||||||
|
base.setIsValid(0);
|
||||||
|
base.setSeltype("isValid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//配置目标状态:3 0 取消
|
||||||
|
if(base.getIsAudit()==3 && base.getIsValid()==0){
|
||||||
|
base.setIsAudit(3);
|
||||||
|
if(!StringUtil.isEmpty(base.getSeltype()) && !base.getSeltype().equals("isValid")) {
|
||||||
|
base.setIsValid(null);
|
||||||
|
}else{
|
||||||
|
base.setIsValid(0);
|
||||||
|
base.setSeltype("isValid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BeanUtils.copyProperties(base, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
long end=System.currentTimeMillis();
|
long end=System.currentTimeMillis();
|
||||||
logger.warn("配置批量生效/失效耗时:"+(end-start));
|
logger.warn("配置批量生效/失效耗时:"+(end-start));
|
||||||
}
|
}
|
||||||
@@ -3391,7 +3272,6 @@ public class BaseController {
|
|||||||
page.setPageNo(1);
|
page.setPageNo(1);
|
||||||
page.setLastPage(false);
|
page.setLastPage(false);
|
||||||
|
|
||||||
// 只有未审核的配置可删除
|
|
||||||
CfgIndexInfo searchCfg = new CfgIndexInfo();
|
CfgIndexInfo searchCfg = new CfgIndexInfo();
|
||||||
AppPolicyCfg searchAppCfg=new AppPolicyCfg();
|
AppPolicyCfg searchAppCfg=new AppPolicyCfg();
|
||||||
FileDigestCfg searchDigestCfg=new FileDigestCfg();
|
FileDigestCfg searchDigestCfg=new FileDigestCfg();
|
||||||
@@ -3414,104 +3294,70 @@ public class BaseController {
|
|||||||
// 传递检索条件
|
// 传递检索条件
|
||||||
if(entity != null && (entity instanceof CfgIndexInfo)) {
|
if(entity != null && (entity instanceof CfgIndexInfo)) {
|
||||||
BeanUtils.copyProperties(entity, searchCfg);
|
BeanUtils.copyProperties(entity, searchCfg);
|
||||||
searchCfg.setIsValid(0);
|
|
||||||
searchCfg.setIsAudit(0);
|
|
||||||
searchCfg.setFunctionId(functionId);
|
searchCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppPolicyCfg)) {
|
if(entity != null && (entity instanceof AppPolicyCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppCfg);
|
BeanUtils.copyProperties(entity, searchAppCfg);
|
||||||
searchAppCfg.setIsValid(0);
|
|
||||||
searchAppCfg.setIsAudit(0);
|
|
||||||
searchAppCfg.setFunctionId(functionId);
|
searchAppCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof FileDigestCfg)) {
|
if(entity != null && (entity instanceof FileDigestCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchDigestCfg);
|
BeanUtils.copyProperties(entity, searchDigestCfg);
|
||||||
searchDigestCfg.setIsValid(0);
|
|
||||||
searchDigestCfg.setIsAudit(0);
|
|
||||||
searchDigestCfg.setFunctionId(functionId);
|
searchDigestCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AvFileSampleCfg)) {
|
if(entity != null && (entity instanceof AvFileSampleCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchFileSampleCfg);
|
BeanUtils.copyProperties(entity, searchFileSampleCfg);
|
||||||
searchFileSampleCfg.setIsValid(0);
|
|
||||||
searchFileSampleCfg.setIsAudit(0);
|
|
||||||
searchFileSampleCfg.setFunctionId(functionId);
|
searchFileSampleCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof DdosIpCfg)) {
|
if(entity != null && (entity instanceof DdosIpCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchDdosIpCfg);
|
BeanUtils.copyProperties(entity, searchDdosIpCfg);
|
||||||
searchDdosIpCfg.setIsValid(0);
|
|
||||||
searchDdosIpCfg.setIsAudit(0);
|
|
||||||
searchDdosIpCfg.setFunctionId(functionId);
|
searchDdosIpCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppHttpCfg)) {
|
if(entity != null && (entity instanceof AppHttpCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppHttpCfg);
|
BeanUtils.copyProperties(entity, searchAppHttpCfg);
|
||||||
searchAppHttpCfg.setIsValid(0);
|
|
||||||
searchAppHttpCfg.setIsAudit(0);
|
|
||||||
searchAppHttpCfg.setFunctionId(functionId);
|
searchAppHttpCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppHttpCfg)) {
|
if(entity != null && (entity instanceof AppHttpCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppHttpCfg);
|
BeanUtils.copyProperties(entity, searchAppHttpCfg);
|
||||||
searchAppHttpCfg.setIsValid(0);
|
|
||||||
searchAppHttpCfg.setIsAudit(0);
|
|
||||||
searchAppHttpCfg.setFunctionId(functionId);
|
searchAppHttpCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppDomainCfg)) {
|
if(entity != null && (entity instanceof AppDomainCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppDomainCfg);
|
BeanUtils.copyProperties(entity, searchAppDomainCfg);
|
||||||
searchAppDomainCfg.setIsValid(0);
|
|
||||||
searchAppDomainCfg.setIsAudit(0);
|
|
||||||
searchAppDomainCfg.setFunctionId(functionId);
|
searchAppDomainCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppTopicDomainCfg)) {
|
if(entity != null && (entity instanceof AppTopicDomainCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppTopicCfg);
|
BeanUtils.copyProperties(entity, searchAppTopicCfg);
|
||||||
searchAppTopicCfg.setIsValid(0);
|
|
||||||
searchAppTopicCfg.setIsAudit(0);
|
|
||||||
searchAppTopicCfg.setFunctionId(functionId);
|
searchAppTopicCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppSslCertCfg)) {
|
if(entity != null && (entity instanceof AppSslCertCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppSslCertCfg);
|
BeanUtils.copyProperties(entity, searchAppSslCertCfg);
|
||||||
searchAppSslCertCfg.setIsValid(0);
|
|
||||||
searchAppSslCertCfg.setIsAudit(0);
|
|
||||||
searchAppSslCertCfg.setFunctionId(functionId);
|
searchAppSslCertCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppIpCfg)) {
|
if(entity != null && (entity instanceof AppIpCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppIpCfg);
|
BeanUtils.copyProperties(entity, searchAppIpCfg);
|
||||||
searchAppIpCfg.setIsValid(0);
|
|
||||||
searchAppIpCfg.setIsAudit(0);
|
|
||||||
searchAppIpCfg.setFunctionId(functionId);
|
searchAppIpCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AppFeatureIndex)) {
|
if(entity != null && (entity instanceof AppFeatureIndex)) {
|
||||||
BeanUtils.copyProperties(entity, searchAppFeatureIndex);
|
BeanUtils.copyProperties(entity, searchAppFeatureIndex);
|
||||||
searchAppFeatureIndex.setIsValid(0);
|
|
||||||
searchAppFeatureIndex.setIsAudit(0);
|
|
||||||
searchAppFeatureIndex.setFunctionId(functionId);
|
searchAppFeatureIndex.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof DnsResStrategy)) {
|
if(entity != null && (entity instanceof DnsResStrategy)) {
|
||||||
BeanUtils.copyProperties(entity, searchDnsResStrategy);
|
BeanUtils.copyProperties(entity, searchDnsResStrategy);
|
||||||
searchDnsResStrategy.setIsValid(0);
|
|
||||||
searchDnsResStrategy.setIsAudit(0);
|
|
||||||
searchDnsResStrategy.setFunctionId(functionId);
|
searchDnsResStrategy.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof DnsIpCfg)) {
|
if(entity != null && (entity instanceof DnsIpCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchDnsIpCfg);
|
BeanUtils.copyProperties(entity, searchDnsIpCfg);
|
||||||
searchDnsIpCfg.setIsValid(0);
|
|
||||||
searchDnsIpCfg.setIsAudit(0);
|
|
||||||
searchDnsIpCfg.setFunctionId(functionId);
|
searchDnsIpCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof PxyObjKeyring)) {
|
if(entity != null && (entity instanceof PxyObjKeyring)) {
|
||||||
BeanUtils.copyProperties(entity, searchObjKeyringCfg);
|
BeanUtils.copyProperties(entity, searchObjKeyringCfg);
|
||||||
searchObjKeyringCfg.setIsValid(0);
|
|
||||||
searchObjKeyringCfg.setIsAudit(0);
|
|
||||||
searchObjKeyringCfg.setFunctionId(functionId);
|
searchObjKeyringCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof PxyObjTrustedCaCert)) {
|
if(entity != null && (entity instanceof PxyObjTrustedCaCert)) {
|
||||||
BeanUtils.copyProperties(entity, searchTrustedCaCertCfg);
|
BeanUtils.copyProperties(entity, searchTrustedCaCertCfg);
|
||||||
searchTrustedCaCertCfg.setIsValid(0);
|
|
||||||
searchTrustedCaCertCfg.setIsAudit(0);
|
|
||||||
searchTrustedCaCertCfg.setFunctionId(functionId);
|
searchTrustedCaCertCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
if(entity != null && (entity instanceof AsnIpCfg)) {
|
if(entity != null && (entity instanceof AsnIpCfg)) {
|
||||||
BeanUtils.copyProperties(entity, searchAsnIpCfg);
|
BeanUtils.copyProperties(entity, searchAsnIpCfg);
|
||||||
searchAsnIpCfg.setIsValid(0);
|
|
||||||
searchAsnIpCfg.setIsAudit(0);
|
|
||||||
searchAsnIpCfg.setFunctionId(functionId);
|
searchAsnIpCfg.setFunctionId(functionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -209,8 +209,6 @@ public class SystemController extends BaseController{
|
|||||||
public boolean clearPolicies(HttpServletRequest request, HttpServletResponse response) {
|
public boolean clearPolicies(HttpServletRequest request, HttpServletResponse response) {
|
||||||
try {
|
try {
|
||||||
systemService.clearPolicies();
|
systemService.clearPolicies();
|
||||||
/*ArrayList<Object> list = Lists.newArrayList();
|
|
||||||
System.out.println(list.get(6));*/
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Clear Policies Error",e);
|
logger.error("Clear Policies Error",e);
|
||||||
|
|||||||
@@ -126,9 +126,9 @@ public class AppCfgController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value = "ajaxAppName", method = RequestMethod.POST)
|
@RequestMapping(value = "ajaxAppName", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List<Map<String, String>> ajaxAppName(Model model, String ids) {
|
public List<Map<String, String>> ajaxAppName(Model model, String ids,Integer cfgType) {
|
||||||
List<Map<String, String>> dataList = new ArrayList<>();
|
List<Map<String, String>> dataList = new ArrayList<>();
|
||||||
List<SpecificServiceCfg> serviceList = specificServiceCfgService.getBySpecServiceCodes(ids);
|
List<SpecificServiceCfg> serviceList = specificServiceCfgService.getBySpecServiceCodes(ids,cfgType);
|
||||||
Map<String, String> appMap = new HashMap<>();
|
Map<String, String> appMap = new HashMap<>();
|
||||||
Map<String, String> behavMap = new HashMap<>();
|
Map<String, String> behavMap = new HashMap<>();
|
||||||
for (SpecificServiceCfg cfg : serviceList) {
|
for (SpecificServiceCfg cfg : serviceList) {
|
||||||
@@ -192,6 +192,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
|
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
|
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -356,8 +374,22 @@ public class AppCfgController extends BaseController {
|
|||||||
Page<AppIpCfg> searchPage = new Page<AppIpCfg>(request, response, "r");
|
Page<AppIpCfg> searchPage = new Page<AppIpCfg>(request, response, "r");
|
||||||
Page<AppIpCfg> page = appCfgService.findAppIpList(searchPage, cfg);
|
Page<AppIpCfg> page = appCfgService.findAppIpList(searchPage, cfg);
|
||||||
for (AppIpCfg entity : page.getList()) {
|
for (AppIpCfg entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
entity.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model, cfg);
|
initPageCondition(model, cfg);
|
||||||
@@ -377,6 +409,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String ipCfgForm(Model model, String ids, AppIpCfg entity) {
|
public String ipCfgForm(Model model, String ids, AppIpCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppIpCfg(Long.parseLong(ids));
|
entity = appCfgService.getAppIpCfg(Long.parseLong(ids));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -551,8 +601,22 @@ public class AppCfgController extends BaseController {
|
|||||||
Page<AppHttpCfg> searchPage = new Page<AppHttpCfg>(request, response, "r");
|
Page<AppHttpCfg> searchPage = new Page<AppHttpCfg>(request, response, "r");
|
||||||
Page<AppHttpCfg> page = appCfgService.findAppHttpList(searchPage, cfg);
|
Page<AppHttpCfg> page = appCfgService.findAppHttpList(searchPage, cfg);
|
||||||
for (AppHttpCfg entity : page.getList()) {
|
for (AppHttpCfg entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
entity.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
// entity.setCfgKeywords(entity.getCfgKeywords().replace(Constants.KEYWORD_EXPR,
|
// entity.setCfgKeywords(entity.getCfgKeywords().replace(Constants.KEYWORD_EXPR,
|
||||||
// "&"));
|
// "&"));
|
||||||
}
|
}
|
||||||
@@ -574,6 +638,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String httpCfgForm(Model model, String ids, AppHttpCfg entity) {
|
public String httpCfgForm(Model model, String ids, AppHttpCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppHttpCfg(Long.parseLong(ids));
|
entity = appCfgService.getAppHttpCfg(Long.parseLong(ids));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -714,8 +796,22 @@ public class AppCfgController extends BaseController {
|
|||||||
Page<AppDomainCfg> searchPage = new Page<AppDomainCfg>(request, response, "r");
|
Page<AppDomainCfg> searchPage = new Page<AppDomainCfg>(request, response, "r");
|
||||||
Page<AppDomainCfg> page = appCfgService.findAppDomainList(searchPage, cfg);
|
Page<AppDomainCfg> page = appCfgService.findAppDomainList(searchPage, cfg);
|
||||||
for (AppDomainCfg entity : page.getList()) {
|
for (AppDomainCfg entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
entity.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model, cfg);
|
initPageCondition(model, cfg);
|
||||||
@@ -735,6 +831,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String domainCfgForm(Model model, String ids, AppDomainCfg entity) {
|
public String domainCfgForm(Model model, String ids, AppDomainCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppDomainCfg(Long.parseLong(ids));
|
entity = appCfgService.getAppDomainCfg(Long.parseLong(ids));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -897,8 +1011,22 @@ public class AppCfgController extends BaseController {
|
|||||||
Page<AppByteCfg> searchPage = new Page<AppByteCfg>(request, response, "r");
|
Page<AppByteCfg> searchPage = new Page<AppByteCfg>(request, response, "r");
|
||||||
Page<AppByteCfg> page = appCfgService.findAppByteList(searchPage, cfg);
|
Page<AppByteCfg> page = appCfgService.findAppByteList(searchPage, cfg);
|
||||||
for (AppByteCfg entity : page.getList()) {
|
for (AppByteCfg entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
entity.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model, cfg);
|
initPageCondition(model, cfg);
|
||||||
@@ -918,6 +1046,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String byteCfgForm(Model model, String ids, AppByteCfg entity) {
|
public String byteCfgForm(Model model, String ids, AppByteCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppByteCfg(Long.parseLong(ids));
|
entity = appCfgService.getAppByteCfg(Long.parseLong(ids));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -1034,8 +1180,22 @@ public class AppCfgController extends BaseController {
|
|||||||
Page<AppSslCertCfg> searchPage = new Page<AppSslCertCfg>(request, response, "r");
|
Page<AppSslCertCfg> searchPage = new Page<AppSslCertCfg>(request, response, "r");
|
||||||
Page<AppSslCertCfg> page = appCfgService.findAppSslList(searchPage, cfg);
|
Page<AppSslCertCfg> page = appCfgService.findAppSslList(searchPage, cfg);
|
||||||
for (AppSslCertCfg entity : page.getList()) {
|
for (AppSslCertCfg entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
entity.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model, cfg);
|
initPageCondition(model, cfg);
|
||||||
@@ -1055,6 +1215,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String sslCfgForm(Model model, String ids, AppSslCertCfg entity) {
|
public String sslCfgForm(Model model, String ids, AppSslCertCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppSslCfg(Long.parseLong(ids));
|
entity = appCfgService.getAppSslCfg(Long.parseLong(ids));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -1084,7 +1262,13 @@ public class AppCfgController extends BaseController {
|
|||||||
entity.setAppCode(specificService.getSpecServiceCode());
|
entity.setAppCode(specificService.getSpecServiceCode());
|
||||||
}
|
}
|
||||||
appCfgService.saveOrUpdateAppSslCfg(entity);
|
appCfgService.saveOrUpdateAppSslCfg(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("saveAppSslCfg failed", e);
|
logger.error("saveAppSslCfg failed", e);
|
||||||
@@ -1196,7 +1380,9 @@ public class AppCfgController extends BaseController {
|
|||||||
Page<AppTcpCfg> page = appCfgService.findAppTcpList(searchPage, cfg);
|
Page<AppTcpCfg> page = appCfgService.findAppTcpList(searchPage, cfg);
|
||||||
for (AppTcpCfg entity : page.getList()) {
|
for (AppTcpCfg entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||||
entity.setAppName(app.getSpecServiceName());
|
if(app!=null){
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model, cfg);
|
initPageCondition(model, cfg);
|
||||||
@@ -1216,6 +1402,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String tcpCfgForm(Model model, String ids, AppTcpCfg entity) {
|
public String tcpCfgForm(Model model, String ids, AppTcpCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppTcpCfg(Long.parseLong(ids));
|
entity = appCfgService.getAppTcpCfg(Long.parseLong(ids));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -1331,8 +1535,22 @@ public class AppCfgController extends BaseController {
|
|||||||
Page<AppHeaderCfg> searchPage = new Page<AppHeaderCfg>(request, response, "r");
|
Page<AppHeaderCfg> searchPage = new Page<AppHeaderCfg>(request, response, "r");
|
||||||
Page<AppHeaderCfg> page = appCfgService.findAppHeaderList(searchPage, cfg);
|
Page<AppHeaderCfg> page = appCfgService.findAppHeaderList(searchPage, cfg);
|
||||||
for (AppHeaderCfg entity : page.getList()) {
|
for (AppHeaderCfg entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
entity.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model, cfg);
|
initPageCondition(model, cfg);
|
||||||
@@ -1352,6 +1570,24 @@ public class AppCfgController extends BaseController {
|
|||||||
public String headerCfgForm(Model model, String ids, AppHeaderCfg entity) {
|
public String headerCfgForm(Model model, String ids, AppHeaderCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppHeaderCfg(Long.parseLong(ids));
|
entity = appCfgService.getAppHeaderCfg(Long.parseLong(ids));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -1848,8 +2084,20 @@ public class AppCfgController extends BaseController {
|
|||||||
logTotal.put("sum",0L);
|
logTotal.put("sum",0L);
|
||||||
logTotals.add(logTotal);
|
logTotals.add(logTotal);
|
||||||
}
|
}
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
if (app != null) {
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(policy.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
policy.setSocialName(app.getSpecServiceName());
|
policy.setSocialName(app.getSpecServiceName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2059,7 +2307,9 @@ public class AppCfgController extends BaseController {
|
|||||||
|
|
||||||
for (AppIpCfg appIp : ipLists) {
|
for (AppIpCfg appIp : ipLists) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(appIp.getSpecServiceId());
|
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(appIp.getSpecServiceId());
|
||||||
appIp.setAppName(app.getSpecServiceName());
|
if(app!=null){
|
||||||
|
appIp.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
titleList.add(entity.getMenuNameCode());
|
titleList.add(entity.getMenuNameCode());
|
||||||
classMap.put(entity.getMenuNameCode(), AppIpCfg.class);
|
classMap.put(entity.getMenuNameCode(), AppIpCfg.class);
|
||||||
@@ -2132,8 +2382,22 @@ public class AppCfgController extends BaseController {
|
|||||||
http.setIsCaseInsenstive(0);
|
http.setIsCaseInsenstive(0);
|
||||||
}
|
}
|
||||||
http.setCfgKeywords(Functions.replace(http.getCfgKeywords(), "***and***", " "));
|
http.setCfgKeywords(Functions.replace(http.getCfgKeywords(), "***and***", " "));
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(http.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
http.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(http.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
http.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
titleList.add(entity.getMenuNameCode());
|
titleList.add(entity.getMenuNameCode());
|
||||||
@@ -2205,8 +2469,22 @@ public class AppCfgController extends BaseController {
|
|||||||
}else{
|
}else{
|
||||||
domain.setIsCaseInsenstive(0);
|
domain.setIsCaseInsenstive(0);
|
||||||
}
|
}
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(domain.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
domain.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(domain.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
domain.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
titleList.add(entity.getMenuNameCode());
|
titleList.add(entity.getMenuNameCode());
|
||||||
@@ -2280,8 +2558,22 @@ public class AppCfgController extends BaseController {
|
|||||||
ssl.setIsCaseInsenstive(0);
|
ssl.setIsCaseInsenstive(0);
|
||||||
}
|
}
|
||||||
ssl.setCfgKeywords(Functions.replace(ssl.getCfgKeywords(), "***and***", " "));
|
ssl.setCfgKeywords(Functions.replace(ssl.getCfgKeywords(), "***and***", " "));
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(ssl.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
ssl.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(ssl.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
ssl.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
titleList.add(entity.getMenuNameCode());
|
titleList.add(entity.getMenuNameCode());
|
||||||
classMap.put(entity.getMenuNameCode(), AppSslCertCfg.class);
|
classMap.put(entity.getMenuNameCode(), AppSslCertCfg.class);
|
||||||
|
|||||||
@@ -87,8 +87,22 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
Page<AppFeatureIndex> searchPage = new Page<AppFeatureIndex>(request, response, "r");
|
Page<AppFeatureIndex> searchPage = new Page<AppFeatureIndex>(request, response, "r");
|
||||||
Page<AppFeatureIndex> page = appMultiFeatureCfgService.findAppFeatureIndexList(searchPage, cfg);
|
Page<AppFeatureIndex> page = appMultiFeatureCfgService.findAppFeatureIndexList(searchPage, cfg);
|
||||||
for (AppFeatureIndex entity : page.getList()) {
|
for (AppFeatureIndex entity : page.getList()) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
entity.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model, cfg);
|
initPageCondition(model, cfg);
|
||||||
@@ -115,6 +129,24 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
entity.getFunctionId(), null));
|
entity.getFunctionId(), null));
|
||||||
entity.setNumCfgList(
|
entity.setNumCfgList(
|
||||||
appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -351,8 +383,22 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (AppFeatureIndex feature : ipLists) {
|
for (AppFeatureIndex feature : ipLists) {
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(feature.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务
|
||||||
feature.setAppName(app.getSpecServiceName());
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(feature.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
feature.setAppName(app.getSpecServiceName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String cfgIndexInfoNoExport = ",letter,whether_area_block,classification,attribute,label,do_log,block_type,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
String cfgIndexInfoNoExport = ",letter,whether_area_block,classification,attribute,label,do_log,block_type,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||||
String appComplexNoExport = ",do_log,block_type,config_describe,valid_identifier,is_audit,creator,creator"
|
String appComplexNoExport = ",do_log,block_type,config_describe,valid_identifier,is_audit,creator,creator"
|
||||||
@@ -362,7 +408,7 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
String ipPortInfoNoExport = ",do_log,block_type,config_describe,valid_identifier,is_audit,creator,creator"
|
String ipPortInfoNoExport = ",do_log,block_type,config_describe,valid_identifier,is_audit,creator,creator"
|
||||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||||
+ ",letter,whether_area_block,classification,attribute,label"
|
+ ",letter,whether_area_block,classification,attribute,label"
|
||||||
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
+ ",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,client_ip,src_ip_pattern,client_port,src_port_pattern,";
|
||||||
|
|
||||||
// 时间过滤
|
// 时间过滤
|
||||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
|
import com.nis.domain.SysDataDictionaryItem;
|
||||||
import com.nis.domain.configuration.AppPolicyCfg;
|
import com.nis.domain.configuration.AppPolicyCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
@@ -36,6 +37,7 @@ import com.nis.exceptions.CallExternalProceduresException;
|
|||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
|
import com.nis.util.DictUtils;
|
||||||
import com.nis.util.LogUtils;
|
import com.nis.util.LogUtils;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.controller.BaseController;
|
import com.nis.web.controller.BaseController;
|
||||||
@@ -130,6 +132,25 @@ public class BasicProtocolController extends BaseController {
|
|||||||
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
|
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
|
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
|
||||||
|
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -323,8 +344,20 @@ public class BasicProtocolController extends BaseController {
|
|||||||
logTotal.put("sum",0L);
|
logTotal.put("sum",0L);
|
||||||
logTotals.add(logTotal);
|
logTotals.add(logTotal);
|
||||||
}
|
}
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务 TODO
|
||||||
if (app != null) {
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(policy.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
policy.setAppName(app.getSpecServiceName());
|
policy.setAppName(app.getSpecServiceName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.nis.web.controller.configuration;
|
package com.nis.web.controller.configuration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@@ -19,38 +17,22 @@ import java.util.Properties;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.axis2.databinding.types.soapencoding.Array;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
import com.nis.domain.FunctionRegionDict;
|
|
||||||
import com.nis.domain.FunctionServiceDict;
|
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.basics.ServiceDictInfo;
|
import com.nis.domain.basics.ServiceDictInfo;
|
||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
|
||||||
import com.nis.domain.configuration.HttpBodyCfg;
|
|
||||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
|
||||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
|
||||||
import com.nis.domain.configuration.HttpUrlCfg;
|
import com.nis.domain.configuration.HttpUrlCfg;
|
||||||
import com.nis.domain.configuration.template.IpAllTemplate;
|
|
||||||
import com.nis.domain.configuration.template.IpCfgTemplate;
|
|
||||||
import com.nis.domain.specific.ConfigGroupInfo;
|
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.DateUtils;
|
import com.nis.util.DateUtils;
|
||||||
import com.nis.util.DictUtils;
|
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.util.excel.ExportExcel;
|
import com.nis.util.excel.ExportExcel;
|
||||||
import com.nis.util.excel.ImportExcel;
|
|
||||||
import com.nis.web.controller.BaseController;
|
import com.nis.web.controller.BaseController;
|
||||||
import com.nis.web.dao.configuration.IpCfgDao;
|
|
||||||
import com.nis.web.security.UserUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName: CommonController.java
|
* @ClassName: CommonController.java
|
||||||
@@ -288,15 +270,7 @@ public class CommonController extends BaseController {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
public void _importFileTemplate(HttpServletRequest request,HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode) {
|
|
||||||
this.importCfgTemplate(request, response, redirectAttributes, functionId, cfgRegionCode);
|
|
||||||
}
|
|
||||||
@Deprecated
|
|
||||||
public void _importFileTemplate(HttpServletRequest request,HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode,Class clazz) {
|
|
||||||
this.importCfgTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,clazz);
|
|
||||||
}
|
|
||||||
//ip配置导出
|
//ip配置导出
|
||||||
public void _exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response,
|
public void _exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response,
|
||||||
IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){
|
IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){
|
||||||
|
|||||||
@@ -151,6 +151,24 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
|||||||
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
|
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
|
||||||
if (StringUtils.isNotBlank(ids)) {
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
|
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
|
||||||
|
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(entity.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setSpecServiceId(app.getSpecServiceId());
|
||||||
|
}
|
||||||
|
|
||||||
initUpdateFormCondition(model, entity);
|
initUpdateFormCondition(model, entity);
|
||||||
} else {
|
} else {
|
||||||
initFormCondition(model, entity);
|
initFormCondition(model, entity);
|
||||||
@@ -347,8 +365,20 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
|||||||
logTotal.put("sum",0L);
|
logTotal.put("sum",0L);
|
||||||
logTotals.add(logTotal);
|
logTotals.add(logTotal);
|
||||||
}
|
}
|
||||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId());
|
// 查找社交应用的所有有效一级特定服务 TODO
|
||||||
if (app != null) {
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceCode(policy.getAppCode());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
policy.setBehaviorName(app.getSpecServiceName());
|
policy.setBehaviorName(app.getSpecServiceName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ public class DnsIpCfgController extends BaseController {
|
|||||||
}
|
}
|
||||||
titleList.add(entity.getMenuNameCode());
|
titleList.add(entity.getMenuNameCode());
|
||||||
classMap.put(entity.getMenuNameCode(), DnsIpCfg.class);
|
classMap.put(entity.getMenuNameCode(), DnsIpCfg.class);
|
||||||
String cfgIndexInfoNoExport = ",log_total,whether_area_block,client_ip,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
String cfgIndexInfoNoExport = ",log_total,whether_area_block,client_ip,src_ip_pattern,src_port_pattern,dest_port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||||
|
|
||||||
// 时间过滤
|
// 时间过滤
|
||||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ import com.nis.domain.configuration.IpPortCfg;
|
|||||||
import com.nis.domain.configuration.IpReuseDnatPolicyCfg;
|
import com.nis.domain.configuration.IpReuseDnatPolicyCfg;
|
||||||
import com.nis.domain.configuration.IpReusePolicyCfg;
|
import com.nis.domain.configuration.IpReusePolicyCfg;
|
||||||
import com.nis.domain.configuration.UserManage;
|
import com.nis.domain.configuration.UserManage;
|
||||||
import com.nis.domain.configuration.template.IpMultiplexPolicyTemplate;
|
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
@@ -121,26 +120,6 @@ public class IpMultiplexController extends CommonController {
|
|||||||
return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + cfg.getFunctionId();
|
return "redirect:" + adminPath + "/manipulation/ipmulitiplex/list?functionId=" + cfg.getFunctionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ip配置导入
|
|
||||||
/*
|
|
||||||
* @RequestMapping(value = "/import", method=RequestMethod.POST) public
|
|
||||||
* String importIp(String cfgName,RedirectAttributes redirectAttributes,
|
|
||||||
*
|
|
||||||
* @RequestParam("file") MultipartFile file,IpPortCfg cfg) {
|
|
||||||
* this._importIp(cfgName,redirectAttributes,
|
|
||||||
* file,cfg,IpMultiplexPolicyTemplate.class);
|
|
||||||
* redirectAttributes.addAttribute("urlPrefix","/manipulation/ipmulitiplex")
|
|
||||||
* ; redirectAttributes.addAttribute("requiresPermissionPrefix",
|
|
||||||
* "ip:mulitiplex"); return "redirect:" + adminPath
|
|
||||||
* +"/manipulation/ipmulitiplex/list?functionId="+cfg.getFunctionId(); }
|
|
||||||
*/
|
|
||||||
// ip模板下载
|
|
||||||
@RequestMapping(value = "import/template")
|
|
||||||
public void importFileTemplate(HttpServletRequest request, HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) {
|
|
||||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,
|
|
||||||
IpMultiplexPolicyTemplate.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ip配置导出
|
// ip配置导出
|
||||||
@RequestMapping(value = "export")
|
@RequestMapping(value = "export")
|
||||||
|
|||||||
@@ -112,20 +112,7 @@ public class RatelimitController extends CommonController {
|
|||||||
redirectAttributes.addAttribute("requiresPermissionPrefix","domain:ratelimit");
|
redirectAttributes.addAttribute("requiresPermissionPrefix","domain:ratelimit");
|
||||||
return "redirect:" + adminPath +"/manipulation/ratelimit/domain/list?functionId="+cfg.getFunctionId();
|
return "redirect:" + adminPath +"/manipulation/ratelimit/domain/list?functionId="+cfg.getFunctionId();
|
||||||
}
|
}
|
||||||
//ip配置导入
|
|
||||||
/*@RequestMapping(value = "/ip/import", method=RequestMethod.POST)
|
|
||||||
public String importIp(String cfgName,RedirectAttributes redirectAttributes,
|
|
||||||
@RequestParam("file") MultipartFile file,IpPortCfg cfg) {
|
|
||||||
this._importIp(cfgName,redirectAttributes, file,cfg,IpRateLimitTemplate.class);
|
|
||||||
redirectAttributes.addAttribute("urlPrefix","/manipulation/ratelimit/ip");
|
|
||||||
redirectAttributes.addAttribute("requiresPermissionPrefix","ip:ratelimit");
|
|
||||||
return "redirect:" + adminPath +"/manipulation/ratelimit/ip/list?functionId="+cfg.getFunctionId();
|
|
||||||
}*/
|
|
||||||
@RequestMapping(value = "/ip/import/template")
|
|
||||||
public void importFileTemplate(HttpServletRequest request,HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode) {
|
|
||||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,IpRateLimitTemplate.class);
|
|
||||||
}
|
|
||||||
//ip配置导出
|
//ip配置导出
|
||||||
@RequestMapping(value = "/ip/export")
|
@RequestMapping(value = "/ip/export")
|
||||||
public void exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response,
|
public void exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response,
|
||||||
|
|||||||
@@ -311,7 +311,13 @@ public class AvController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
avCfgService.saveOrUpdateAvFileSample(entity, srcFile);
|
avCfgService.saveOrUpdateAvFileSample(entity, srcFile);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("文件上传失败", e);
|
logger.error("文件上传失败", e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -339,7 +345,13 @@ public class AvController extends BaseController {
|
|||||||
RedirectAttributes redirectAttributes, String ids, AvSignSampleCfg entity) {
|
RedirectAttributes redirectAttributes, String ids, AvSignSampleCfg entity) {
|
||||||
try {
|
try {
|
||||||
avCfgService.saveOrUpdateAvSignSample(entity);
|
avCfgService.saveOrUpdateAvSignSample(entity);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("saveAudioSignSample failed", e);
|
logger.error("saveAudioSignSample failed", e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -591,7 +603,13 @@ public class AvController extends BaseController {
|
|||||||
// if(!avSignSampleCfg.getAction().equals(avSignSampleCfg.getActionOld())||!avSignSampleCfg.getIsValid().equals(avSignSampleCfg.getIsValidOld())){
|
// if(!avSignSampleCfg.getAction().equals(avSignSampleCfg.getActionOld())||!avSignSampleCfg.getIsValid().equals(avSignSampleCfg.getIsValidOld())){
|
||||||
try {
|
try {
|
||||||
avCfgService.auditAvSignSample(avSignSampleCfg);
|
avCfgService.auditAvSignSample(avSignSampleCfg);
|
||||||
addMessage(redirectAttributes, "success", "save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(avSignSampleCfg.getIsValid()) || avSignSampleCfg.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|||||||
import com.nis.domain.FunctionRegionDict;
|
import com.nis.domain.FunctionRegionDict;
|
||||||
import com.nis.domain.FunctionServiceDict;
|
import com.nis.domain.FunctionServiceDict;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.configuration.AppPolicyCfg;
|
|
||||||
import com.nis.domain.configuration.AsnKeywordCfg;
|
import com.nis.domain.configuration.AsnKeywordCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
@@ -66,7 +65,6 @@ import com.nis.domain.configuration.template.SnatTemplate;
|
|||||||
import com.nis.domain.configuration.template.StringAllNotDoLogTemplate;
|
import com.nis.domain.configuration.template.StringAllNotDoLogTemplate;
|
||||||
import com.nis.domain.configuration.template.StringAllTemplate;
|
import com.nis.domain.configuration.template.StringAllTemplate;
|
||||||
import com.nis.domain.configuration.template.TopicWebsiteTemplate;
|
import com.nis.domain.configuration.template.TopicWebsiteTemplate;
|
||||||
import com.nis.domain.specific.SpecificServiceCfg;
|
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
|
|||||||
@@ -14,15 +14,11 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.taglibs.standard.functions.Functions;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
import com.nis.domain.FunctionRegionDict;
|
import com.nis.domain.FunctionRegionDict;
|
||||||
@@ -31,10 +27,6 @@ import com.nis.domain.configuration.BaseStringCfg;
|
|||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||||
import com.nis.domain.configuration.DnsResStrategy;
|
import com.nis.domain.configuration.DnsResStrategy;
|
||||||
import com.nis.domain.configuration.ComplexStringCfgTemplate;
|
|
||||||
import com.nis.domain.configuration.template.IpCfgTemplate;
|
|
||||||
import com.nis.domain.specific.ConfigGroupInfo;
|
|
||||||
import com.nis.domain.configuration.StringCfgTemplate;
|
|
||||||
import com.nis.domain.configuration.HttpBodyCfg;
|
import com.nis.domain.configuration.HttpBodyCfg;
|
||||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||||
@@ -47,7 +39,6 @@ import com.nis.util.Constants;
|
|||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
import com.nis.util.LogUtils;
|
import com.nis.util.LogUtils;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.util.excel.ImportExcel;
|
|
||||||
import com.nis.web.controller.BaseController;
|
import com.nis.web.controller.BaseController;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
|
|
||||||
@@ -642,13 +633,6 @@ public class WebsiteController extends BaseController {
|
|||||||
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
// 下载导入模板
|
|
||||||
@RequestMapping(value = "import/template")
|
|
||||||
public void importFileTemplate(HttpServletRequest request, HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) {
|
|
||||||
this.importCfgTemplate(request, response, redirectAttributes, functionId, cfgRegionCode);
|
|
||||||
}
|
|
||||||
// http配置导入
|
// http配置导入
|
||||||
/*
|
/*
|
||||||
* @RequestMapping(value = "importHttp", method=RequestMethod.POST) public
|
* @RequestMapping(value = "importHttp", method=RequestMethod.POST) public
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.nis.web.controller.configuration.ntc;
|
package com.nis.web.controller.configuration.ntc;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -26,13 +25,11 @@ import com.nis.domain.configuration.CfgIndexInfo;
|
|||||||
import com.nis.domain.configuration.HttpUrlCfg;
|
import com.nis.domain.configuration.HttpUrlCfg;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.domain.configuration.template.WhiteListIpTemplate;
|
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.LogUtils;
|
import com.nis.util.LogUtils;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.controller.configuration.CommonController;
|
import com.nis.web.controller.configuration.CommonController;
|
||||||
import com.nis.web.security.UserUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 白名单
|
* 白名单
|
||||||
@@ -404,24 +401,6 @@ public class WhiteListController extends CommonController {
|
|||||||
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ip配置导入
|
|
||||||
/*
|
|
||||||
* @RequestMapping(value = "ip/import", method=RequestMethod.POST) public
|
|
||||||
* String importIp(String cfgName,RedirectAttributes redirectAttributes,
|
|
||||||
*
|
|
||||||
* @RequestParam("file") MultipartFile file,IpPortCfg cfg) {
|
|
||||||
* this._importIp(cfgName,redirectAttributes,
|
|
||||||
* file,cfg,WhiteListIpTemplate.class); return "redirect:" + adminPath
|
|
||||||
* +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId(); }
|
|
||||||
*/
|
|
||||||
// ip模板下载
|
|
||||||
@RequestMapping(value = "ip/import/template")
|
|
||||||
public void importFileTemplate(HttpServletRequest request, HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes, Integer functionId, Integer cfgRegionCode) {
|
|
||||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode,
|
|
||||||
WhiteListIpTemplate.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ip配置导出
|
// ip配置导出
|
||||||
@RequestMapping(value = "ip/export")
|
@RequestMapping(value = "ip/export")
|
||||||
public void exportIp(String columns, Model model, HttpServletRequest request, HttpServletResponse response,
|
public void exportIp(String columns, Model model, HttpServletRequest request, HttpServletResponse response,
|
||||||
|
|||||||
@@ -120,11 +120,6 @@ public class ControlController extends CommonController {
|
|||||||
redirectAttributes.addAttribute("requiresPermissionPrefix","control:ip");
|
redirectAttributes.addAttribute("requiresPermissionPrefix","control:ip");
|
||||||
return "redirect:" + adminPath +"/proxy/control/ip/list?functionId="+cfg.getFunctionId();
|
return "redirect:" + adminPath +"/proxy/control/ip/list?functionId="+cfg.getFunctionId();
|
||||||
}
|
}
|
||||||
@RequestMapping(value = "/ip/import/template")
|
|
||||||
public void importFileTemplate(HttpServletRequest request,HttpServletResponse response,
|
|
||||||
RedirectAttributes redirectAttributes,Integer functionId,Integer cfgRegionCode) {
|
|
||||||
this._importFileTemplate(request, response, redirectAttributes, functionId, cfgRegionCode);
|
|
||||||
}
|
|
||||||
//ip配置导出
|
//ip配置导出
|
||||||
@RequestMapping(value = "/ip/export")
|
@RequestMapping(value = "/ip/export")
|
||||||
public void exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response,
|
public void exportIp(String columns,Model model,HttpServletRequest request,HttpServletResponse response,
|
||||||
|
|||||||
@@ -157,7 +157,13 @@ public class ControlPolicyController extends BaseController{
|
|||||||
,RedirectAttributes redirectAttributes){
|
,RedirectAttributes redirectAttributes){
|
||||||
try{
|
try{
|
||||||
controlPolicyService.saveOrUpdate(cfg,areaCfgIds);
|
controlPolicyService.saveOrUpdate(cfg,areaCfgIds);
|
||||||
addMessage(redirectAttributes,"success","save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("信息保存失败",e);
|
logger.error("信息保存失败",e);
|
||||||
if(e instanceof MaatConvertException) {
|
if(e instanceof MaatConvertException) {
|
||||||
|
|||||||
@@ -118,7 +118,13 @@ public class FileStrategyController extends CommonController {
|
|||||||
cfg.setContentLength(file.length());//文件长度
|
cfg.setContentLength(file.length());//文件长度
|
||||||
}
|
}
|
||||||
proxyFileStrategyService.saveOrUpdate(cfg);
|
proxyFileStrategyService.saveOrUpdate(cfg);
|
||||||
addMessage(redirectAttributes,"success","save_success");
|
//配置仅保存
|
||||||
|
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
|
||||||
|
addMessage(redirectAttributes, "success", "save_success");
|
||||||
|
}else {
|
||||||
|
//配置直接生效
|
||||||
|
addMessage(redirectAttributes, "success", "audit_success");
|
||||||
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("信息保存失败",e);
|
logger.error("信息保存失败",e);
|
||||||
if(e instanceof MaatConvertException) {
|
if(e instanceof MaatConvertException) {
|
||||||
|
|||||||
@@ -399,6 +399,15 @@ public class InterceptController extends CommonController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (214==entity.getFunctionId()) {
|
||||||
|
for (CfgIndexInfo cfg : ipLists) {
|
||||||
|
if (!StringUtil.isBlank(cfg.getUserRegion1())) {
|
||||||
|
cfg.setUserRegion1(DictUtils.getDictLabels("SPOOFING_IP_TYPE", cfg.getUserRegion1(),cfg.getUserRegion1()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pktBinList = BaseStringCfg.replaceBaseKeyList(pktBinList);
|
pktBinList = BaseStringCfg.replaceBaseKeyList(pktBinList);
|
||||||
httpUrlList = BaseStringCfg.baseHexList(httpUrlList);
|
httpUrlList = BaseStringCfg.baseHexList(httpUrlList);
|
||||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||||
|
|||||||
@@ -79,4 +79,8 @@ public interface SchedulerDao extends CrudDao<ScheduleCfg> {
|
|||||||
*/
|
*/
|
||||||
int updateScheduleExceNew(ScheduleExceInfo exceInfo);
|
int updateScheduleExceNew(ScheduleExceInfo exceInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失效所有定时任务
|
||||||
|
*/
|
||||||
|
void inValidAllSchedule();
|
||||||
}
|
}
|
||||||
@@ -364,6 +364,12 @@
|
|||||||
compile_Id = #{compileId} and issue_status = #{issueStatus}
|
compile_Id = #{compileId} and issue_status = #{issueStatus}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="inValidAllSchedule">
|
||||||
|
update schedule_cfg
|
||||||
|
<set>
|
||||||
|
del_flag = 0
|
||||||
|
</set>
|
||||||
|
WHERE del_flag =1
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -5,7 +5,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="columns">
|
<sql id="columns">
|
||||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.src_ip_pattern,r.dest_ip_pattern,r.src_port_pattern,r.dest_port_pattern,r.src_port
|
||||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||||
@@ -91,8 +92,11 @@
|
|||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -100,8 +104,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
@@ -121,15 +128,32 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
|
||||||
<if test="creatorName != null and creatorName !=''">
|
<if test="creatorName != null and creatorName !=''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -227,8 +251,11 @@
|
|||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -236,8 +263,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
@@ -348,9 +378,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -391,8 +419,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -476,11 +504,17 @@
|
|||||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null" >
|
<if test="srcIpPattern != null" >
|
||||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
src_ip_pattern = #{srcIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null" >
|
<if test="destIpPattern != null" >
|
||||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
dest_ip_pattern =#{destIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="srcPortPattern != null" >
|
||||||
|
src_port_pattern = #{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null" >
|
||||||
|
dest_port_pattern = #{destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort != ''" >
|
<if test="srcPort != null and srcPort != ''" >
|
||||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||||
@@ -567,7 +601,7 @@
|
|||||||
INSERT INTO asn_ip_cfg
|
INSERT INTO asn_ip_cfg
|
||||||
(CFG_DESC,ACTION,IS_VALID,IS_AUDIT,CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,
|
(CFG_DESC,ACTION,IS_VALID,IS_AUDIT,CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,
|
||||||
AUDIT_TIME,SERVICE_ID,REQUEST_ID,region_id,compile_id,IS_AREA_EFFECTIVE,CLASSIFY,ATTRIBUTE,LABLE,
|
AUDIT_TIME,SERVICE_ID,REQUEST_ID,region_id,compile_id,IS_AREA_EFFECTIVE,CLASSIFY,ATTRIBUTE,LABLE,
|
||||||
AREA_EFFECTIVE_IDS,function_id,ip_type,src_ip_address,ip_pattern,port_pattern,src_port,
|
AREA_EFFECTIVE_IDS,function_id,ip_type,src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,src_port,
|
||||||
protocol,protocol_id,direction,dest_port,dest_ip_address,cfg_type,cfg_region_code,
|
protocol,protocol_id,direction,dest_port,dest_ip_address,cfg_type,cfg_region_code,
|
||||||
asn_ip_group,user_region1,user_region2,user_region3,user_region4,user_region5,organization,country,detail)
|
asn_ip_group,user_region1,user_region2,user_region3,user_region4,user_region5,organization,country,detail)
|
||||||
VALUES
|
VALUES
|
||||||
@@ -594,8 +628,10 @@
|
|||||||
#{asnIp.functionId,jdbcType=INTEGER},
|
#{asnIp.functionId,jdbcType=INTEGER},
|
||||||
#{asnIp.ipType,jdbcType=INTEGER},
|
#{asnIp.ipType,jdbcType=INTEGER},
|
||||||
#{asnIp.srcIpAddress,jdbcType=VARCHAR},
|
#{asnIp.srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{asnIp.ipPattern,jdbcType=INTEGER},
|
#{asnIp.srcIpPattern,jdbcType=INTEGER},
|
||||||
#{asnIp.portPattern,jdbcType=INTEGER},
|
#{asnIp.destIpPattern,jdbcType=INTEGER},
|
||||||
|
#{asnIp.srcPortPattern,jdbcType=INTEGER},
|
||||||
|
#{asnIp.destPortPattern,jdbcType=INTEGER},
|
||||||
#{asnIp.srcPort,jdbcType=VARCHAR},
|
#{asnIp.srcPort,jdbcType=VARCHAR},
|
||||||
#{asnIp.protocol,jdbcType=INTEGER},
|
#{asnIp.protocol,jdbcType=INTEGER},
|
||||||
#{asnIp.protocolId,jdbcType=INTEGER},
|
#{asnIp.protocolId,jdbcType=INTEGER},
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
<result column="app_code" property="appCode" jdbcType="INTEGER" />
|
<result column="app_code" property="appCode" jdbcType="INTEGER" />
|
||||||
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||||
@@ -235,7 +236,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -394,7 +396,7 @@
|
|||||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||||
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
||||||
r.ATTRIBUTE,r.LABLE,AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
r.ATTRIBUTE,r.LABLE,AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||||
r.IP_TYPE, r.IP_PATTERN, r.SRC_IP_ADDRESS,r.DEST_IP_ADDRESS, r.PORT_PATTERN,r.SRC_PORT,DEST_PORT,
|
r.IP_TYPE, r.SRC_IP_PATTERN,r.DEST_IP_PATTERN, r.SRC_IP_ADDRESS,r.DEST_IP_ADDRESS, r.SRC_PORT_PATTERN,r.DEST_PORT_PATTERN,r.SRC_PORT,DEST_PORT,
|
||||||
r.DIRECTION,r.PROTOCOL,r.DO_LOG,r.USER_REGION1,r.USER_REGION2,r.USER_REGION3,r.USER_REGION4,r.USER_REGION5
|
r.DIRECTION,r.PROTOCOL,r.DO_LOG,r.USER_REGION1,r.USER_REGION2,r.USER_REGION3,r.USER_REGION4,r.USER_REGION5
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -461,7 +463,7 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -618,8 +620,13 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||||
@@ -719,21 +726,42 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -878,8 +906,13 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
||||||
@@ -887,8 +920,11 @@
|
|||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -896,8 +932,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
@@ -914,15 +953,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -1027,8 +1082,13 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||||
@@ -1042,15 +1102,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -1130,8 +1206,13 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||||
@@ -1142,15 +1223,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -1262,15 +1359,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -1369,8 +1482,13 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||||
@@ -1564,8 +1682,13 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||||
@@ -1579,15 +1702,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -1823,12 +1962,12 @@
|
|||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||||
IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT,
|
IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,DEST_PORT,
|
||||||
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
||||||
)values (
|
)values (
|
||||||
<include refid="AppCommonCfg_Value_List" />,
|
<include refid="AppCommonCfg_Value_List" />,
|
||||||
#{ipType,jdbcType=INTEGER}, #{ipPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
#{ipType,jdbcType=INTEGER}, #{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
||||||
#{portPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
||||||
#{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion1,jdbcType=VARCHAR},#{userRegion2,jdbcType=VARCHAR}
|
#{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion1,jdbcType=VARCHAR},#{userRegion2,jdbcType=VARCHAR}
|
||||||
,#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR}
|
,#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
@@ -1839,12 +1978,12 @@
|
|||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||||
IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT,
|
IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,DEST_PORT,
|
||||||
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
||||||
)values (
|
)values (
|
||||||
<include refid="AppCommonCfg_Value_List" />,
|
<include refid="AppCommonCfg_Value_List" />,
|
||||||
#{ipType,jdbcType=INTEGER}, #{ipPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
#{ipType,jdbcType=INTEGER}, #{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
||||||
#{portPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
||||||
#{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion1,jdbcType=VARCHAR},#{userRegion2,jdbcType=VARCHAR}
|
#{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion1,jdbcType=VARCHAR},#{userRegion2,jdbcType=VARCHAR}
|
||||||
,#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR}
|
,#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
@@ -1855,7 +1994,7 @@
|
|||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||||
IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT,
|
IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,DEST_PORT,
|
||||||
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
||||||
)values
|
)values
|
||||||
<foreach collection ="list" item="appIp" separator =",">
|
<foreach collection ="list" item="appIp" separator =",">
|
||||||
@@ -1868,9 +2007,10 @@
|
|||||||
#{appIp.requestId,jdbcType=INTEGER},#{appIp.compileId,jdbcType=INTEGER},#{appIp.isAreaEffective,jdbcType=INTEGER},
|
#{appIp.requestId,jdbcType=INTEGER},#{appIp.compileId,jdbcType=INTEGER},#{appIp.isAreaEffective,jdbcType=INTEGER},
|
||||||
#{appIp.classify,jdbcType=VARCHAR},#{appIp.attribute,jdbcType=VARCHAR},#{appIp.lable,jdbcType=VARCHAR},
|
#{appIp.classify,jdbcType=VARCHAR},#{appIp.attribute,jdbcType=VARCHAR},#{appIp.lable,jdbcType=VARCHAR},
|
||||||
#{appIp.areaEffectiveIds,jdbcType=VARCHAR},#{appIp.ratelimit,jdbcType=VARCHAR},#{appIp.functionId,jdbcType=INTEGER},
|
#{appIp.areaEffectiveIds,jdbcType=VARCHAR},#{appIp.ratelimit,jdbcType=VARCHAR},#{appIp.functionId,jdbcType=INTEGER},
|
||||||
#{appIp.cfgType,jdbcType=VARCHAR},#{appIp.cfgRegionCode,jdbcType=INTEGER},
|
#{appIp.cfgType,jdbcType=VARCHAR},#{appIp.cfgRegionCode,jdbcType=INTEGER},#{appIp.ipType,jdbcType=INTEGER},
|
||||||
#{appIp.ipType,jdbcType=INTEGER}, #{appIp.ipPattern,jdbcType=INTEGER},#{appIp.srcIpAddress,jdbcType=VARCHAR},#{appIp.destIpAddress,jdbcType=VARCHAR},
|
#{appIp.srcIpPattern,jdbcType=INTEGER},#{appIp.destIpPattern,jdbcType=INTEGER},#{appIp.srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{appIp.portPattern,jdbcType=INTEGER},#{appIp.srcPort,jdbcType=VARCHAR},#{appIp.destPort,jdbcType=VARCHAR},#{appIp.direction,jdbcType=INTEGER},
|
#{appIp.destIpAddress,jdbcType=VARCHAR},#{appIp.srcPortPattern,jdbcType=INTEGER},#{appIp.destPortPattern,jdbcType=INTEGER},
|
||||||
|
#{appIp.srcPort,jdbcType=VARCHAR},#{appIp.destPort,jdbcType=VARCHAR},#{appIp.direction,jdbcType=INTEGER},
|
||||||
#{appIp.protocol,jdbcType=INTEGER},#{appIp.doLog,jdbcType=INTEGER},#{appIp.userRegion1,jdbcType=VARCHAR},#{appIp.userRegion2,jdbcType=VARCHAR}
|
#{appIp.protocol,jdbcType=INTEGER},#{appIp.doLog,jdbcType=INTEGER},#{appIp.userRegion1,jdbcType=VARCHAR},#{appIp.userRegion2,jdbcType=VARCHAR}
|
||||||
,#{appIp.userRegion3,jdbcType=VARCHAR},#{appIp.userRegion4,jdbcType=VARCHAR},#{appIp.userRegion5,jdbcType=VARCHAR}
|
,#{appIp.userRegion3,jdbcType=VARCHAR},#{appIp.userRegion4,jdbcType=VARCHAR},#{appIp.userRegion5,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
@@ -2057,9 +2197,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -2090,8 +2228,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -2294,8 +2432,11 @@
|
|||||||
<if test="ipType != null" >
|
<if test="ipType != null" >
|
||||||
IP_TYPE = #{ipType,jdbcType=INTEGER},
|
IP_TYPE = #{ipType,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
IP_PATTERN=#{ipPattern,jdbcType=INTEGER},
|
SRC_IP_PATTERN=#{srcIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
DEST_IP_PATTERN=#{destIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR},
|
SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
@@ -2303,8 +2444,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR},
|
DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
PORT_PATTERN=#{portPattern,jdbcType=INTEGER},
|
SRC_PORT_PATTERN=#{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
DEST_PORT_PATTERN=#{destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
SRC_PORT=#{srcPort,jdbcType=VARCHAR},
|
SRC_PORT=#{srcPort,jdbcType=VARCHAR},
|
||||||
|
|||||||
@@ -42,7 +42,8 @@
|
|||||||
<result column="app_code" property="appCode" jdbcType="INTEGER" />
|
<result column="app_code" property="appCode" jdbcType="INTEGER" />
|
||||||
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||||
@@ -196,7 +197,7 @@
|
|||||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||||
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
||||||
r.ATTRIBUTE,r.LABLE,AREA_EFFECTIVE_IDS,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
r.ATTRIBUTE,r.LABLE,AREA_EFFECTIVE_IDS,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||||
r.IP_TYPE, r.IP_PATTERN, r.SRC_IP_ADDRESS,r.DEST_IP_ADDRESS, r.PORT_PATTERN,r.SRC_PORT,DEST_PORT,
|
r.IP_TYPE, r.src_ip_pattern,r.dest_ip_pattern, r.SRC_IP_ADDRESS,r.DEST_IP_ADDRESS, r.src_port_pattern,r.dest_port_pattern,r.SRC_PORT,DEST_PORT,
|
||||||
r.DIRECTION,r.PROTOCOL,r.DO_LOG,r.USER_REGION1,r.USER_REGION2,r.USER_REGION3,r.USER_REGION4,r.USER_REGION5
|
r.DIRECTION,r.PROTOCOL,r.DO_LOG,r.USER_REGION1,r.USER_REGION2,r.USER_REGION3,r.USER_REGION4,r.USER_REGION5
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -266,21 +267,42 @@
|
|||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="specServiceId != null">
|
<if test="appCode != null">
|
||||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
AND r.app_code=#{appCode,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="appCode == null">
|
||||||
|
<if test="specServiceId != null">
|
||||||
|
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -540,13 +562,13 @@
|
|||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||||
IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT,
|
IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,DEST_PORT,
|
||||||
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
DIRECTION,PROTOCOL,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
||||||
)values (
|
)values (
|
||||||
<include refid="AppCommonCfg_Value_List" />,
|
<include refid="AppCommonCfg_Value_List" />,
|
||||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER}, #{ipPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
#{ipType,jdbcType=INTEGER}, #{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
||||||
#{portPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
||||||
#{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion1,jdbcType=VARCHAR},#{userRegion2,jdbcType=VARCHAR}
|
#{protocol,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion1,jdbcType=VARCHAR},#{userRegion2,jdbcType=VARCHAR}
|
||||||
,#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR}
|
,#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.nis.web.dao.configuration.AreaIpCfgDao" >
|
<mapper namespace="com.nis.web.dao.configuration.AreaIpCfgDao" >
|
||||||
<resultMap id="BaseIpMap" type="com.nis.domain.configuration.AreaIpCfg" >
|
<resultMap id="AreaIpMap" type="com.nis.domain.configuration.AreaIpCfg" >
|
||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||||
@@ -36,13 +37,13 @@
|
|||||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="AreaIpCfg_Column_List_with_id" >
|
<sql id="AreaIpCfg_Column_List_with_id" >
|
||||||
CFG_ID,CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,
|
CFG_ID,CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,
|
||||||
DEST_PORT,DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
DEST_PORT,DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID
|
||||||
</sql>
|
</sql>
|
||||||
<select id="getByCompileId" resultMap="BaseIpMap" >
|
<select id="getByCompileId" resultMap="AreaIpMap" >
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="AreaIpCfg_Column_List_with_id" />
|
<include refid="AreaIpCfg_Column_List_with_id" />
|
||||||
FROM area_ip_cfg
|
FROM area_ip_cfg
|
||||||
@@ -76,9 +77,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -109,8 +108,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -147,9 +146,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -180,8 +177,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -255,11 +252,17 @@
|
|||||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null" >
|
<if test="srcIpPattern != null" >
|
||||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
src_ip_pattern = #{srcIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null" >
|
<if test="destIpPattern != null" >
|
||||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
dest_ip_pattern = #{destIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="srcPortPattern != null" >
|
||||||
|
src_port_pattern = #{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null" >
|
||||||
|
dest_port_pattern = #{destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort != ''" >
|
<if test="srcPort != null and srcPort != ''" >
|
||||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||||
|
|||||||
@@ -128,15 +128,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND a.IS_VALID in (${batchValidValue})
|
||||||
AND a.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND a.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND a.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -94,7 +95,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -193,7 +195,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -224,7 +227,7 @@
|
|||||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -238,7 +241,7 @@
|
|||||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.function_id,r.do_log,r.do_blacklist
|
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.function_id,r.do_log,r.do_blacklist
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="AvVoipIp_Column" >
|
<sql id="AvVoipIp_Column" >
|
||||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.src_ip_pattern,r.dest_ip_pattern,r.src_port_pattern,r.dest_port_pattern,r.src_port
|
||||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||||
@@ -252,7 +255,7 @@
|
|||||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
|
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="AvContIp_Column" >
|
<sql id="AvContIp_Column" >
|
||||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.src_ip_pattern,r.dest_ip_pattern,r.src_port_pattern,r.dest_port_pattern,r.src_port
|
||||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||||
@@ -307,15 +310,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -816,8 +835,10 @@
|
|||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,
|
||||||
ip_pattern,
|
src_ip_pattern,
|
||||||
port_pattern,
|
dest_ip_pattern,
|
||||||
|
src_port_pattern,
|
||||||
|
dest_port_pattern,
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -848,8 +869,10 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{destIpPattern,jdbcType=INTEGER},
|
||||||
|
#{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -1053,9 +1076,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -1086,8 +1107,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -1237,11 +1258,17 @@
|
|||||||
<if test="voipIp != null and voipIp.srcIpAddress != null and voipIp.srcIpAddress != ''" >
|
<if test="voipIp != null and voipIp.srcIpAddress != null and voipIp.srcIpAddress != ''" >
|
||||||
src_ip_address = #{voipIp.srcIpAddress,jdbcType=VARCHAR},
|
src_ip_address = #{voipIp.srcIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="voipIp != null and voipIp.ipPattern != null" >
|
<if test="voipIp != null and voipIp.srcIpPattern != null" >
|
||||||
ip_pattern = #{voipIp.ipPattern,jdbcType=INTEGER},
|
src_ip_pattern = #{voipIp.srcIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="voipIp != null and voipIp.portPattern != null" >
|
<if test="voipIp != null and voipIp.destIpPattern != null" >
|
||||||
port_pattern = #{voipIp.portPattern,jdbcType=INTEGER},
|
dest_ip_pattern = #{voipIp.destIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="voipIp != null and voipIp.srcPortPattern != null" >
|
||||||
|
src_port_pattern = #{voipIp.srcPortPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="voipIp != null and voipIp.destPortPattern != null" >
|
||||||
|
dest_port_pattern = #{voipIp.destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="voipIp != null and voipIp.srcPort != null and voipIp.srcPort != ''" >
|
<if test="voipIp != null and voipIp.srcPort != null and voipIp.srcPort != ''" >
|
||||||
src_port = #{voipIp.srcPort,jdbcType=VARCHAR},
|
src_port = #{voipIp.srcPort,jdbcType=VARCHAR},
|
||||||
@@ -1652,9 +1679,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -1686,8 +1711,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -1762,11 +1787,17 @@
|
|||||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null" >
|
<if test="srcIpPattern != null" >
|
||||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
src_ip_pattern = #{srcIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null" >
|
<if test="destIpPattern != null" >
|
||||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
dest_ip_pattern = #{destIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="srcPortPattern != null" >
|
||||||
|
src_port_pattern = #{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null" >
|
||||||
|
dest_port_pattern = #{destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort != ''" >
|
<if test="srcPort != null and srcPort != ''" >
|
||||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||||
@@ -2113,6 +2144,12 @@
|
|||||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
||||||
<if test="isAudit != null">
|
<if test="isAudit != null">
|
||||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="auditTime !=null ">
|
||||||
|
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="auditorId != null" >
|
||||||
|
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
editor_id = #{editorId,jdbcType=INTEGER} ,
|
editor_id = #{editorId,jdbcType=INTEGER} ,
|
||||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -162,7 +163,7 @@
|
|||||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.do_log,a.do_blacklist
|
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.do_log,a.do_blacklist
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -207,15 +208,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND a.IS_VALID in (${batchValidValue})
|
||||||
AND a.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND a.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND a.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -432,9 +449,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -465,8 +480,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
|
|||||||
@@ -74,7 +74,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -172,7 +173,7 @@
|
|||||||
a.do_blacklist
|
a.do_blacklist
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -218,15 +219,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND a.IS_VALID in (${batchValidValue})
|
||||||
AND a.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND a.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND a.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -489,9 +506,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -527,8 +542,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
|
|||||||
@@ -80,7 +80,8 @@
|
|||||||
<result column="app_code" property="appCode" jdbcType="INTEGER" />
|
<result column="app_code" property="appCode" jdbcType="INTEGER" />
|
||||||
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||||
@@ -240,7 +241,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -381,7 +383,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -701,7 +704,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -775,12 +779,12 @@
|
|||||||
<sql id="DdosIpCfg_Column" >
|
<sql id="DdosIpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.action,a.is_valid,a.is_audit,a.creator_id,a.audit_time,
|
a.cfg_id,a.cfg_desc,a.action,a.is_valid,a.is_audit,a.creator_id,a.audit_time,
|
||||||
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||||
a.area_effective_ids,a.function_id,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.area_effective_ids,a.function_id,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.pps_threadshold,
|
,a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.pps_threadshold,
|
||||||
a.antiddos_protocol,a.bps_threadshold
|
a.antiddos_protocol,a.bps_threadshold
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port,
|
a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port,
|
||||||
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.compile_id
|
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.compile_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_AllColumn" >
|
<sql id="IpCfg_AllColumn" >
|
||||||
@@ -788,7 +792,7 @@
|
|||||||
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||||
a.area_effective_ids,a.function_id,a.do_log,a.dns_strategy_id,a.user_region1,a.user_region2,
|
a.area_effective_ids,a.function_id,a.do_log,a.dns_strategy_id,a.user_region1,a.user_region2,
|
||||||
a.user_region3,a.user_region4,a.user_region5,
|
a.user_region3,a.user_region4,a.user_region5,
|
||||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port,
|
a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port,
|
||||||
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type
|
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpDropCfg_Column" >
|
<sql id="IpDropCfg_Column" >
|
||||||
@@ -796,11 +800,11 @@
|
|||||||
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||||
a.area_effective_ids,a.function_id,a.user_region1,a.user_region2,
|
a.area_effective_ids,a.function_id,a.user_region1,a.user_region2,
|
||||||
a.user_region3,a.user_region4,a.user_region5,
|
a.user_region3,a.user_region4,a.user_region5,
|
||||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port,
|
a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port,
|
||||||
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type
|
a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="AsnIpCfg_Column" >
|
<sql id="AsnIpCfg_Column" >
|
||||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.asn_ip_group,
|
,a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.asn_ip_group,
|
||||||
a.user_region1,a.region_id
|
a.user_region1,a.region_id
|
||||||
</sql>
|
</sql>
|
||||||
@@ -883,7 +887,7 @@
|
|||||||
,a.area_effective_ids,a.function_id,a.cfg_region_code,a.compile_id
|
,a.area_effective_ids,a.function_id,a.cfg_region_code,a.compile_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="DnsIpCfgColumns">
|
<sql id="DnsIpCfgColumns">
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -907,7 +911,7 @@
|
|||||||
a.feature_table_type,a.app_code,a.spec_service_id,a.cfg_region_code
|
a.feature_table_type,a.app_code,a.spec_service_id,a.cfg_region_code
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="AppIpCfg_Column" >
|
<sql id="AppIpCfg_Column" >
|
||||||
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.compile_id
|
,a.protocol,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.compile_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -928,7 +932,7 @@
|
|||||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||||
a.ATTRIBUTE,a.LABLE,AREA_EFFECTIVE_IDS,a.RATELIMIT,a.FUNCTION_ID,a.CFG_TYPE,a.CFG_REGION_CODE,
|
a.ATTRIBUTE,a.LABLE,AREA_EFFECTIVE_IDS,a.RATELIMIT,a.FUNCTION_ID,a.CFG_TYPE,a.CFG_REGION_CODE,
|
||||||
a.IP_TYPE, a.IP_PATTERN, a.SRC_IP_ADDRESS,a.DEST_IP_ADDRESS, a.PORT_PATTERN,a.SRC_PORT,DEST_PORT,
|
a.IP_TYPE, a.src_ip_pattern,a.dest_ip_pattern, a.SRC_IP_ADDRESS,a.DEST_IP_ADDRESS, a.src_port_pattern,a.dest_port_pattern,a.SRC_PORT,DEST_PORT,
|
||||||
a.DIRECTION,a.PROTOCOL,a.DO_LOG,a.USER_REGION1,a.USER_REGION2,a.USER_REGION3,a.USER_REGION4,a.USER_REGION5
|
a.DIRECTION,a.PROTOCOL,a.DO_LOG,a.USER_REGION1,a.USER_REGION2,a.USER_REGION3,a.USER_REGION4,a.USER_REGION5
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -1629,7 +1633,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="getAsnIpList" resultType="com.nis.domain.basics.AsnIpCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
<select id="getAsnIpList" resultType="com.nis.domain.basics.AsnIpCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||||
select
|
select
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="columns">
|
<sql id="columns">
|
||||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.src_ip_pattern,r.dest_ip_pattern,r.src_port_pattern,r.dest_port_pattern,r.src_port
|
||||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||||
@@ -80,8 +81,11 @@
|
|||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -89,8 +93,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
@@ -110,15 +117,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName !=''">
|
<if test="creatorName != null and creatorName !=''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -217,9 +240,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -254,8 +275,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -332,11 +353,17 @@
|
|||||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null" >
|
<if test="srcIpPattern != null" >
|
||||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
src_ip_pattern = #{srcIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null" >
|
<if test="destIpPattern != null" >
|
||||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
dest_ip_pattern = #{destIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="srcPortPattern != null" >
|
||||||
|
src_port_pattern = #{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null" >
|
||||||
|
dest_port_pattern = #{destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort != ''" >
|
<if test="srcPort != null and srcPort != ''" >
|
||||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -40,7 +41,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="columns">
|
<sql id="columns">
|
||||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.src_ip_pattern,r.dest_ip_pattern,r.src_port_pattern,r.dest_port_pattern,r.src_port
|
||||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||||
@@ -83,8 +84,11 @@
|
|||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -92,8 +96,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
@@ -113,15 +120,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName !=''">
|
<if test="creatorName != null and creatorName !=''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -232,9 +255,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -267,8 +288,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -343,11 +364,17 @@
|
|||||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null" >
|
<if test="srcIpPattern != null" >
|
||||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
src_ip_pattern = #{srcIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null" >
|
<if test="destIpPattern != null" >
|
||||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
dest_ip_pattern = #{destIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="srcPortPattern != null" >
|
||||||
|
src_port_pattern = #{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null" >
|
||||||
|
dest_port_pattern = #{destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort != ''" >
|
<if test="srcPort != null and srcPort != ''" >
|
||||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||||
|
|||||||
@@ -85,15 +85,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -35,7 +35,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -172,7 +173,7 @@
|
|||||||
a.do_blacklist
|
a.do_blacklist
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -231,9 +232,31 @@
|
|||||||
<if test="isValid == null">
|
<if test="isValid == null">
|
||||||
AND a.IS_VALID != -1
|
AND a.IS_VALID != -1
|
||||||
</if>
|
</if>
|
||||||
<if test="isAudit != null">
|
<choose>
|
||||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
|
AND a.IS_VALID in (${batchValidValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isValid != null">
|
||||||
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND a.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND a.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -453,9 +476,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -491,8 +512,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -1141,15 +1162,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND a.IS_VALID in (${batchValidValue})
|
||||||
AND a.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND a.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND a.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.nis.web.dao.configuration.IpCfgDao" >
|
<mapper namespace="com.nis.web.dao.configuration.IpCfgDao" >
|
||||||
|
<!-- 基础 -->
|
||||||
<resultMap id="BaseIpMap" type="com.nis.domain.configuration.BaseIpCfg" >
|
<resultMap id="BaseIpMap" type="com.nis.domain.configuration.BaseIpCfg" >
|
||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||||
@@ -85,7 +87,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -116,14 +119,14 @@
|
|||||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="BaseIpCfg_Column_List_with_id" >
|
<sql id="BaseIpCfg_Column_List_with_id" >
|
||||||
CFG_ID, CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT,
|
CFG_ID, CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,DEST_PORT,
|
||||||
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID,IR_TYPE,USER_REGION1,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID,IR_TYPE,USER_REGION1,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="BaseIpCfg_Column_List_with_id_name" >
|
<sql id="BaseIpCfg_Column_List_with_id_name" >
|
||||||
CFG_ID, CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT,
|
CFG_ID, CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,DEST_PORT,
|
||||||
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||||
@@ -133,7 +136,8 @@
|
|||||||
<choose>
|
<choose>
|
||||||
<when test="page !=null and page.alias != null and page.alias != ''">
|
<when test="page !=null and page.alias != null and page.alias != ''">
|
||||||
${page.alias}.CFG_ID as cfgId, ${page.alias}.CFG_DESC as cfgDesc,${page.alias}.CFG_REGION_CODE as cfgRegionCode,${page.alias}.CFG_TYPE as cfgType, ${page.alias}.IP_TYPE as ipType,
|
${page.alias}.CFG_ID as cfgId, ${page.alias}.CFG_DESC as cfgDesc,${page.alias}.CFG_REGION_CODE as cfgRegionCode,${page.alias}.CFG_TYPE as cfgType, ${page.alias}.IP_TYPE as ipType,
|
||||||
${page.alias}.IP_PATTERN as ipPattern, ${page.alias}.SRC_IP_ADDRESS as srcIpAddress, ${page.alias}.DEST_IP_ADDRESS as destIpAddress, ${page.alias}.PORT_PATTERN as portPattern,${page.alias}.SRC_PORT as srcPort,${page.alias}.DEST_PORT as destPort,
|
${page.alias}.SRC_IP_PATTERN as srcIpPattern,${page.alias}.DEST_IP_PATTERN as destIpPattern, ${page.alias}.SRC_IP_ADDRESS as srcIpAddress, ${page.alias}.DEST_IP_ADDRESS as destIpAddress,
|
||||||
|
${page.alias}.SRC_PORT_PATTERN as srcPortPattern,${page.alias}.DEST_PORT_PATTERN as destPortPattern,${page.alias}.SRC_PORT as srcPort,${page.alias}.DEST_PORT as destPort,
|
||||||
${page.alias}.DIRECTION as direction,${page.alias}.PROTOCOL as protocol,${page.alias}.PROTOCOL_ID as protocolId,${page.alias}.ACTION as action,${page.alias}.IS_VALID as isValid,${page.alias}.IS_AUDIT as isAudit,
|
${page.alias}.DIRECTION as direction,${page.alias}.PROTOCOL as protocol,${page.alias}.PROTOCOL_ID as protocolId,${page.alias}.ACTION as action,${page.alias}.IS_VALID as isValid,${page.alias}.IS_AUDIT as isAudit,
|
||||||
${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime,
|
${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime,
|
||||||
${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify,
|
${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify,
|
||||||
@@ -147,7 +151,8 @@
|
|||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.CFG_REGION_CODE as cfgRegionCode,r.CFG_TYPE as cfgType, r.IP_TYPE as ipType,
|
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.CFG_REGION_CODE as cfgRegionCode,r.CFG_TYPE as cfgType, r.IP_TYPE as ipType,
|
||||||
r.IP_PATTERN as ipPattern, r.SRC_IP_ADDRESS as srcIpAddress, r.DEST_IP_ADDRESS as destIpAddress, r.PORT_PATTERN as portPattern,r.SRC_PORT as srcPort,r.DEST_PORT as destPort,
|
r.src_ip_pattern as srcIpPattern,r.dest_ip_pattern as destIpPattern, r.SRC_IP_ADDRESS as srcIpAddress, r.DEST_IP_ADDRESS as destIpAddress,
|
||||||
|
r.src_port_pattern as srcPortPattern,r.dest_port_pattern as destPortPattern,r.SRC_PORT as srcPort,r.DEST_PORT as destPort,
|
||||||
r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
||||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||||
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
||||||
@@ -163,8 +168,7 @@
|
|||||||
</sql>
|
</sql>
|
||||||
<sql id="BaseIpCfg_Column_List" >
|
<sql id="BaseIpCfg_Column_List" >
|
||||||
CFG_DESC,CFG_REGION_CODE,CFG_TYPE,
|
CFG_DESC,CFG_REGION_CODE,CFG_TYPE,
|
||||||
IP_TYPE,IP_PATTERN,SRC_IP_ADDRESS,DEST_IP_ADDRESS,
|
IP_TYPE,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_IP_ADDRESS,DEST_IP_ADDRESS,SRC_PORT_PATTERN,DEST_PORT_PATTERN,SRC_PORT,DEST_PORT,DIRECTION,
|
||||||
PORT_PATTERN,SRC_PORT,DEST_PORT,DIRECTION,
|
|
||||||
PROTOCOL,PROTOCOL_ID,ACTION,
|
PROTOCOL,PROTOCOL_ID,ACTION,
|
||||||
IS_VALID,IS_AUDIT,CREATOR_ID,
|
IS_VALID,IS_AUDIT,CREATOR_ID,
|
||||||
CREATE_TIME,EDITOR_ID,EDIT_TIME,
|
CREATE_TIME,EDITOR_ID,EDIT_TIME,
|
||||||
@@ -176,8 +180,8 @@
|
|||||||
</sql>
|
</sql>
|
||||||
<sql id="BaseIpCfg_Value_List" >
|
<sql id="BaseIpCfg_Value_List" >
|
||||||
#{cfgDesc,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{cfgType,jdbcType=VARCHAR},
|
#{cfgDesc,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{cfgType,jdbcType=VARCHAR},
|
||||||
#{ipType,jdbcType=INTEGER}, #{ipPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
#{ipType,jdbcType=INTEGER}, #{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},#{srcIpAddress,jdbcType=VARCHAR},#{destIpAddress,jdbcType=VARCHAR},
|
||||||
#{portPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},#{srcPort,jdbcType=VARCHAR},#{destPort,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
|
||||||
#{protocol,jdbcType=INTEGER},#{protocolId,jdbcType=INTEGER},#{action,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},#{protocolId,jdbcType=INTEGER},#{action,jdbcType=INTEGER},
|
||||||
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
|
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
|
||||||
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
||||||
@@ -201,7 +205,7 @@
|
|||||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.do_blacklist
|
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.do_blacklist
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -291,8 +295,11 @@
|
|||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND ${page.alias}.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND ${page.alias}.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND ${page.alias}.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
AND ${page.alias}.SRC_IP_PATTERN=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
AND ${page.alias}.DEST_IP_PATTERN=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND ${page.alias}.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND ${page.alias}.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -300,8 +307,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND ${page.alias}.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND ${page.alias}.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND ${page.alias}.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
AND ${page.alias}.SRC_PORT_PATTERN=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
AND ${page.alias}.DEST_PORT_PATTERN=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND ${page.alias}.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND ${page.alias}.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
@@ -416,8 +426,11 @@
|
|||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
@@ -425,8 +438,11 @@
|
|||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="destPortPattern != null">
|
||||||
|
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
@@ -596,8 +612,11 @@
|
|||||||
<if test="ipType != null" >
|
<if test="ipType != null" >
|
||||||
IP_TYPE = #{ipType,jdbcType=INTEGER},
|
IP_TYPE = #{ipType,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="ipPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
IP_PATTERN=#{ipPattern,jdbcType=INTEGER},
|
SRC_IP_PATTERN=#{srcIpPattern,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="destIpPattern != null">
|
||||||
|
DEST_IP_PATTERN=#{destIpPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR},
|
SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
@@ -606,7 +625,7 @@
|
|||||||
DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR},
|
DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="portPattern != null">
|
<if test="portPattern != null">
|
||||||
PORT_PATTERN=#{portPattern,jdbcType=INTEGER},
|
PORT_PATTERN=#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
SRC_PORT=#{srcPort,jdbcType=VARCHAR},
|
SRC_PORT=#{srcPort,jdbcType=VARCHAR},
|
||||||
@@ -744,7 +763,8 @@
|
|||||||
<select id="getListByCfgIdWithName" resultMap="BaseIpMapWithUser">
|
<select id="getListByCfgIdWithName" resultMap="BaseIpMapWithUser">
|
||||||
select
|
select
|
||||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.CFG_REGION_CODE as cfgRegionCode,r.CFG_TYPE as cfgType, r.IP_TYPE as ipType,
|
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.CFG_REGION_CODE as cfgRegionCode,r.CFG_TYPE as cfgType, r.IP_TYPE as ipType,
|
||||||
r.IP_PATTERN as ipPattern, r.SRC_IP_ADDRESS as srcIpAddress, r.DEST_IP_ADDRESS as destIpAddress, r.PORT_PATTERN as portPattern,r.SRC_PORT as srcPort,r.DEST_PORT as destPort,
|
r.src_ip_pattern as srcIpPattern,r.dest_ip_pattern as destIpPattern, r.SRC_IP_ADDRESS as srcIpAddress, r.DEST_IP_ADDRESS as destIpAddress,
|
||||||
|
r.src_port_pattern as srcPortPattern,r.dest_port_pattern as destPortPattern,r.SRC_PORT as srcPort,r.DEST_PORT as destPort,
|
||||||
r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
||||||
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
|
||||||
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
|
||||||
@@ -927,9 +947,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -965,8 +983,10 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{destIpPattern,jdbcType=INTEGER},
|
||||||
|
#{srcPortPattern,jdbcType=INTEGER},
|
||||||
|
#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
@@ -1078,15 +1098,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND a.IS_VALID in (${batchValidValue})
|
||||||
AND a.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND a.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND a.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -124,7 +125,7 @@
|
|||||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.do_log,a.do_blacklist
|
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.do_log,a.do_blacklist
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -384,9 +385,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -417,8 +416,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
|
|||||||
@@ -171,15 +171,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -254,15 +270,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND r.IS_VALID in (${batchValidValue})
|
||||||
AND r.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND r.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND r.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -137,7 +138,7 @@
|
|||||||
a.do_blacklist
|
a.do_blacklist
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -188,15 +189,31 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
<choose>
|
||||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
<!-- 判断是否批量操作 -->
|
||||||
</if>
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
<if test="isValid == null">
|
AND a.IS_VALID in (${batchValidValue})
|
||||||
AND a.IS_VALID != -1
|
</when>
|
||||||
</if>
|
<otherwise>
|
||||||
<if test="isAudit != null">
|
<if test="isValid != null">
|
||||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isValid == null">
|
||||||
|
AND a.IS_VALID != -1
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<!-- 判断是否批量操作 -->
|
||||||
|
<when test="batchAuditValue != null and batchAuditValue != ''">
|
||||||
|
AND a.IS_AUDIT in(${batchAuditValue})
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<if test="isAudit != null">
|
||||||
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="creatorName != null and creatorName != ''">
|
<if test="creatorName != null and creatorName != ''">
|
||||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -567,9 +584,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -605,8 +620,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -125,7 +126,7 @@
|
|||||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,do_log
|
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,do_log
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="IpCfg_Column" >
|
<sql id="IpCfg_Column" >
|
||||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.src_ip_pattern,a.dest_ip_pattern,a.src_port_pattern,a.dest_port_pattern,a.src_port
|
||||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||||
@@ -353,9 +354,7 @@
|
|||||||
AREA_EFFECTIVE_IDS,
|
AREA_EFFECTIVE_IDS,
|
||||||
function_id,
|
function_id,
|
||||||
ip_type,
|
ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
protocol_id,
|
protocol_id,
|
||||||
@@ -386,8 +385,8 @@
|
|||||||
#{functionId,jdbcType=INTEGER},
|
#{functionId,jdbcType=INTEGER},
|
||||||
#{ipType,jdbcType=INTEGER},
|
#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{protocolId,jdbcType=INTEGER},
|
#{protocolId,jdbcType=INTEGER},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SpecificServiceCfg getBySpecServiceId(Integer specServiceId);
|
SpecificServiceCfg getBySpecServiceId(Integer specServiceId);
|
||||||
List<SpecificServiceCfg> getBySpecServiceCodes(@Param("ids")String ids);
|
List<SpecificServiceCfg> getBySpecServiceCodes(@Param("ids")String ids,@Param("cfgType")Integer cfgType);
|
||||||
/**
|
/**
|
||||||
* 查询所有符合条件顶层分页列表
|
* 查询所有符合条件顶层分页列表
|
||||||
* @param specificServiceCfg
|
* @param specificServiceCfg
|
||||||
|
|||||||
@@ -39,11 +39,11 @@
|
|||||||
<!-- 根据id查出对象 -->
|
<!-- 根据id查出对象 -->
|
||||||
<select id="getBySpecServiceId" resultType="com.nis.domain.specific.SpecificServiceCfg" parameterType="java.lang.Integer">
|
<select id="getBySpecServiceId" resultType="com.nis.domain.specific.SpecificServiceCfg" parameterType="java.lang.Integer">
|
||||||
select <include refid="specificServiceCfgColumns" />
|
select <include refid="specificServiceCfgColumns" />
|
||||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
from specific_service_cfg s where s.spec_service_id = #{specServiceId} and s.is_valid=1
|
||||||
</select>
|
</select>
|
||||||
<select id="getBySpecServiceCodes" resultType="com.nis.domain.specific.SpecificServiceCfg" parameterType="java.lang.String">
|
<select id="getBySpecServiceCodes" resultType="com.nis.domain.specific.SpecificServiceCfg">
|
||||||
select <include refid="specificServiceCfgColumns" />
|
select <include refid="specificServiceCfgColumns" />
|
||||||
from specific_service_cfg s where s.spec_service_code in(${ids})
|
from specific_service_cfg s where s.spec_service_code in(${ids}) and s.is_valid=1 and s.cfg_type=#{cfgType}
|
||||||
</select>
|
</select>
|
||||||
<select id="getRepeat" resultType="com.nis.domain.specific.SpecificServiceCfg" >
|
<select id="getRepeat" resultType="com.nis.domain.specific.SpecificServiceCfg" >
|
||||||
select <include refid="specificServiceCfgColumns" />
|
select <include refid="specificServiceCfgColumns" />
|
||||||
@@ -54,11 +54,11 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="getParentType" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
<select id="getParentType" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||||
select cfg_type
|
select cfg_type
|
||||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
from specific_service_cfg s where s.spec_service_id = #{specServiceId} and s.is_valid=1
|
||||||
</select>
|
</select>
|
||||||
<select id="getParentCode" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
<select id="getParentCode" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||||
select spec_service_code
|
select spec_service_code
|
||||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
from specific_service_cfg s where s.spec_service_id = #{specServiceId} and s.is_valid=1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查出所有符合条件的顶层数据 -->
|
<!-- 查出所有符合条件的顶层数据 -->
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
<id column="host_id" property="hostId" jdbcType="INTEGER" />
|
<id column="host_id" property="hostId" jdbcType="INTEGER" />
|
||||||
<result column="spec_service_id" property="specServiceId" jdbcType="INTEGER" />
|
<result column="spec_service_id" property="specServiceId" jdbcType="INTEGER" />
|
||||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
<result column="src_ip_pattern" property="srcIpPattern" jdbcType="INTEGER" />
|
||||||
|
<result column="dest_ip_pattern" property="destIpPattern" jdbcType="INTEGER" />
|
||||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||||
@@ -121,9 +122,7 @@ from specific_service_host_cfg s where s.spec_service_id = #{specServiceId}
|
|||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||||
insert into specific_service_host_cfg (spec_service_id,ip_type,
|
insert into specific_service_host_cfg (spec_service_id,ip_type,
|
||||||
src_ip_address,
|
src_ip_address,SRC_IP_PATTERN,DEST_IP_PATTERN,SRC_PORT_PATTERN,DEST_PORT_PATTERN,
|
||||||
ip_pattern,
|
|
||||||
port_pattern,
|
|
||||||
src_port,
|
src_port,
|
||||||
protocol,
|
protocol,
|
||||||
direction,
|
direction,
|
||||||
@@ -132,8 +131,8 @@ from specific_service_host_cfg s where s.spec_service_id = #{specServiceId}
|
|||||||
is_valid,is_audit,creator_id,create_time,editor_id,edit_time,auditor_id,audit_time)
|
is_valid,is_audit,creator_id,create_time,editor_id,edit_time,auditor_id,audit_time)
|
||||||
values(#{specServiceId},#{ipType,jdbcType=INTEGER},
|
values(#{specServiceId},#{ipType,jdbcType=INTEGER},
|
||||||
#{srcIpAddress,jdbcType=VARCHAR},
|
#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
#{ipPattern,jdbcType=INTEGER},
|
#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
#{portPattern,jdbcType=INTEGER},
|
#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
#{srcPort,jdbcType=VARCHAR},
|
#{srcPort,jdbcType=VARCHAR},
|
||||||
#{protocol,jdbcType=INTEGER},
|
#{protocol,jdbcType=INTEGER},
|
||||||
#{direction,jdbcType=INTEGER},
|
#{direction,jdbcType=INTEGER},
|
||||||
@@ -146,10 +145,10 @@ from specific_service_host_cfg s where s.spec_service_id = #{specServiceId}
|
|||||||
update specific_service_host_cfg s set
|
update specific_service_host_cfg s set
|
||||||
s.spec_service_id = #{specServiceId},
|
s.spec_service_id = #{specServiceId},
|
||||||
s.IP_TYPE = #{ipType,jdbcType=INTEGER},
|
s.IP_TYPE = #{ipType,jdbcType=INTEGER},
|
||||||
s.IP_PATTERN=#{ipPattern,jdbcType=INTEGER},
|
s.IP_PATTERN=#{srcIpPattern,jdbcType=INTEGER},#{destIpPattern,jdbcType=INTEGER},
|
||||||
s.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR},
|
s.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR},
|
||||||
s.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR},
|
s.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR},
|
||||||
s.PORT_PATTERN=#{portPattern,jdbcType=INTEGER},
|
s.PORT_PATTERN=#{srcPortPattern,jdbcType=INTEGER},#{destPortPattern,jdbcType=INTEGER},
|
||||||
s.SRC_PORT=#{srcPort,jdbcType=VARCHAR},
|
s.SRC_PORT=#{srcPort,jdbcType=VARCHAR},
|
||||||
s.DEST_PORT=#{destPort,jdbcType=VARCHAR},
|
s.DEST_PORT=#{destPort,jdbcType=VARCHAR},
|
||||||
s.direction = #{direction,jdbcType=INTEGER},
|
s.direction = #{direction,jdbcType=INTEGER},
|
||||||
|
|||||||
@@ -1053,31 +1053,45 @@ public abstract class BaseService {
|
|||||||
*/
|
*/
|
||||||
public static List<IpCfg> ipConvert(IpCfg dstIp, BaseIpCfg srcIp) {
|
public static List<IpCfg> ipConvert(IpCfg dstIp, BaseIpCfg srcIp) {
|
||||||
List<IpCfg> ipConvertList = Lists.newArrayList();
|
List<IpCfg> ipConvertList = Lists.newArrayList();
|
||||||
boolean isRange = ((srcIp.getIpPattern() != null && srcIp.getIpPattern() == 2)
|
List<IpCfg> tempList = Lists.newArrayList();
|
||||||
|| (srcIp.getSrcIpAddress() != null && srcIp.getSrcIpAddress().indexOf("-") > -1)
|
List<IpCfg> tempList1 = Lists.newArrayList();
|
||||||
|| (srcIp.getDestIpAddress() != null && srcIp.getDestIpAddress().indexOf("-") > -1));
|
if (srcIp.getIpType().equals(4)) {// IP V4
|
||||||
if (isRange) {
|
if(srcIp.getSrcIpPattern().equals(2)) {//源IP范围
|
||||||
List<IpCfg> tempList = Lists.newArrayList();
|
if (srcIp.getSrcIpAddress() != null) {
|
||||||
List<IpCfg> tempList1 = Lists.newArrayList();
|
String startIpPart = srcIp.getSrcIpAddress().split("-")[0];
|
||||||
if (srcIp.getIpType().intValue() == 4) {
|
String endIpPart = srcIp.getSrcIpAddress().split("-")[1];
|
||||||
if (srcIp.getSrcIpAddress() != null) {
|
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
||||||
String startIpPart = srcIp.getSrcIpAddress().split("-")[0];
|
Integer endNum = Integer.parseInt(endIpPart.split("\\.")[3]);
|
||||||
String endIpPart = srcIp.getSrcIpAddress().split("-")[1];
|
for (int i = startNum; i <= endNum; i++) {
|
||||||
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
IpCfg tempIp = new IpCfg();
|
||||||
Integer endNum = Integer.parseInt(endIpPart.split("\\.")[3]);
|
BeanUtils.copyProperties(dstIp, tempIp);
|
||||||
for (int i = startNum; i <= endNum; i++) {
|
tempIp.setSrcIp(startIpPart.substring(0, startIpPart.lastIndexOf(".") + 1) + i);
|
||||||
IpCfg tempIp = new IpCfg();
|
tempIp.setSrcIpMask("255.255.255.255");
|
||||||
BeanUtils.copyProperties(dstIp, tempIp);
|
tempList.add(tempIp);
|
||||||
tempIp.setSrcIp(startIpPart.substring(0, startIpPart.lastIndexOf(".") + 1) + i);
|
}
|
||||||
tempIp.setSrcIpMask("255.255.255.255");
|
}else {
|
||||||
tempList.add(tempIp);
|
dstIp.setSrcIp("0.0.0.0");
|
||||||
|
dstIp.setSrcIpMask("255.255.255.255");
|
||||||
|
tempList.add(dstIp);
|
||||||
}
|
}
|
||||||
|
}else if(srcIp.getSrcIpPattern().equals(1)){
|
||||||
|
Integer srcMaskNum = Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]);
|
||||||
|
if (srcMaskNum == 0) {
|
||||||
|
dstIp.setSrcIpMask("0.0.0.0");
|
||||||
} else {
|
} else {
|
||||||
dstIp.setSrcIp("0.0.0.0");
|
dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum));
|
||||||
dstIp.setSrcIpMask("255.255.255.255");
|
|
||||||
tempList.add(dstIp);
|
|
||||||
}
|
}
|
||||||
if (srcIp.getDestIpAddress() != null) {
|
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||||
|
tempList.add(dstIp);
|
||||||
|
}else if(srcIp.getSrcIpPattern().equals(3)){
|
||||||
|
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||||
|
dstIp.setSrcIpMask("255.255.255.255");
|
||||||
|
tempList.add(dstIp);
|
||||||
|
}else {
|
||||||
|
throw new RuntimeException("Unsupported IP Pattern " + srcIp.getSrcIpPattern());
|
||||||
|
}
|
||||||
|
if (srcIp.getDestIpAddress() != null) {
|
||||||
|
if(srcIp.getDestIpPattern().equals(2)) {
|
||||||
String startIpPart = srcIp.getDestIpAddress().split("-")[0];
|
String startIpPart = srcIp.getDestIpAddress().split("-")[0];
|
||||||
String endIpPart = srcIp.getDestIpAddress().split("-")[1];
|
String endIpPart = srcIp.getDestIpAddress().split("-")[1];
|
||||||
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
Integer startNum = Integer.parseInt(startIpPart.split("\\.")[3]);
|
||||||
@@ -1097,217 +1111,93 @@ public abstract class BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
tempList.clear();
|
tempList.clear();
|
||||||
} else {
|
}else if(srcIp.getDestIpPattern().equals(1)) {
|
||||||
|
Integer dstMaskNum = Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]);
|
||||||
for (IpCfg _cfg : tempList) {
|
for (IpCfg _cfg : tempList) {
|
||||||
_cfg.setDstIp("0.0.0.0");
|
IpCfg tempIp = new IpCfg();
|
||||||
_cfg.setSrcIpMask("255.255.255.255");
|
BeanUtils.copyProperties(_cfg, tempIp);
|
||||||
convertPortValues(_cfg, srcIp);
|
if (dstMaskNum == 0) {
|
||||||
|
tempIp.setDstIpMask("0.0.0.0");
|
||||||
|
} else {
|
||||||
|
tempIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));
|
||||||
|
}
|
||||||
|
tempIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||||
|
if (!tempIp.getSrcIp().equals(tempIp.getDstIp())) {
|
||||||
|
// 处理
|
||||||
|
convertPortValues(tempIp, srcIp);
|
||||||
|
tempList1.add(tempIp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
tempList.clear();
|
||||||
|
}else {
|
||||||
|
for (IpCfg _cfg : tempList) {
|
||||||
|
IpCfg tempIp = new IpCfg();
|
||||||
|
BeanUtils.copyProperties(_cfg, tempIp);
|
||||||
|
tempIp.setDstIp(srcIp.getDestIpAddress());
|
||||||
|
if (!tempIp.getSrcIp().equals(tempIp.getDstIp())) {
|
||||||
|
tempIp.setDstIpMask("255.255.255.255");
|
||||||
|
// 处理
|
||||||
|
convertPortValues(tempIp, srcIp);
|
||||||
|
tempList1.add(tempIp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tempList.clear();
|
||||||
}
|
}
|
||||||
if (tempList1.size() > 0) {
|
}else {
|
||||||
ipConvertList.addAll(tempList1);
|
for (IpCfg _cfg : tempList) {
|
||||||
} else {
|
_cfg.setDstIp("0.0.0.0");
|
||||||
ipConvertList.addAll(tempList);
|
_cfg.setSrcIpMask("255.255.255.255");
|
||||||
|
convertPortValues(_cfg, srcIp);
|
||||||
}
|
}
|
||||||
} else if (srcIp.getIpType().intValue() == 6) {
|
}
|
||||||
if (srcIp.getSrcIpAddress() != null) {
|
if (tempList1.size() > 0) {
|
||||||
|
ipConvertList.addAll(tempList1);
|
||||||
|
} else {
|
||||||
|
ipConvertList.addAll(tempList);
|
||||||
|
}
|
||||||
|
}else if(srcIp.getIpType().equals(6)){// IP V6
|
||||||
|
if (srcIp.getSrcIpAddress() != null) {
|
||||||
|
if(srcIp.getSrcIpPattern().equals(2)) {
|
||||||
IPv6Address address1 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[0]);
|
IPv6Address address1 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[0]);
|
||||||
IPv6Address address2 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[1]);
|
IPv6Address address2 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[1]);
|
||||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
||||||
dstIp.setSrcIp(address1.toString());
|
dstIp.setSrcIp(address1.toString());
|
||||||
dstIp.setSrcIpMask(network.getNetmask().asAddress().toString());
|
dstIp.setSrcIpMask(network.getNetmask().asAddress().toString());
|
||||||
} else {
|
}else if(srcIp.getSrcIpPattern().equals(1)){// IP/掩码
|
||||||
dstIp.setSrcIp("::");
|
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getSrcIpAddress());
|
||||||
|
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||||
|
dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||||
|
}else {// IP
|
||||||
|
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
}
|
}
|
||||||
if (srcIp.getDestIpAddress() != null) {
|
} else {
|
||||||
|
dstIp.setSrcIp("::");
|
||||||
|
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
|
}
|
||||||
|
if (srcIp.getDestIpAddress() != null) {
|
||||||
|
if(srcIp.getDestIpPattern().equals(2)) {
|
||||||
IPv6Address address1 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[0]);
|
IPv6Address address1 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[0]);
|
||||||
IPv6Address address2 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[1]);
|
IPv6Address address2 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[1]);
|
||||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
IPv6Network network = IPv6Network.fromTwoAddresses(address1, address2);
|
||||||
dstIp.setDstIp(address1.toString());
|
dstIp.setDstIp(address1.toString());
|
||||||
dstIp.setDstIpMask(network.getNetmask().asAddress().toString());
|
dstIp.setDstIpMask(network.getNetmask().asAddress().toString());
|
||||||
} else {
|
}else if(srcIp.getDestIpPattern().equals(1)) {// IP/掩码
|
||||||
dstIp.setDstIp("::");
|
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getDestIpAddress());
|
||||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||||
}
|
dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||||
|
}else {// IP
|
||||||
ipConvertList.add(dstIp);
|
|
||||||
} else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getSrcIpAddress() != null) {
|
|
||||||
if (srcIp.getSrcIpAddress().indexOf("/") != -1) {
|
|
||||||
if (srcIp.getIpType() == 4 /* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
Integer srcMaskNum = Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]);
|
|
||||||
if (srcMaskNum == 0) {
|
|
||||||
dstIp.setSrcIpMask("0.0.0.0");
|
|
||||||
} else {
|
|
||||||
dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum));
|
|
||||||
}
|
|
||||||
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
|
||||||
dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
|
||||||
} /*
|
|
||||||
* else { Pattern
|
|
||||||
* patternV4Subnet=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP); Pattern
|
|
||||||
* patternV6Subnet=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP); Matcher
|
|
||||||
* matchernV4Subnet=patternV4Subnet.matcher(srcIp.getSrcIpAddress()); Matcher
|
|
||||||
* matcherV6Subnet=patternV6Subnet.matcher(srcIp.getSrcIpAddress());
|
|
||||||
* if(matchernV4Subnet.matches()) { Integer srcMaskNum =
|
|
||||||
* Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]); if(srcMaskNum==0){
|
|
||||||
* dstIp.setSrcIpMask("0.0.0.0"); }else{
|
|
||||||
* dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum)); }
|
|
||||||
* dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]); }else
|
|
||||||
* if(matcherV6Subnet.matches()){ IPv6Network strangeNetwork =
|
|
||||||
* IPv6Network.fromString(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
|
||||||
* dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString()); }else
|
|
||||||
* { throw new RuntimeException("Invalid IP/subnet mask format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
|
||||||
} /*
|
|
||||||
* else {//all Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
|
||||||
* Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP); Matcher
|
|
||||||
* matcherV4=patternV4.matcher(srcIp.getSrcIpAddress()); Matcher
|
|
||||||
* matcherV6=patternV6.matcher(srcIp.getSrcIpAddress()); if(matcherV4.matches())
|
|
||||||
* { dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIpMask("255.255.255.255"); }else if(matcherV6.matches()) {
|
|
||||||
* dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"); }else { throw
|
|
||||||
* new RuntimeException("Invalid IP format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
|
||||||
} /*
|
|
||||||
* else {//all dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
|
||||||
* dstIp.setSrcIpMask("255.255.255.255"); }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (srcIp.getDestIpAddress() != null) {
|
|
||||||
if (srcIp.getDestIpAddress().indexOf("/") != -1) {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
Integer dstMaskNum = Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]);
|
|
||||||
if (dstMaskNum == 0) {
|
|
||||||
dstIp.setDstIpMask("0.0.0.0");
|
|
||||||
} else {
|
|
||||||
dstIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));
|
|
||||||
;
|
|
||||||
}
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
|
||||||
dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
|
||||||
} /*
|
|
||||||
* else { Pattern
|
|
||||||
* patternV4Subnet=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP); Pattern
|
|
||||||
* patternV6Subnet=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP); Matcher
|
|
||||||
* matchernV4Subnet=patternV4Subnet.matcher(srcIp.getDestIpAddress()); Matcher
|
|
||||||
* matcherV6Subnet=patternV6Subnet.matcher(srcIp.getDestIpAddress());
|
|
||||||
* if(matchernV4Subnet.matches()) { Integer dstMaskNum =
|
|
||||||
* Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]); if(dstMaskNum==0){
|
|
||||||
* dstIp.setDstIpMask("0.0.0.0"); }else{
|
|
||||||
* dstIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));; }
|
|
||||||
* dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]); }else
|
|
||||||
* if(matcherV6Subnet.matches()){ IPv6Network strangeNetwork =
|
|
||||||
* IPv6Network.fromString(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
|
||||||
* dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString()); }else
|
|
||||||
* { throw new RuntimeException("Invalid IP/subnet mask format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
|
||||||
} /*
|
|
||||||
* else {//all Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
|
||||||
* Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP); Matcher
|
|
||||||
* matcherV4=patternV4.matcher(srcIp.getDestIpAddress()); Matcher
|
|
||||||
* matcherV6=patternV6.matcher(srcIp.getDestIpAddress());
|
|
||||||
* if(matcherV4.matches()) { dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIpMask("255.255.255.255"); }else if(matcherV6.matches()) {
|
|
||||||
* dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"); }else { throw
|
|
||||||
* new RuntimeException("invalid ip format"); } }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (srcIp.getIpType() == 4/* || srcIp.getIpType()==64 */) {// 64表示源ip为ipv6,目的ip为ipv4
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
dstIp.setDstIpMask("255.255.255.255");
|
|
||||||
} else if (srcIp.getIpType() == 6/* || srcIp.getIpType()==46 */) {// 46表示源ip为ipv4,目的ip为ipv6
|
|
||||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
} /*
|
|
||||||
* else {//all dstIp.setDstIp(srcIp.getDestIpAddress());
|
|
||||||
* dstIp.setDstIpMask("255.255.255.255"); }
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (srcIp.getSrcPort() != null) {
|
|
||||||
if (srcIp.getSrcPort().indexOf("/") != -1) {
|
|
||||||
String srcMaskNum = srcIp.getSrcPort().split("/")[1];
|
|
||||||
dstIp.setSrcPortMask(srcMaskNum);
|
|
||||||
dstIp.setSrcPort(srcIp.getSrcPort().split("/")[0]);
|
|
||||||
} else {
|
|
||||||
dstIp.setSrcPort(srcIp.getSrcPort());
|
|
||||||
dstIp.setSrcPortMask("65535");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dstIp.setSrcPort("0");
|
dstIp.setDstIp("::");
|
||||||
dstIp.setSrcPortMask("65535");
|
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||||
}
|
|
||||||
if (srcIp.getDestPort() != null) {
|
|
||||||
if (srcIp.getDestPort().indexOf("/") != -1) {
|
|
||||||
String dstMaskNum = srcIp.getDestPort().split("/")[1];
|
|
||||||
dstIp.setDstPortMask(dstMaskNum);
|
|
||||||
dstIp.setDstPort(srcIp.getDestPort().split("/")[0]);
|
|
||||||
} else {
|
|
||||||
dstIp.setDstPort(srcIp.getDestPort());
|
|
||||||
dstIp.setDstPortMask("65535");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dstIp.setDstPort("0");
|
|
||||||
dstIp.setDstPortMask("65535");
|
|
||||||
}
|
}
|
||||||
|
convertPortValues(dstIp, srcIp);
|
||||||
ipConvertList.add(dstIp);
|
ipConvertList.add(dstIp);
|
||||||
|
}else {
|
||||||
|
throw new RuntimeException("Unsupported IP type " + srcIp.getIpType());
|
||||||
}
|
}
|
||||||
return ipConvertList;
|
return ipConvertList;
|
||||||
}
|
}
|
||||||
@@ -2605,7 +2495,15 @@ public abstract class BaseService {
|
|||||||
if(_cfg.getAction().equals(Constants.MONIT_ACTION)) {
|
if(_cfg.getAction().equals(Constants.MONIT_ACTION)) {
|
||||||
maatCfg.setUserRegion(Constants.INTERCEPT_IP_MONIT_USER_REGION_KEY+"="+Constants.USER_REGION_PLACEHOLDER);
|
maatCfg.setUserRegion(Constants.INTERCEPT_IP_MONIT_USER_REGION_KEY+"="+Constants.USER_REGION_PLACEHOLDER);
|
||||||
}*/
|
}*/
|
||||||
maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2());
|
if(serviceDict!=null&&serviceDict.getAction().equals(Constants.MONIT_ACTION)) {// 监测 需要发keyring_id、拦截强度
|
||||||
|
_cfg.setUserRegion1(StringUtil.isEmpty(_cfg.getUserRegion1()) ? "0":_cfg.getUserRegion1());
|
||||||
|
_cfg.setUserRegion5(StringUtil.isEmpty(_cfg.getUserRegion5()) ? "1":_cfg.getUserRegion5());
|
||||||
|
maatCfg.setUserRegion(Constants.INTERCEPT_IP_MONIT_USER_REGION_KEY+"=0"+";"+Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+_cfg.getUserRegion5());
|
||||||
|
}
|
||||||
|
if(serviceDict!=null&&serviceDict.getAction().equals(64)) {
|
||||||
|
maatCfg.setUserRegion(Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2());
|
||||||
|
}
|
||||||
|
|
||||||
}else if(regionDict.getFunctionId()==207 || regionDict.getFunctionId()==208 || regionDict.getFunctionId()==209) {// HTTP(s)阻断、重定向、替换
|
}else if(regionDict.getFunctionId()==207 || regionDict.getFunctionId()==208 || regionDict.getFunctionId()==209) {// HTTP(s)阻断、重定向、替换
|
||||||
String userRegion = Constants.USER_REGION_PLACEHOLDER;
|
String userRegion = Constants.USER_REGION_PLACEHOLDER;
|
||||||
if(_cfg.getAction().equals(Constants.REJECT_ACTION)) {// 阻断
|
if(_cfg.getAction().equals(Constants.REJECT_ACTION)) {// 阻断
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.ws.rs.client.Invocation.Builder;
|
||||||
|
import javax.ws.rs.client.WebTarget;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
import org.apache.axiom.om.OMAbstractFactory;
|
import org.apache.axiom.om.OMAbstractFactory;
|
||||||
import org.apache.axiom.om.OMElement;
|
import org.apache.axiom.om.OMElement;
|
||||||
import org.apache.axiom.om.OMFactory;
|
import org.apache.axiom.om.OMFactory;
|
||||||
@@ -24,10 +29,13 @@ import com.nis.domain.SrcIp;
|
|||||||
import com.nis.domain.SysRole;
|
import com.nis.domain.SysRole;
|
||||||
import com.nis.domain.SysUser;
|
import com.nis.domain.SysUser;
|
||||||
import com.nis.util.Configurations;
|
import com.nis.util.Configurations;
|
||||||
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.DateUtils;
|
import com.nis.util.DateUtils;
|
||||||
import com.nis.util.IpUtil;
|
import com.nis.util.IpUtil;
|
||||||
import com.nis.util.ServiceConfigTemplateUtil;
|
import com.nis.util.ServiceConfigTemplateUtil;
|
||||||
import com.nis.util.TimeConstants;
|
import com.nis.util.TimeConstants;
|
||||||
|
import com.nis.util.httpclient.ClientUtil;
|
||||||
|
import com.nis.web.dao.SchedulerDao;
|
||||||
import com.nis.web.dao.SrcIpDao;
|
import com.nis.web.dao.SrcIpDao;
|
||||||
import com.nis.web.dao.SysOfficeDao;
|
import com.nis.web.dao.SysOfficeDao;
|
||||||
import com.nis.web.dao.UserDao;
|
import com.nis.web.dao.UserDao;
|
||||||
@@ -56,6 +64,9 @@ public class SystemService extends BaseService{
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CommonPolicyDao commonPolicyDao;
|
private CommonPolicyDao commonPolicyDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SchedulerDao schedulerDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SrcIpDao srcIpDao;
|
private SrcIpDao srcIpDao;
|
||||||
private RedisSerializer keySerializer = new StringSerializer();
|
private RedisSerializer keySerializer = new StringSerializer();
|
||||||
@@ -173,16 +184,27 @@ public class SystemService extends BaseService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearPolicies() throws Exception {
|
public void clearPolicies() throws Exception {
|
||||||
// TODO 调用服务接口 告知flushAll
|
// 调用服务接口 告知flushAll
|
||||||
/*String destUrl = Constants.SERVICE_URL;
|
String url = Constants.SERVICE_URL + Constants.DEL_ALL_CFG;
|
||||||
HttpClientUtil.get(destUrl);*/
|
// 创建连接
|
||||||
Set<String> tableNameSet = ServiceConfigTemplateUtil.getAllTableName();
|
WebTarget wt = ClientUtil.getWebTarger(url);
|
||||||
tableNameSet.add("pxy_obj_spoofing_ip_pool");
|
// 获取响应结果
|
||||||
for (String tableName : tableNameSet) {
|
Builder header = wt.request(MediaType.APPLICATION_JSON).header("Content-Type", MediaType.APPLICATION_JSON);
|
||||||
commonPolicyDao.clearPolicies(tableName);
|
Response response = header.delete();
|
||||||
|
if(response.getStatus() == 200){
|
||||||
|
//String result= response.readEntity(String.class);
|
||||||
|
Set<String> tableNameSet = ServiceConfigTemplateUtil.getAllTableName();
|
||||||
|
tableNameSet.add("pxy_obj_spoofing_ip_pool");
|
||||||
|
for (String tableName : tableNameSet) {
|
||||||
|
commonPolicyDao.clearPolicies(tableName);
|
||||||
|
}
|
||||||
|
// 初始化分组
|
||||||
|
asnGroupInfoService.reLoadGroupInfo();
|
||||||
|
// 失效定时任务
|
||||||
|
schedulerDao.inValidAllSchedule();
|
||||||
|
}else {
|
||||||
|
throw new RuntimeException();
|
||||||
}
|
}
|
||||||
// 初始化分组
|
|
||||||
asnGroupInfoService.reLoadGroupInfo();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
|
import com.nis.domain.SysDataDictionaryItem;
|
||||||
import com.nis.domain.basics.AsnIpCfg;
|
import com.nis.domain.basics.AsnIpCfg;
|
||||||
import com.nis.domain.basics.Varibles;
|
import com.nis.domain.basics.Varibles;
|
||||||
import com.nis.domain.configuration.AppByteCfg;
|
import com.nis.domain.configuration.AppByteCfg;
|
||||||
@@ -90,6 +91,32 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) {
|
public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (entity.getFunctionId() == 63 && Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (entity.getFunctionId() == 407 && Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (entity.getFunctionId() == 408 && Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<AppPolicyCfg> list = appCfgDao.findAppPolicyList(entity);
|
List<AppPolicyCfg> list = appCfgDao.findAppPolicyList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -104,11 +131,59 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppIpCfg> findAppIpList(Page<AppIpCfg> page, AppIpCfg entity) {
|
public Page<AppIpCfg> findAppIpList(Page<AppIpCfg> page, AppIpCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppIpCfg> list = appCfgDao.findAppIpList(entity);
|
List<AppIpCfg> list = appCfgDao.findAppIpList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
public List<AppIpCfg> findAppIpList(AppIpCfg entity) {
|
public List<AppIpCfg> findAppIpList(AppIpCfg entity) {
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (entity.getFunctionId() == 63 && Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (entity.getFunctionId() == 407 && Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (entity.getFunctionId() == 408 && Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppIpCfg> list = appCfgDao.findAppIpList(entity);
|
List<AppIpCfg> list = appCfgDao.findAppIpList(entity);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -121,6 +196,26 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppHttpCfg> findAppHttpList(Page<AppHttpCfg> page, AppHttpCfg entity) {
|
public Page<AppHttpCfg> findAppHttpList(Page<AppHttpCfg> page, AppHttpCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppHttpCfg> list = appCfgDao.findAppHttpList(entity);
|
List<AppHttpCfg> list = appCfgDao.findAppHttpList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -134,6 +229,26 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppDomainCfg> findAppDomainList(Page<AppDomainCfg> page, AppDomainCfg entity) {
|
public Page<AppDomainCfg> findAppDomainList(Page<AppDomainCfg> page, AppDomainCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppDomainCfg> list = appCfgDao.findAppDomainList(entity);
|
List<AppDomainCfg> list = appCfgDao.findAppDomainList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -174,6 +289,26 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppByteCfg> findAppByteList(Page<AppByteCfg> page, AppByteCfg entity) {
|
public Page<AppByteCfg> findAppByteList(Page<AppByteCfg> page, AppByteCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppByteCfg> list = appCfgDao.findAppByteList(entity);
|
List<AppByteCfg> list = appCfgDao.findAppByteList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -182,6 +317,26 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppSslCertCfg> findAppSslList(Page<AppSslCertCfg> page, AppSslCertCfg entity) {
|
public Page<AppSslCertCfg> findAppSslList(Page<AppSslCertCfg> page, AppSslCertCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppSslCertCfg> list = appCfgDao.findAppSslList(entity);
|
List<AppSslCertCfg> list = appCfgDao.findAppSslList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -195,6 +350,26 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppTcpCfg> findAppTcpList(Page<AppTcpCfg> page, AppTcpCfg entity) {
|
public Page<AppTcpCfg> findAppTcpList(Page<AppTcpCfg> page, AppTcpCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppTcpCfg> list = appCfgDao.findAppTcpList(entity);
|
List<AppTcpCfg> list = appCfgDao.findAppTcpList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -391,7 +566,7 @@ public class AppCfgService extends BaseService {
|
|||||||
if(entity.getFunctionId() == 408){
|
if(entity.getFunctionId() == 408){
|
||||||
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
|
||||||
}
|
}
|
||||||
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -469,7 +644,7 @@ public class AppCfgService extends BaseService {
|
|||||||
BeanUtils.copyProperties(entity, cfg,
|
BeanUtils.copyProperties(entity, cfg,
|
||||||
new String[] { "cfgRegionCode", "cfgType", "ipType", "isAreaEffective",
|
new String[] { "cfgRegionCode", "cfgType", "ipType", "isAreaEffective",
|
||||||
"areaEffectiveIds", "protocol", "portPattern", "srcPort", "destPort",
|
"areaEffectiveIds", "protocol", "portPattern", "srcPort", "destPort",
|
||||||
"direction", "destIpAddress", "srcIpAddress", "ipPattern" });
|
"direction", "destIpAddress", "srcIpAddress", "srcIpPattern", "destIpPattern" });
|
||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -500,7 +675,7 @@ public class AppCfgService extends BaseService {
|
|||||||
BeanUtils.copyProperties(entity, cfg,
|
BeanUtils.copyProperties(entity, cfg,
|
||||||
new String[] { "cfgRegionCode", "cfgType", "ipType", "isAreaEffective", "areaEffectiveIds",
|
new String[] { "cfgRegionCode", "cfgType", "ipType", "isAreaEffective", "areaEffectiveIds",
|
||||||
"protocol", "portPattern", "srcPort", "destPort", "direction", "destIpAddress",
|
"protocol", "portPattern", "srcPort", "destPort", "direction", "destIpAddress",
|
||||||
"srcIpAddress", "ipPattern" });
|
"srcIpAddress", "srcIpPattern", "destIpPattern" });
|
||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -654,7 +829,7 @@ public class AppCfgService extends BaseService {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -722,7 +897,7 @@ public class AppCfgService extends BaseService {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -785,6 +960,10 @@ public class AppCfgService extends BaseService {
|
|||||||
public void saveOrUpdateAppSslCfg(AppSslCertCfg entity) throws Exception {
|
public void saveOrUpdateAppSslCfg(AppSslCertCfg entity) throws Exception {
|
||||||
// 设置区域运营商信息
|
// 设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
int isValid=0;
|
||||||
|
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||||
|
isValid=1;
|
||||||
|
}
|
||||||
if (entity.getCfgId() == null) {
|
if (entity.getCfgId() == null) {
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -836,6 +1015,12 @@ public class AppCfgService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
entity.setAuditTime(new Date());
|
||||||
|
auditAppSslCfg(entity, entity.getIsAudit());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2061,6 +2246,26 @@ public class AppCfgService extends BaseService {
|
|||||||
public Page<AppHeaderCfg> findAppHeaderList(Page<AppHeaderCfg> page, AppHeaderCfg entity) {
|
public Page<AppHeaderCfg> findAppHeaderList(Page<AppHeaderCfg> page, AppHeaderCfg entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppHeaderCfg> list = appCfgDao.findAppHeaderList(entity);
|
List<AppHeaderCfg> list = appCfgDao.findAppHeaderList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -2230,4 +2435,5 @@ public class AppCfgService extends BaseService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
|
import com.nis.domain.SysDataDictionaryItem;
|
||||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||||
import com.nis.domain.configuration.AppFeatureIndex;
|
import com.nis.domain.configuration.AppFeatureIndex;
|
||||||
import com.nis.domain.configuration.AppHttpCfg;
|
import com.nis.domain.configuration.AppHttpCfg;
|
||||||
@@ -34,6 +35,7 @@ import com.nis.domain.maat.MaatCfg.GroupCfg;
|
|||||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||||
|
import com.nis.domain.specific.SpecificServiceCfg;
|
||||||
import com.nis.domain.maat.ToMaatBean;
|
import com.nis.domain.maat.ToMaatBean;
|
||||||
import com.nis.domain.maat.ToMaatResult;
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
@@ -42,6 +44,7 @@ import com.nis.util.Constants;
|
|||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
|
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
|
||||||
|
import com.nis.web.dao.specific.SpecificServiceCfgDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.BaseService;
|
import com.nis.web.service.BaseService;
|
||||||
|
|
||||||
@@ -55,11 +58,33 @@ import com.nis.web.service.BaseService;
|
|||||||
public class AppMultiFeatureCfgService extends BaseService {
|
public class AppMultiFeatureCfgService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
protected AppMultiFeatureCfgDao appMultiFeatureCfgDao;
|
protected AppMultiFeatureCfgDao appMultiFeatureCfgDao;
|
||||||
|
@Autowired
|
||||||
|
protected SpecificServiceCfgDao specificServiceCfgDao;
|
||||||
|
|
||||||
//分页查询
|
//分页查询
|
||||||
public Page<AppFeatureIndex> findAppFeatureIndexList(Page<AppFeatureIndex> page, AppFeatureIndex entity) {
|
public Page<AppFeatureIndex> findAppFeatureIndexList(Page<AppFeatureIndex> page, AppFeatureIndex entity) {
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
|
||||||
|
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
|
||||||
|
// 查找社交应用的所有有效一级特定服务
|
||||||
|
SpecificServiceCfg appSpec = new SpecificServiceCfg();
|
||||||
|
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||||
|
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||||
|
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appSpec.setIsValid(Constants.VALID_YES);
|
||||||
|
appSpec.setIsLeaf(0);
|
||||||
|
appSpec.setSpecServiceId(entity.getSpecServiceId());
|
||||||
|
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
|
||||||
|
if (!StringUtil.isEmpty(appList)) {
|
||||||
|
SpecificServiceCfg app = appList.get(0);
|
||||||
|
entity.setAppCode(app.getSpecServiceCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<AppFeatureIndex> list = appMultiFeatureCfgDao.findAppFeatureIndexList(entity);
|
List<AppFeatureIndex> list = appMultiFeatureCfgDao.findAppFeatureIndexList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
@@ -255,7 +280,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditAppFeatureCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditAppFeatureCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,7 +213,13 @@ public class AvContentCfgService extends BaseService{
|
|||||||
entity.setCompileId(compileId);
|
entity.setCompileId(compileId);
|
||||||
entity.setCreateTime(new Date());
|
entity.setCreateTime(new Date());
|
||||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||||
avContentCfgDao.insertCfgIndexInfo(entity);
|
avContentCfgDao.insertCfgIndexInfo(entity);
|
||||||
|
/* if(entity.getVoipIps()!=null){
|
||||||
|
for (AvVoipIpCfg voipIp : entity.getVoipIps()) {
|
||||||
|
entity.setVoipIp(voipIp);
|
||||||
|
avContentCfgDao.insertAvVoipIp(entity);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
if(entity.getIpPortList()!=null){
|
if(entity.getIpPortList()!=null){
|
||||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
@@ -305,7 +311,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditAvVoip(entity,entity.getIsAudit(), Constants.INSERT_ACTION);
|
auditAvVoip(entity,entity.getIsAudit(), Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -522,7 +528,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||||
AreaIpCfg cfg = new AreaIpCfg();
|
AreaIpCfg cfg = new AreaIpCfg();
|
||||||
@@ -776,9 +782,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -816,9 +824,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"cfgId"
|
,"cfgId"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -833,9 +843,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -940,9 +952,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"cfgId"
|
,"cfgId"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -1115,9 +1129,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -1155,9 +1171,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"cfgId"
|
,"cfgId"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -1172,9 +1190,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -1279,9 +1299,11 @@ public class AvContentCfgService extends BaseService{
|
|||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"cfgId"
|
,"cfgId"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -1532,7 +1554,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditContUrl(entity,entity.getIsAudit(), Constants.INSERT_ACTION);
|
auditContUrl(entity,entity.getIsAudit(), Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditBgpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditBgpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditCachePolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditCachePolicy(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class ControlPolicyService extends BaseService{
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
audit(entity.getIsAudit(), entity.getIsValid(), entity.getFunctionId(), entity.getId().toString(), new Date(), Constants.REPLACE_REQ_KEY_VALUE, Constants.INSERT_ACTION);
|
audit(entity.getIsAudit(), entity.getIsValid(), entity.getFunctionId(), entity.getId().toString(), new Date(), Constants.REPLACE_REQ_KEY_VALUE, Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class DdosCfgService extends BaseService{
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
audit(entity.getIsAudit(), isValid, entity.getFunctionId(),String.valueOf(entity.getCfgId()), new Date(),Constants.INSERT_ACTION);
|
audit(entity.getIsAudit(), isValid, entity.getFunctionId(),String.valueOf(entity.getCfgId()), new Date(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,11 +150,13 @@ public class DnsIpCfgService extends BaseService{
|
|||||||
dnsIp.setFunctionId(401);
|
dnsIp.setFunctionId(401);
|
||||||
dnsIp.setCfgRegionCode(1);
|
dnsIp.setCfgRegionCode(1);
|
||||||
dnsIp.setCfgType("dns_fake_ip");
|
dnsIp.setCfgType("dns_fake_ip");
|
||||||
dnsIp.setIpPattern(3);
|
dnsIp.setSrcIpPattern(3);
|
||||||
|
dnsIp.setDestIpPattern(3);
|
||||||
dnsIp.setSrcIpAddress("0.0.0.0");
|
dnsIp.setSrcIpAddress("0.0.0.0");
|
||||||
dnsIp.setDestPort("0");
|
dnsIp.setDestPort("0");
|
||||||
dnsIp.setSrcPort("0");
|
dnsIp.setSrcPort("0");
|
||||||
dnsIp.setPortPattern(1);
|
dnsIp.setSrcPortPattern(1);
|
||||||
|
dnsIp.setDestPortPattern(1);
|
||||||
dnsIp.setDnsStrategyId(0);
|
dnsIp.setDnsStrategyId(0);
|
||||||
dnsIp.setAction(16);
|
dnsIp.setAction(16);
|
||||||
dnsIp.setServiceId(64);
|
dnsIp.setServiceId(64);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
c.initDefaultValue();
|
c.initDefaultValue();
|
||||||
BeanUtils.copyProperties(cfg, c,new String[]{"cfgId","ipType","direction",
|
BeanUtils.copyProperties(cfg, c,new String[]{"cfgId","ipType","direction",
|
||||||
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
|
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
|
||||||
"cfgType","ipPattern","srcIpAddress","portPattern","srcPort","destIpAddress","destPort"});
|
"cfgType","srcIpPattern","destIpPattern","srcIpAddress","srcPortPattern","destPortPattern","srcPort","destIpAddress","destPort"});
|
||||||
c.setTableName(AreaIpCfg.getTablename());
|
c.setTableName(AreaIpCfg.getTablename());
|
||||||
}
|
}
|
||||||
this.saveIpBatch(cfg.getAreaCfg());
|
this.saveIpBatch(cfg.getAreaCfg());
|
||||||
@@ -106,7 +106,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
c.initDefaultValue();
|
c.initDefaultValue();
|
||||||
BeanUtils.copyProperties(cfg, c,new String[]{"cfgId","ipType","direction",
|
BeanUtils.copyProperties(cfg, c,new String[]{"cfgId","ipType","direction",
|
||||||
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
|
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
|
||||||
"cfgType","ipPattern","srcIpAddress","portPattern","srcPort","destIpAddress","destPort"});
|
"cfgType","srcIpPattern","destIpPattern","srcIpAddress","srcPortPattern","destPortPattern","srcPort","destIpAddress","destPort"});
|
||||||
c.setTableName(AreaIpCfg.getTablename());
|
c.setTableName(AreaIpCfg.getTablename());
|
||||||
c.setCreatorId(cfg.getCurrentUser().getId());
|
c.setCreatorId(cfg.getCurrentUser().getId());
|
||||||
c.setCreateTime(date);
|
c.setCreateTime(date);
|
||||||
@@ -202,9 +202,11 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
,"cfgType"
|
,"cfgType"
|
||||||
,"cfgId"
|
,"cfgId"
|
||||||
,"ipType"
|
,"ipType"
|
||||||
,"ipPattern"
|
,"srcIpPattern"
|
||||||
|
,"destIpPattern"
|
||||||
,"srcIpAddress"
|
,"srcIpAddress"
|
||||||
,"portPattern"
|
,"srcPortPattern"
|
||||||
|
,"destPortPattern"
|
||||||
,"srcPort"
|
,"srcPort"
|
||||||
,"destPort"
|
,"destPort"
|
||||||
,"protocol"
|
,"protocol"
|
||||||
@@ -535,7 +537,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditFtpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditFtpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -569,7 +569,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditFileDigestCfg(entity.getIsAudit(), isValid,entity.getFunctionId(),entity.getCfgId()+"",Constants.INSERT_ACTION);
|
auditFileDigestCfg(entity.getIsAudit(), isValid,entity.getFunctionId(),entity.getCfgId()+"",Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -926,7 +926,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditP2pCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditP2pCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditHttpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditHttpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditInterceptIpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditInterceptIpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,9 +98,10 @@ public class IpCfgService extends CrudService<IpCfgDao, BaseIpCfg> {
|
|||||||
if (cfg.getAreaCfg() != null && cfg.getAreaCfg().size() > 0) {
|
if (cfg.getAreaCfg() != null && cfg.getAreaCfg().size() > 0) {
|
||||||
for (AreaIpCfg c : cfg.getAreaCfg()) {
|
for (AreaIpCfg c : cfg.getAreaCfg()) {
|
||||||
c.initDefaultValue();
|
c.initDefaultValue();
|
||||||
BeanUtils.copyProperties(cfg, c,new String[]{"cfgId","ipType","direction",
|
BeanUtils.copyProperties(cfg, c,
|
||||||
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
|
new String[] { "cfgId", "ipType", "direction", "protocol", "protocolId", "areaEffectiveIds",
|
||||||
"cfgType","ipPattern","srcIpAddress","portPattern","srcPort","destIpAddress","destPort"});
|
"cfgRegionCode", "cfgType", "srcIpPattern", "destIpPattern", "srcIpAddress",
|
||||||
|
"srcPortPattern", "destPortPattern", "srcPort", "destIpAddress", "destPort" });
|
||||||
c.setTableName(AreaIpCfg.getTablename());
|
c.setTableName(AreaIpCfg.getTablename());
|
||||||
}
|
}
|
||||||
this.saveIpBatch(cfg.getAreaCfg());
|
this.saveIpBatch(cfg.getAreaCfg());
|
||||||
@@ -286,7 +287,7 @@ public class IpCfgService extends CrudService<IpCfgDao, BaseIpCfg> {
|
|||||||
if (isValid == 1) {
|
if (isValid == 1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditIpCfg(entity, entity.getIsAudit(), Constants.INSERT_ACTION);
|
auditIpCfg(entity, entity.getIsAudit(), Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -356,9 +357,10 @@ public class IpCfgService extends CrudService<IpCfgDao, BaseIpCfg> {
|
|||||||
if (cfg.getAreaCfg() != null && cfg.getAreaCfg().size() > 0) {
|
if (cfg.getAreaCfg() != null && cfg.getAreaCfg().size() > 0) {
|
||||||
for (AreaIpCfg c : cfg.getAreaCfg()) {
|
for (AreaIpCfg c : cfg.getAreaCfg()) {
|
||||||
c.initDefaultValue();
|
c.initDefaultValue();
|
||||||
BeanUtils.copyProperties(cfg, c,new String[]{"cfgId","ipType","direction",
|
BeanUtils.copyProperties(cfg, c,
|
||||||
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
|
new String[] { "cfgId", "ipType", "direction", "protocol", "protocolId", "areaEffectiveIds",
|
||||||
"cfgType","ipPattern","srcIpAddress","portPattern","srcPort","destIpAddress","destPort"});
|
"cfgRegionCode", "cfgType", "srcIpPattern", "destIpPattern", "srcIpAddress",
|
||||||
|
"srcPortPattern", "destPortPattern", "srcPort", "destIpAddress", "destPort" });
|
||||||
c.setTableName(AreaIpCfg.getTablename());
|
c.setTableName(AreaIpCfg.getTablename());
|
||||||
c.setCreatorId(cfg.getCurrentUser().getId());
|
c.setCreatorId(cfg.getCurrentUser().getId());
|
||||||
c.setCreateTime(date);
|
c.setCreateTime(date);
|
||||||
@@ -374,22 +376,13 @@ public class IpCfgService extends CrudService<IpCfgDao, BaseIpCfg> {
|
|||||||
List<BaseIpCfg> beans = new ArrayList<>();
|
List<BaseIpCfg> beans = new ArrayList<>();
|
||||||
beans.add(cfg);
|
beans.add(cfg);
|
||||||
ipCfgDao.audit(cfg);
|
ipCfgDao.audit(cfg);
|
||||||
List<BaseIpCfg> beans1=new ArrayList<>();
|
List<BaseIpCfg> beans1 = new ArrayList<>();
|
||||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(cfg.getCompileId());
|
List<AreaIpCfg> areaIpCfgList = areaIpCfgDao.getByCompileId(cfg.getCompileId());
|
||||||
for(AreaIpCfg area:areaIpCfgList){
|
for (AreaIpCfg area : areaIpCfgList) {
|
||||||
BeanUtils.copyProperties(cfg,area ,new String[]{"cfgRegionCode"
|
BeanUtils.copyProperties(cfg, area,
|
||||||
,"cfgType"
|
new String[] { "cfgRegionCode", "cfgType", "cfgId", "ipType", "srcIpPattern", "destIpPattern",
|
||||||
,"cfgId"
|
"srcIpAddress", "srcPortPattern", "destPortPattern", "srcPort", "destPort", "protocol",
|
||||||
,"ipType"
|
"direction", "protocolId" });
|
||||||
,"ipPattern"
|
|
||||||
,"srcIpAddress"
|
|
||||||
,"portPattern"
|
|
||||||
,"srcPort"
|
|
||||||
,"destPort"
|
|
||||||
,"protocol"
|
|
||||||
,"direction"
|
|
||||||
,"protocolId"
|
|
||||||
});
|
|
||||||
beans1.add(area);
|
beans1.add(area);
|
||||||
}
|
}
|
||||||
this.auditIpBatch(beans1);
|
this.auditIpBatch(beans1);
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
package com.nis.web.service.configuration;
|
package com.nis.web.service.configuration;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -16,14 +13,12 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import com.beust.jcommander.internal.Lists;
|
import com.beust.jcommander.internal.Lists;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.DdosIpCfg;
|
|
||||||
import com.nis.domain.configuration.IpReuseDnatPolicyCfg;
|
import com.nis.domain.configuration.IpReuseDnatPolicyCfg;
|
||||||
import com.nis.domain.configuration.IpReusePolicyCfg;
|
import com.nis.domain.configuration.IpReusePolicyCfg;
|
||||||
import com.nis.domain.maat.ToMaatResult;
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.StringUtils;
|
|
||||||
import com.nis.web.dao.configuration.IpMultiplexDao;
|
import com.nis.web.dao.configuration.IpMultiplexDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.BaseService;
|
import com.nis.web.service.BaseService;
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditMailCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditMailCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditHttpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditHttpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -828,7 +828,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditSslCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditSslCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1131,7 +1131,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
if(isValid==1) {
|
if(isValid==1) {
|
||||||
entity.setIsAudit(1);
|
entity.setIsAudit(1);
|
||||||
entity.setIsValid(1);
|
entity.setIsValid(1);
|
||||||
auditDnsCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
auditDnsCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ public class SpecificServiceCfgService extends BaseService{
|
|||||||
public SpecificServiceCfg getBySpecServiceId(Integer specServiceId) {
|
public SpecificServiceCfg getBySpecServiceId(Integer specServiceId) {
|
||||||
return specificServiceCfgDao.getBySpecServiceId(specServiceId);
|
return specificServiceCfgDao.getBySpecServiceId(specServiceId);
|
||||||
}
|
}
|
||||||
public List<SpecificServiceCfg> getBySpecServiceCodes(String specServiceCodes) {
|
public List<SpecificServiceCfg> getBySpecServiceCodes(String specServiceCodes,Integer cfgType) {
|
||||||
for(String specServiceId:specServiceCodes.split(",")) {
|
for(String specServiceId:specServiceCodes.split(",")) {
|
||||||
Integer.parseInt(specServiceId);
|
Integer.parseInt(specServiceId);
|
||||||
}
|
}
|
||||||
return specificServiceCfgDao.getBySpecServiceCodes(specServiceCodes);
|
return specificServiceCfgDao.getBySpecServiceCodes(specServiceCodes,cfgType);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 查询所有符合条件的顶层分页
|
* 查询所有符合条件的顶层分页
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import com.nis.domain.Page;
|
|||||||
import com.nis.domain.SysUser;
|
import com.nis.domain.SysUser;
|
||||||
import com.nis.domain.specific.SpecificServiceCfg;
|
import com.nis.domain.specific.SpecificServiceCfg;
|
||||||
import com.nis.domain.specific.SpecificServiceHostCfg;
|
import com.nis.domain.specific.SpecificServiceHostCfg;
|
||||||
import com.nis.util.BasicProvingUtil;
|
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.specific.SpecificServiceHostCfgDao;
|
import com.nis.web.dao.specific.SpecificServiceHostCfgDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
@@ -58,45 +57,66 @@ public class SpecificServiceHostCfgService extends BaseService{
|
|||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveOrUpdate(SpecificServiceHostCfg specificServiceHostCfg) {
|
public void saveOrUpdate(SpecificServiceHostCfg specificServiceHostCfg) {
|
||||||
SysUser user = UserUtils.getUser();
|
SysUser user = UserUtils.getUser();
|
||||||
String defaultIp = "0.0.0.0"; //缺省0.0.0.0值表示任意
|
String defaultSrcIp = "0.0.0.0"; //缺省0.0.0.0值表示任意
|
||||||
|
String defaultDestIp = "0.0.0.0"; //缺省0.0.0.0值表示任意
|
||||||
if(specificServiceHostCfg.getIpType().equals(4)){
|
if(specificServiceHostCfg.getIpType().equals(4)){
|
||||||
if(specificServiceHostCfg.getIpPattern()==1){
|
if(specificServiceHostCfg.getSrcIpPattern()==1){
|
||||||
defaultIp = "0.0.0.0/32"; //0.0.0.0表示任意
|
defaultSrcIp = "0.0.0.0/32"; //0.0.0.0表示任意
|
||||||
}else if(specificServiceHostCfg.getIpPattern()==2){
|
}else if(specificServiceHostCfg.getSrcIpPattern()==2){
|
||||||
defaultIp = "0.0.0.0-0.0.0.0";
|
defaultSrcIp = "0.0.0.0-0.0.0.0";
|
||||||
}else{
|
}else{
|
||||||
defaultIp = "0.0.0.0";
|
defaultSrcIp = "0.0.0.0";
|
||||||
|
}
|
||||||
|
if(specificServiceHostCfg.getDestIpPattern()==1){
|
||||||
|
defaultDestIp = "0.0.0.0/32"; //0.0.0.0表示任意
|
||||||
|
}else if(specificServiceHostCfg.getDestIpPattern()==2){
|
||||||
|
defaultDestIp = "0.0.0.0-0.0.0.0";
|
||||||
|
}else{
|
||||||
|
defaultDestIp = "0.0.0.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(specificServiceHostCfg.getIpType().equals(6)){
|
if(specificServiceHostCfg.getIpType().equals(6)){
|
||||||
if(specificServiceHostCfg.getIpPattern()==1){
|
if(specificServiceHostCfg.getSrcIpPattern()==1){
|
||||||
defaultIp = "::/64";
|
defaultSrcIp = "::/64";
|
||||||
}else if(specificServiceHostCfg.getIpPattern()==2){
|
}else if(specificServiceHostCfg.getSrcIpPattern()==2){
|
||||||
defaultIp = "::-::";
|
defaultSrcIp = "::-::";
|
||||||
}else{
|
}else{
|
||||||
defaultIp = "::";
|
defaultSrcIp = "::";
|
||||||
|
}
|
||||||
|
if(specificServiceHostCfg.getDestIpPattern()==1){
|
||||||
|
defaultDestIp = "::/64";
|
||||||
|
}else if(specificServiceHostCfg.getDestIpPattern()==2){
|
||||||
|
defaultDestIp = "::-::";
|
||||||
|
}else{
|
||||||
|
defaultDestIp = "::";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String defaultPort = "0"; //0表示任意
|
String defaultSrcPort = "0"; //0表示任意
|
||||||
if(specificServiceHostCfg.getPortPattern().equals(1)){
|
String defaultDestPort = "0"; //0表示任意
|
||||||
defaultPort = "0";
|
if(specificServiceHostCfg.getSrcPortPattern().equals(1)){
|
||||||
|
defaultSrcPort = "0";
|
||||||
}else{
|
}else{
|
||||||
defaultPort = "0/0";
|
defaultSrcPort = "0/0";
|
||||||
|
}
|
||||||
|
if(specificServiceHostCfg.getDestPortPattern().equals(1)){
|
||||||
|
defaultDestPort = "0";
|
||||||
|
}else{
|
||||||
|
defaultDestPort = "0/0";
|
||||||
}
|
}
|
||||||
//ip地址默认 缺省0.0.0.0值表示任意
|
//ip地址默认 缺省0.0.0.0值表示任意
|
||||||
if(StringUtil.isBlank(specificServiceHostCfg.getSrcIpAddress())){
|
if(StringUtil.isBlank(specificServiceHostCfg.getSrcIpAddress())){
|
||||||
specificServiceHostCfg.setSrcIpAddress(defaultIp);
|
specificServiceHostCfg.setSrcIpAddress(defaultSrcIp);
|
||||||
}
|
}
|
||||||
if(StringUtil.isBlank(specificServiceHostCfg.getDestIpAddress())){
|
if(StringUtil.isBlank(specificServiceHostCfg.getDestIpAddress())){
|
||||||
specificServiceHostCfg.setDestIpAddress(defaultIp);
|
specificServiceHostCfg.setDestIpAddress(defaultDestIp);
|
||||||
}
|
}
|
||||||
//端口掩码默认
|
//端口掩码默认
|
||||||
if(StringUtil.isBlank(specificServiceHostCfg.getSrcPort())){
|
if(StringUtil.isBlank(specificServiceHostCfg.getSrcPort())){
|
||||||
specificServiceHostCfg.setSrcPort(defaultPort);
|
specificServiceHostCfg.setSrcPort(defaultSrcPort);
|
||||||
}
|
}
|
||||||
if(StringUtil.isBlank(specificServiceHostCfg.getDestPort())){
|
if(StringUtil.isBlank(specificServiceHostCfg.getDestPort())){
|
||||||
specificServiceHostCfg.setDestPort(defaultPort);
|
specificServiceHostCfg.setDestPort(defaultDestPort);
|
||||||
}
|
}
|
||||||
//方向缺省
|
//方向缺省
|
||||||
if(specificServiceHostCfg.getDirection()==null){
|
if(specificServiceHostCfg.getDirection()==null){
|
||||||
|
|||||||
@@ -31,20 +31,24 @@ public class MaatCfgConverTest {
|
|||||||
ToMaatBean maat = new ToMaatBean();
|
ToMaatBean maat = new ToMaatBean();
|
||||||
BaseStringCfg str = new BaseStringCfg();
|
BaseStringCfg str = new BaseStringCfg();
|
||||||
BaseIpCfg ip = new BaseIpCfg();
|
BaseIpCfg ip = new BaseIpCfg();
|
||||||
ip.setIpPattern(1);
|
ip.setSrcIpPattern(1);
|
||||||
|
ip.setDestIpPattern(1);
|
||||||
ip.setIpType(4);
|
ip.setIpType(4);
|
||||||
ip.setSrcIpAddress("192.168.10.0/24");
|
ip.setSrcIpAddress("192.168.10.0/24");
|
||||||
ip.setPortPattern(2);
|
ip.setSrcPortPattern(2);
|
||||||
|
ip.setDestPortPattern(2);
|
||||||
ip.setSrcPort("8080-8089");
|
ip.setSrcPort("8080-8089");
|
||||||
ip.setCompileId(123);
|
ip.setCompileId(123);
|
||||||
ip.setProtocol(6);
|
ip.setProtocol(6);
|
||||||
ip.setDirection(2);
|
ip.setDirection(2);
|
||||||
ipList.add(ip);
|
ipList.add(ip);
|
||||||
ip = new BaseIpCfg();
|
ip = new BaseIpCfg();
|
||||||
ip.setIpPattern(2);
|
ip.setSrcIpPattern(2);
|
||||||
|
ip.setDestIpPattern(2);
|
||||||
ip.setIpType(4);
|
ip.setIpType(4);
|
||||||
ip.setSrcIpAddress("10.0.6.0-10.0.6.100");
|
ip.setSrcIpAddress("10.0.6.0-10.0.6.100");
|
||||||
ip.setPortPattern(1);
|
ip.setSrcPortPattern(1);
|
||||||
|
ip.setDestPortPattern(1);
|
||||||
ip.setSrcPort("7080/65534");
|
ip.setSrcPort("7080/65534");
|
||||||
ip.setCompileId(124);
|
ip.setCompileId(124);
|
||||||
ip.setDirection(1);
|
ip.setDirection(1);
|
||||||
@@ -67,17 +71,17 @@ public class MaatCfgConverTest {
|
|||||||
for(BaseIpCfg c:ipList){
|
for(BaseIpCfg c:ipList){
|
||||||
IpCfg ipCfg = new IpCfg();
|
IpCfg ipCfg = new IpCfg();
|
||||||
ipCfg.setRegionId(regionId);
|
ipCfg.setRegionId(regionId);
|
||||||
if(c.getIpPattern()==1){
|
if(c.getSrcIpPattern()==1){
|
||||||
ipCfg.setSrcIp(c.getSrcIpAddress().split("/")[0]);
|
ipCfg.setSrcIp(c.getSrcIpAddress().split("/")[0]);
|
||||||
ipCfg.setSrcIpMask(IpUtil.convertMask(Integer.parseInt(c.getSrcIpAddress().split("/")[1])));
|
ipCfg.setSrcIpMask(IpUtil.convertMask(Integer.parseInt(c.getSrcIpAddress().split("/")[1])));
|
||||||
}else if(c.getIpPattern()==2){
|
}else if(c.getSrcIpPattern()==2){
|
||||||
ipCfg.setSrcIp(c.getSrcIpAddress().split("-")[0]);
|
ipCfg.setSrcIp(c.getSrcIpAddress().split("-")[0]);
|
||||||
ipCfg.setSrcIpMask(IpUtil.getMask(c.getSrcIpAddress().split("-")[0], c.getSrcIpAddress().split("-")[1]));
|
ipCfg.setSrcIpMask(IpUtil.getMask(c.getSrcIpAddress().split("-")[0], c.getSrcIpAddress().split("-")[1]));
|
||||||
}
|
}
|
||||||
if(c.getPortPattern()==1){
|
if(c.getSrcPortPattern()==1){
|
||||||
ipCfg.setSrcPort(c.getSrcPort().split("/")[0]);
|
ipCfg.setSrcPort(c.getSrcPort().split("/")[0]);
|
||||||
ipCfg.setSrcPortMask(c.getSrcPort().split("/")[1]);
|
ipCfg.setSrcPortMask(c.getSrcPort().split("/")[1]);
|
||||||
}else if(c.getPortPattern()==2){
|
}else if(c.getSrcPortPattern()==2){
|
||||||
ipCfg.setSrcPort(c.getSrcPort().split("-")[0]);
|
ipCfg.setSrcPort(c.getSrcPort().split("-")[0]);
|
||||||
Integer portMask = Integer.parseInt(c.getSrcPort().split("-")[1])-Integer.parseInt(c.getSrcPort().split("-")[0]);
|
Integer portMask = Integer.parseInt(c.getSrcPort().split("-")[1])-Integer.parseInt(c.getSrcPort().split("-")[0]);
|
||||||
ipCfg.setSrcPortMask(portMask.toString());
|
ipCfg.setSrcPortMask(portMask.toString());
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ ftp_ip=FTP IP Configuration
|
|||||||
dns_ip=DNS IP Configuration
|
dns_ip=DNS IP Configuration
|
||||||
dns_domain=DNS Domain Configuration
|
dns_domain=DNS Domain Configuration
|
||||||
action=Action
|
action=Action
|
||||||
has_prohibit_delete=Only unconfirmed configuration can be deleted
|
has_prohibit_delete=Only unaudited and cancel configurations can be deleted
|
||||||
has_prohibit_nopass=Only unconfirmed configuration can be confirmed
|
has_prohibit_nopass=Only unconfirmed configuration can be confirmed
|
||||||
has_prohibit_pass=Only unconfirmed configuration can be confirmed
|
has_prohibit_pass=Only unconfirmed configuration can be confirmed
|
||||||
multiple_keywords_tip=Multiple keyword can be input,Please separate it with the return key.
|
multiple_keywords_tip=Multiple keyword can be input,Please separate it with the return key.
|
||||||
@@ -1523,7 +1523,8 @@ common_ip_config=Common IP Config
|
|||||||
common_group=Common Group
|
common_group=Common Group
|
||||||
dns_keyword_group_manage=DNS Keyword Group Manage
|
dns_keyword_group_manage=DNS Keyword Group Manage
|
||||||
old_asn_group_manage=ASN Group
|
old_asn_group_manage=ASN Group
|
||||||
url_group_manage=URL Group Manage
|
url_group_manage=URL Group Manage
|
||||||
range_cross=Found intersections between Server IP address and Client IP address
|
range_cross=Found intersections between Server IP address and Client IP address
|
||||||
app_ip_correlation=APP IP Correlation
|
app_ip_correlation=APP IP Correlation
|
||||||
public_private_file_error=Public-private key mismatch
|
public_private_file_error=Public-private key mismatch
|
||||||
|
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||||
@@ -547,7 +547,7 @@ ftp_ip=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f
|
|||||||
dns_ip=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f DNS IP
|
dns_ip=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f DNS IP
|
||||||
dns_domain=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u043c\u0435\u043d\u0430 DNS
|
dns_domain=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u043c\u0435\u043d\u0430 DNS
|
||||||
action=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435
|
action=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435
|
||||||
has_prohibit_delete=\u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0430
|
has_prohibit_delete= только удаляет незаконченные настройки и отменяет проверку конфигурации
|
||||||
has_prohibit_nopass=\u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430
|
has_prohibit_nopass=\u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430
|
||||||
has_prohibit_pass=\u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430
|
has_prohibit_pass=\u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430
|
||||||
multiple_keywords_tip=\u041c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432,\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435 \u0438\u0445 \u043a\u043b\u0430\u0432\u0438\u0448\u0435\u0439 "Enter".
|
multiple_keywords_tip=\u041c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432,\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435 \u0438\u0445 \u043a\u043b\u0430\u0432\u0438\u0448\u0435\u0439 "Enter".
|
||||||
@@ -1512,7 +1512,7 @@ effective=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u04
|
|||||||
admin_user_warn=\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0410\u0434\u043c\u0438\u043d
|
admin_user_warn=\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0410\u0434\u043c\u0438\u043d
|
||||||
interface_total=\u041e\u0431\u0449\u0435\u0435 \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430
|
interface_total=\u041e\u0431\u0449\u0435\u0435 \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430
|
||||||
service_total=\u041e\u0431\u0449\u0435\u0435 \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0421\u0435\u0440\u0432\u0438\u0441\u0430
|
service_total=\u041e\u0431\u0449\u0435\u0435 \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0421\u0435\u0440\u0432\u0438\u0441\u0430
|
||||||
none_file_tip=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b%21
|
none_file_tip=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b%21
|
||||||
the_same_ip_type=IP-\u0430\u0434\u0440\u0435\u0441 \u043A\u043B\u0438\u0435\u043D\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u043E\u0434\u0438\u043D \u0438 \u0442\u043E\u0442 \u0436\u0435 \u0442\u0438\u043F.
|
the_same_ip_type=IP-\u0430\u0434\u0440\u0435\u0441 \u043A\u043B\u0438\u0435\u043D\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u043E\u0434\u0438\u043D \u0438 \u0442\u043E\u0442 \u0436\u0435 \u0442\u0438\u043F.
|
||||||
src_ip_pattern=\u0424\u043e\u0440\u043c\u0430\u0442 ip \u041a\u043b\u0438\u0435\u043d\u0442\u0430
|
src_ip_pattern=\u0424\u043e\u0440\u043c\u0430\u0442 ip \u041a\u043b\u0438\u0435\u043d\u0442\u0430
|
||||||
dest_ip_pattern=\u0424\u043e\u0440\u043c\u0430\u0442 ip \u0421\u0435\u0440\u0432\u0435\u0440\u0430
|
dest_ip_pattern=\u0424\u043e\u0440\u043c\u0430\u0442 ip \u0421\u0435\u0440\u0432\u0435\u0440\u0430
|
||||||
@@ -1520,12 +1520,14 @@ src_port_pattern=\u0424\u043e\u0440\u043c\u0430\u0442 \u041f\u043e\u0440\u0442\u
|
|||||||
dest_port_pattern=\u0424\u043e\u0440\u043c\u0430\u0442 \u041f\u043e\u0440\u0442\u0430 \u0421\u0435\u0440\u0432\u0435\u0440\u0430
|
dest_port_pattern=\u0424\u043e\u0440\u043c\u0430\u0442 \u041f\u043e\u0440\u0442\u0430 \u0421\u0435\u0440\u0432\u0435\u0440\u0430
|
||||||
url_group_configuration=URL Group Configuration
|
url_group_configuration=URL Group Configuration
|
||||||
dns_keyword_group_configuration=DNS Keyword Group Configuration
|
dns_keyword_group_configuration=DNS Keyword Group Configuration
|
||||||
|
app_ip_correlation=APP IP Correlation
|
||||||
ip_group=IP Group
|
ip_group=IP Group
|
||||||
common_ip_config=Common IP Config
|
common_ip_config=Common IP Config
|
||||||
common_group=Common Group
|
common_group=Common Group
|
||||||
dns_keyword_group_manage=DNS Keyword Group Manage
|
dns_keyword_group_manage=DNS Keyword Group Manage
|
||||||
old_asn_group_manage=ASN Group
|
old_asn_group_manage=ASN Group
|
||||||
url_group_manage=URL Group Manage
|
url_group_manage=URL Group Manage
|
||||||
range_cross=\u041d\u0430\u0439\u0434\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430
|
range_cross=\u041d\u0430\u0439\u0434\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430
|
||||||
app_ip_correlation=\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f ip-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439
|
app_ip_correlation=\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f ip-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439
|
||||||
public_private_file_error=\u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e-\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430.
|
public_private_file_error=\u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e-\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430.
|
||||||
|
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||||
@@ -546,7 +546,7 @@ ftp_ip=FTP IP\u914d\u7f6e
|
|||||||
dns_ip=DNS IP\u914d\u7f6e
|
dns_ip=DNS IP\u914d\u7f6e
|
||||||
dns_domain=DNS\u57df\u540d\u914d\u7f6e
|
dns_domain=DNS\u57df\u540d\u914d\u7f6e
|
||||||
action=\u52a8\u4f5c
|
action=\u52a8\u4f5c
|
||||||
has_prohibit_delete=\u53ea\u6709\u672a\u5ba1\u6838\u7684\u914d\u7f6e\u53ef\u5220\u9664
|
has_prohibit_delete=\u53ea\u80fd\u5220\u9664\u672a\u5ba1\u6838\u7684\u914d\u7f6e\u4e0e\u53d6\u6d88\u5ba1\u6838\u901a\u8fc7\u7684\u914d\u7f6e
|
||||||
has_prohibit_nopass=\u53ea\u6709\u672a\u5ba1\u6838\u7684\u914d\u7f6e\u53ef\u672a\u901a\u8fc7\u5ba1\u6838
|
has_prohibit_nopass=\u53ea\u6709\u672a\u5ba1\u6838\u7684\u914d\u7f6e\u53ef\u672a\u901a\u8fc7\u5ba1\u6838
|
||||||
has_prohibit_pass=\u53ea\u6709\u672a\u5ba1\u6838\u7684\u914d\u7f6e\u53ef\u4ee5\u5ba1\u6838\u901a\u8fc7
|
has_prohibit_pass=\u53ea\u6709\u672a\u5ba1\u6838\u7684\u914d\u7f6e\u53ef\u4ee5\u5ba1\u6838\u901a\u8fc7
|
||||||
multiple_keywords_tip=\u53ef\u540c\u65f6\u8f93\u5165\u591a\u6761\u5173\u952e\u5b57\uff0c\u8bf7\u4ee5\u56de\u8f66\u952e\u9694\u5f00\u3002
|
multiple_keywords_tip=\u53ef\u540c\u65f6\u8f93\u5165\u591a\u6761\u5173\u952e\u5b57\uff0c\u8bf7\u4ee5\u56de\u8f66\u952e\u9694\u5f00\u3002
|
||||||
@@ -706,7 +706,7 @@ ir_type=\u590d\u7528\u7c7b\u578b
|
|||||||
dns_strategy_id=DNS\u7b56\u7565ID
|
dns_strategy_id=DNS\u7b56\u7565ID
|
||||||
no_strategy=\u9ed8\u8ba4\u7b56\u7565
|
no_strategy=\u9ed8\u8ba4\u7b56\u7565
|
||||||
domain=\u57df\u540d
|
domain=\u57df\u540d
|
||||||
app_ip_config=APP IP
|
app_ip_config=APP\u534F\u8BAEIP\u914D\u7F6E
|
||||||
bytes=\u5b57\u8282
|
bytes=\u5b57\u8282
|
||||||
app_http_config=APP HTTP\u7279\u5f81
|
app_http_config=APP HTTP\u7279\u5f81
|
||||||
app_domain_config=APP\u57df\u540d\u7279\u5f81
|
app_domain_config=APP\u57df\u540d\u7279\u5f81
|
||||||
@@ -1116,11 +1116,11 @@ access_policy=\u8bbf\u95ee\u7b56\u7565
|
|||||||
nat_policy=\u5730\u5740\u8f6c\u6362\u7b56\u7565
|
nat_policy=\u5730\u5740\u8f6c\u6362\u7b56\u7565
|
||||||
dns_policy_object=DNS\u7b56\u7565\u5bf9\u8c61
|
dns_policy_object=DNS\u7b56\u7565\u5bf9\u8c61
|
||||||
proxy_policy_object=Proxy\u7b56\u7565\u5bf9\u8c61
|
proxy_policy_object=Proxy\u7b56\u7565\u5bf9\u8c61
|
||||||
APP_PAYLOAD_ADMIN=APP Payload Admin
|
APP_PAYLOAD_ADMIN=APP Payload \u7279\u5f81
|
||||||
APP_HTTP_ADMIN=APP HTTP Admin
|
APP_HTTP_ADMIN=APP HTTP \u7279\u5f81
|
||||||
APP_DNS_ADMIN=APP DNS Admin
|
APP_DNS_ADMIN=APP DNS \u7279\u5f81
|
||||||
APP_SSL_ADMIN=APP SSL Admin
|
APP_SSL_ADMIN=APP SSL \u7279\u5f81
|
||||||
APP_DK_GL=APP Correlation Feature
|
APP_DK_GL=APP \u5173\u8054\u7279\u5f81
|
||||||
dnat_complex_loop=DNAT IP\u590d\u7528\u56de\u6d41
|
dnat_complex_loop=DNAT IP\u590d\u7528\u56de\u6d41
|
||||||
snat_policy=SNAT\u590d\u7528\u7b56\u7565
|
snat_policy=SNAT\u590d\u7528\u7b56\u7565
|
||||||
dnat_policy=DNAT\u590d\u7528\u7b56\u7565
|
dnat_policy=DNAT\u590d\u7528\u7b56\u7565
|
||||||
@@ -1133,15 +1133,15 @@ av_voip_reject=VoIP\u963b\u65ad
|
|||||||
label_proto_source=\u534f\u8bae\u6765\u6e90
|
label_proto_source=\u534f\u8bae\u6765\u6e90
|
||||||
label_behav_source=\u884c\u4e3a\u6765\u6e90
|
label_behav_source=\u884c\u4e3a\u6765\u6e90
|
||||||
label_app_source=\u5e94\u7528\u6765\u6e90
|
label_app_source=\u5e94\u7528\u6765\u6e90
|
||||||
packet=Packet
|
packet=\u5305
|
||||||
stream=Stream
|
stream=\u6D41
|
||||||
protocol_menu=Protocol
|
protocol_menu=Protocol
|
||||||
advanced=Advanced
|
advanced=Advanced
|
||||||
protocol_identify=Protocol Identify
|
protocol_identify=\u57FA\u7840\u534F\u8BAE
|
||||||
MM_FILE_DIGEST=\u6587\u4ef6\u6458\u8981
|
MM_FILE_DIGEST=\u6587\u4ef6\u6458\u8981
|
||||||
NTC_ASN_IP=ASN
|
NTC_ASN_IP=ASN
|
||||||
NTC_STREAMING_MEDIA_URL=URL
|
NTC_STREAMING_MEDIA_URL=URL
|
||||||
NTC_VOIP_ACCOUNT=VoIP Account
|
NTC_VOIP_ACCOUNT=VoIP \u8d26\u6237
|
||||||
export_failed=\u5bfc\u51fa\u5931\u8d25
|
export_failed=\u5bfc\u51fa\u5931\u8d25
|
||||||
user_manage=\u5ba2\u6237\u7aef\u8d26\u53f7\u7ba1\u7406
|
user_manage=\u5ba2\u6237\u7aef\u8d26\u53f7\u7ba1\u7406
|
||||||
ip_reuse_policy_object=IP\u590d\u7528\u7b56\u7565\u5bf9\u8c61
|
ip_reuse_policy_object=IP\u590d\u7528\u7b56\u7565\u5bf9\u8c61
|
||||||
@@ -1163,7 +1163,7 @@ log_user=\u64cd\u4f5c\u7528\u6237
|
|||||||
log_submission=\u8bf7\u6c42\u65b9\u6cd5
|
log_submission=\u8bf7\u6c42\u65b9\u6cd5
|
||||||
log_ip=\u64cd\u4f5c\u8005IP
|
log_ip=\u64cd\u4f5c\u8005IP
|
||||||
log_exception_info=\u5f02\u5e38\u4fe1\u606f
|
log_exception_info=\u5f02\u5e38\u4fe1\u606f
|
||||||
system_log=Log Management
|
system_log=Log \u7ba1\u7406
|
||||||
protected_ddos=\u4fdd\u62a4DDOS\u653b\u51fb
|
protected_ddos=\u4fdd\u62a4DDOS\u653b\u51fb
|
||||||
usual_ddos=\u5e38\u7528DDOS\u653b\u51fb
|
usual_ddos=\u5e38\u7528DDOS\u653b\u51fb
|
||||||
mail_address=\u90ae\u4ef6\u5730\u5740
|
mail_address=\u90ae\u4ef6\u5730\u5740
|
||||||
@@ -1194,17 +1194,17 @@ certificate_error=\u516c\u94a5\u3001\u79c1\u94a5\u6587\u4ef6\u683c\u5f0f\u9519\u
|
|||||||
public_file_error=\u516c\u94a5\u6587\u4ef6\u683c\u5f0f\u9519\u8bef
|
public_file_error=\u516c\u94a5\u6587\u4ef6\u683c\u5f0f\u9519\u8bef
|
||||||
keyframe_pic_required=\u5c1a\u672a\u9009\u62e9\u5173\u952e\u5e27\u56fe\u7247
|
keyframe_pic_required=\u5c1a\u672a\u9009\u62e9\u5173\u952e\u5e27\u56fe\u7247
|
||||||
private_file_error=\u79c1\u94a5\u6587\u4ef6\u683c\u5f0f\u9519\u8bef
|
private_file_error=\u79c1\u94a5\u6587\u4ef6\u683c\u5f0f\u9519\u8bef
|
||||||
ipv4_range_tip=IPv4 Range
|
ipv4_range_tip=IPv4 \u8303\u56f4
|
||||||
ipv4_subnet_tip=IPv4/Subnet Mask
|
ipv4_subnet_tip=IPv4/\u5b50\u7f51\u63a9\u7801
|
||||||
ipv6_range_tip=IPv6 Range
|
ipv6_range_tip=IPv6 \u8303\u56f4
|
||||||
ipv6_subnet_tip=IPv6/Subnet Mask
|
ipv6_subnet_tip=IPv6/\u5b50\u7f51\u63a9\u7801
|
||||||
example_tip=For Example
|
example_tip=\u4f8b\u5982
|
||||||
rule_desc_tip=Rule description
|
rule_desc_tip=\u89c4\u5219\u63cf\u8ff0
|
||||||
port_comment_tip=Port must between 0 and 65535
|
port_comment_tip=Port\u5fc5\u987b\u5728 0 \u548c 65535 \u4e4b\u95f4
|
||||||
port_mask_comment_tip=Port and port mask must between 0 and 65535
|
port_mask_comment_tip=Port \u548c port \u63a9\u7801 \u5fc5\u987b\u5728 0 \u548c 65535 \u4e4b\u95f4
|
||||||
multi_keywords_tip=Allow multiple keywords to be entered and multiple keywords to be replaced by line breaks.
|
multi_keywords_tip=\u5141\u8bb8\u8f93\u5165\u591a\u4e2a\u5173\u952e\u5b57\uff0c\u5e76\u7528\u6362\u884c\u7b26\u66ff\u6362\u591a\u4e2a\u5173\u952e\u5b57
|
||||||
visible_keyword_tip=Single keyword is not allowed to enter invisible characters.
|
visible_keyword_tip=\u5355\u4e2a\u5173\u952e\u5b57\u4e0d\u5141\u8bb8\u8f93\u5165\u4e0d\u53ef\u89c1\u7684\u5b57\u7b26
|
||||||
single_keyword_tip=Only single key input is allowed.
|
single_keyword_tip=\u53ea\u5141\u8bb8\u8f93\u5165\u4e00\u4e2a\u952e
|
||||||
ipv4_mask_range_tip=IP\u63a9\u7801\u5fc5\u987b\u4ecb\u4e8e16\u548c32\u4e4b\u95f4
|
ipv4_mask_range_tip=IP\u63a9\u7801\u5fc5\u987b\u4ecb\u4e8e16\u548c32\u4e4b\u95f4
|
||||||
ipv6_mask_range_tip=IP\u63a9\u7801\u5fc5\u987b\u4ecb\u4e8e2\u548c128\u4e4b\u95f4
|
ipv6_mask_range_tip=IP\u63a9\u7801\u5fc5\u987b\u4ecb\u4e8e2\u548c128\u4e4b\u95f4
|
||||||
letter_cancel_info=\u53d6\u6d88\u5ba1\u6838\u6765\u51fd
|
letter_cancel_info=\u53d6\u6d88\u5ba1\u6838\u6765\u51fd
|
||||||
@@ -1216,7 +1216,7 @@ has_invisible_char=%s\u5305\u542b\u4e0d\u53ef\u89c1\u5b57\u7b26
|
|||||||
not_multiple=%s\u4e0d\u652f\u6301\u591a\u4e2a\u5173\u952e\u5b57
|
not_multiple=%s\u4e0d\u652f\u6301\u591a\u4e2a\u5173\u952e\u5b57
|
||||||
template_error=\u5bfc\u5165\u6a21\u677f\u9519\u8bef.
|
template_error=\u5bfc\u5165\u6a21\u677f\u9519\u8bef.
|
||||||
asn_no=ASN
|
asn_no=ASN
|
||||||
query=Query
|
query=\u67e5\u8be2
|
||||||
cfg_operation_log=\u914d\u7f6e\u64cd\u4f5c\u65e5\u5fd7
|
cfg_operation_log=\u914d\u7f6e\u64cd\u4f5c\u65e5\u5fd7
|
||||||
function_name=\u64cd\u4f5c\u6a21\u5757
|
function_name=\u64cd\u4f5c\u6a21\u5757
|
||||||
config_service_statistics=\u914d\u7f6e\u7edf\u8ba1
|
config_service_statistics=\u914d\u7f6e\u7edf\u8ba1
|
||||||
@@ -1232,7 +1232,7 @@ default_value=\u9ed8\u8ba4\u503c
|
|||||||
intercept=\u62e6\u622a
|
intercept=\u62e6\u622a
|
||||||
unkown_error=\u672a\u77e5\u9519\u8bef\u4fe1\u606f
|
unkown_error=\u672a\u77e5\u9519\u8bef\u4fe1\u606f
|
||||||
exception_info=\u5f02\u5e38\u4fe1\u606f
|
exception_info=\u5f02\u5e38\u4fe1\u606f
|
||||||
no_tc_udp_port_comment_tip=Port must be 0
|
no_tc_udp_port_comment_tip=Port \u5fc5\u987b\u4e3a 0
|
||||||
website_advanced_reject=HTTP Advanced\u963b\u65ad
|
website_advanced_reject=HTTP Advanced\u963b\u65ad
|
||||||
website_advanced_monit=HTTP Advanced\u76d1\u6d4b
|
website_advanced_monit=HTTP Advanced\u76d1\u6d4b
|
||||||
snat_ip_reuse_adress_pool_loop=SNAT\u5730\u5740\u6c60\u7ba1\u7406\u56de\u6d41
|
snat_ip_reuse_adress_pool_loop=SNAT\u5730\u5740\u6c60\u7ba1\u7406\u56de\u6d41
|
||||||
@@ -1322,10 +1322,10 @@ transfer_bytes=\u4f20\u8f93\u6570\u636e\u5b57\u8282
|
|||||||
user_info=\u7528\u6237\u4fe1\u606f
|
user_info=\u7528\u6237\u4fe1\u606f
|
||||||
user_list=\u7528\u6237\u5217\u8868
|
user_list=\u7528\u6237\u5217\u8868
|
||||||
equal_password=\u5bc6\u7801\u4e0d\u4e00\u81f4\uff01
|
equal_password=\u5bc6\u7801\u4e0d\u4e00\u81f4\uff01
|
||||||
outgoing_unicast_packets=Upload Packets
|
outgoing_unicast_packets=\u4e0a\u4f20\u6570\u636e\u5305\u6570
|
||||||
outgoing_unicast_total_size=Upload Byte
|
outgoing_unicast_total_size=\u4e0a\u4f20\u6570\u636e\u5b57\u8282\u6570
|
||||||
incoming_unicast_packets=Download Packets
|
incoming_unicast_packets=\u4e0b\u8f7d\u6570\u636e\u5305\u6570
|
||||||
incoming_unicast_total_size=Download Byte
|
incoming_unicast_total_size=\u4e0b\u8f7d\u6570\u636e\u5b57\u8282\u6570
|
||||||
address_pool=\u5730\u5740\u6c60\u540d\u79f0
|
address_pool=\u5730\u5740\u6c60\u540d\u79f0
|
||||||
ip_total=IP\u603b\u6570
|
ip_total=IP\u603b\u6570
|
||||||
available_ip_total=\u53ef\u7528IP\u6570
|
available_ip_total=\u53ef\u7528IP\u6570
|
||||||
@@ -1358,17 +1358,17 @@ website_keyword_monit=\u5173\u952e\u5b57\u76d1\u6d4b
|
|||||||
website_keyword_reject=\u5173\u952e\u5b57\u963b\u65ad
|
website_keyword_reject=\u5173\u952e\u5b57\u963b\u65ad
|
||||||
radius_log=Radius \u65e5\u5fd7
|
radius_log=Radius \u65e5\u5fd7
|
||||||
message_type=Code
|
message_type=Code
|
||||||
nas_ip=NAS IP Address
|
nas_ip=NAS IP \u5730\u5740
|
||||||
framed_ip=Framed IP Address
|
framed_ip=Framed IP \u5730\u5740
|
||||||
log_user_name=User Name
|
log_user_name=\u7528\u6237\u540d
|
||||||
av_tips=\u5bf9\u4e8e\u97f3\u89c6\u9891\u7f16\u7801\u7684\u7d22\u5f15\u4fe1\u606f\u5728\u97f3\u89c6\u9891\u6587\u4ef6\u5c3e\u90e8\u7684\u60c5\u51b5\uff0c\u672c\u7cfb\u7edf\u4e0d\u4e88\u652f\u6301\uff0c\u5bf9\u4e8e\u5206\u8fa8\u7387\u5927\u4e8e4\u5146\u7684\u89c6\u9891\uff0c\u672c\u7cfb\u7edf\u4e0d\u4e88\u652f\u6301
|
av_tips=\u5bf9\u4e8e\u97f3\u89c6\u9891\u7f16\u7801\u7684\u7d22\u5f15\u4fe1\u606f\u5728\u97f3\u89c6\u9891\u6587\u4ef6\u5c3e\u90e8\u7684\u60c5\u51b5\uff0c\u672c\u7cfb\u7edf\u4e0d\u4e88\u652f\u6301\uff0c\u5bf9\u4e8e\u5206\u8fa8\u7387\u5927\u4e8e4\u5146\u7684\u89c6\u9891\uff0c\u672c\u7cfb\u7edf\u4e0d\u4e88\u652f\u6301
|
||||||
asn_ip_group_delete=(\u8be5ASN\u7ec4\u4e0b\u7684IP\u914d\u7f6e\u4e5f\u4f1a\u88ab\u5220\u9664)
|
asn_ip_group_delete=(\u8be5ASN\u7ec4\u4e0b\u7684IP\u914d\u7f6e\u4e5f\u4f1a\u88ab\u5220\u9664)
|
||||||
keyword_log_tips=\u6e05\u6d17\u540e\u7f51\u9875\u5173\u952e\u5b57\u65e5\u5fd7\uff0c\u7f51\u9875\u5173\u952e\u5b57\u7ba1\u63a7\u72b6\u51b5\u4e0d\u7406\u60f3\u65f6\uff0c\u53ef\u5c06\u6e05\u6d17\u540e\u5efa\u8bae\u7ed9\u51fa\u7684\u547d\u4e2d\u5173\u952e\u5b57\u7f51\u9875\u914d\u7f6e\u4e3aURL\u7ba1\u63a7
|
keyword_log_tips=\u6e05\u6d17\u540e\u7f51\u9875\u5173\u952e\u5b57\u65e5\u5fd7\uff0c\u7f51\u9875\u5173\u952e\u5b57\u7ba1\u63a7\u72b6\u51b5\u4e0d\u7406\u60f3\u65f6\uff0c\u53ef\u5c06\u6e05\u6d17\u540e\u5efa\u8bae\u7ed9\u51fa\u7684\u547d\u4e2d\u5173\u952e\u5b57\u7f51\u9875\u914d\u7f6e\u4e3aURL\u7ba1\u63a7
|
||||||
conn_record=\u901a\u8054\u5173\u7cfb
|
conn_record=\u901a\u8054\u5173\u7cfb
|
||||||
bps=Gbps
|
bps=Gbps
|
||||||
bps_percent=Bps Percent
|
bps_percent=Bps \u767e\u5206\u6bd4
|
||||||
pps=PPS
|
pps=PPS
|
||||||
pps_percent=pps Percent
|
pps_percent=pps \u767e\u5206\u6bd4
|
||||||
spoofing_ip_object=Spoofing IP Pool
|
spoofing_ip_object=Spoofing IP Pool
|
||||||
spoofing_ip_policy=IP Spoofing
|
spoofing_ip_policy=IP Spoofing
|
||||||
action_spoofing=Spoofing
|
action_spoofing=Spoofing
|
||||||
@@ -1376,32 +1376,32 @@ spoofing=spoofing
|
|||||||
service=Service
|
service=Service
|
||||||
s_asn=SASN
|
s_asn=SASN
|
||||||
d_asn=DASN
|
d_asn=DASN
|
||||||
asn_conn_report=ASN Statistics
|
asn_conn_report=ASN\u7edf\u8ba1
|
||||||
https_url_report=Http(s) URL Statistics
|
https_url_report=Http(s) URL\u7edf\u8ba1
|
||||||
url=URL
|
url=URL
|
||||||
sum=SUM
|
sum=\u603b\u91cf
|
||||||
url_count=URL Count
|
url_count=URL \u6570\u91cf
|
||||||
ip_range_report=IN/EX Host Identity
|
ip_range_report=IP\u8303\u56f4\u7edf\u8ba1
|
||||||
ip_start=Start IP
|
ip_start=Start IP
|
||||||
ip_end=End IP
|
ip_end=End IP
|
||||||
ip_start_num=IP Start Num
|
ip_start_num=IP Start \u6570\u91cf
|
||||||
ip_end_num=IP End Num
|
ip_end_num=IP End \u6570\u91cf
|
||||||
ip_sub=IP Subnet
|
ip_sub=IP Subnet
|
||||||
start_ip=Start IP
|
start_ip=\u6e90 IP
|
||||||
end_ip=End IP
|
end_ip=\u76ee\u7684 IP
|
||||||
action_detail=\u52a8\u4f5c\u8be6\u60c5
|
action_detail=\u52a8\u4f5c\u8be6\u60c5
|
||||||
pass=Pass
|
pass=Pass
|
||||||
live_link=Live
|
live_link=Live
|
||||||
area_type=Area Type
|
area_type=\u5730\u57df\u7c7b\u578b
|
||||||
dns_group_manage=DNS\u5206\u7ec4\u7ba1\u7406
|
dns_group_manage=DNS\u5206\u7ec4\u7ba1\u7406
|
||||||
asn_group_manage=ASN\u5206\u7ec4\u7ba1\u7406
|
asn_group_manage=ASN\u5206\u7ec4\u7ba1\u7406
|
||||||
ip_group_manage=IP\u5206\u7ec4\u7ba1\u7406
|
ip_group_manage=IP\u5206\u7ec4\u7ba1\u7406
|
||||||
ip_spoofing_group_manage=IP Spoofing\u5206\u7ec4\u7ba1\u7406
|
ip_spoofing_group_manage=IP Spoofing\u5206\u7ec4\u7ba1\u7406
|
||||||
min_tcp=Min
|
min_tcp=\u6700\u5c0f
|
||||||
max_tcp=Max
|
max_tcp=\u6700\u5927
|
||||||
APP_TCP_SESSION_BYTE=Session
|
APP_TCP_SESSION_BYTE=Session
|
||||||
ip_count=Unique IP Count
|
ip_count=Unique IP \u6570\u91cf
|
||||||
counnection_count=Connection Count
|
counnection_count=Connection \u6570\u91cf
|
||||||
asn=ASN
|
asn=ASN
|
||||||
Unique_num=Unique
|
Unique_num=Unique
|
||||||
ip=IP
|
ip=IP
|
||||||
@@ -1410,8 +1410,8 @@ unique_num=Unique
|
|||||||
import_limit_is=\u5bfc\u5165\u9650\u5236\u6700\u5927\u6761\u6570
|
import_limit_is=\u5bfc\u5165\u9650\u5236\u6700\u5927\u6761\u6570
|
||||||
upload_limit_is=\u6587\u4ef6\u4e0a\u4f20\u4e2a\u6570\u9650\u5236
|
upload_limit_is=\u6587\u4ef6\u4e0a\u4f20\u4e2a\u6570\u9650\u5236
|
||||||
count=\u6570\u91cf
|
count=\u6570\u91cf
|
||||||
do_blacklist=Blacklist Option
|
do_blacklist=\u672c\u5730\u9ed1\u540d\u5355
|
||||||
l3_header_error=Only four attribute values are allowed to be entered at most
|
l3_header_error=\u6700\u591a\u53ea\u5141\u8bb8\u8f93\u5165\u56db\u4e2a\u5c5e\u6027\u503c
|
||||||
IP_HEADER=IP Header
|
IP_HEADER=IP Header
|
||||||
ICMP_HEADER=ICMP Header
|
ICMP_HEADER=ICMP Header
|
||||||
offset_expression=Offset Expression
|
offset_expression=Offset Expression
|
||||||
@@ -1486,7 +1486,7 @@ GByte=GByte
|
|||||||
interval=\u95f4\u9694
|
interval=\u95f4\u9694
|
||||||
month=\u6708
|
month=\u6708
|
||||||
day=\u65e5
|
day=\u65e5
|
||||||
week=weeks
|
week=\u5468
|
||||||
startTime=\u5f00\u59cb\u65f6\u95f4
|
startTime=\u5f00\u59cb\u65f6\u95f4
|
||||||
endTime=\u7ed3\u675f\u65f6\u95f4
|
endTime=\u7ed3\u675f\u65f6\u95f4
|
||||||
single=\u5355\u6b21
|
single=\u5355\u6b21
|
||||||
@@ -1496,8 +1496,8 @@ everyMonth=\u6bcf\u6708
|
|||||||
on=On
|
on=On
|
||||||
validate_error=\u9a8c\u8bc1\u65f6\u53d1\u751f\u610f\u5916\u9519\u8bef
|
validate_error=\u9a8c\u8bc1\u65f6\u53d1\u751f\u610f\u5916\u9519\u8bef
|
||||||
is_schduler=\u5b9a\u65f6\u5668
|
is_schduler=\u5b9a\u65f6\u5668
|
||||||
v4_num=IPv4 Number
|
v4_num=IPv4 \u6570\u91cf
|
||||||
v6_num=IPv6 Number
|
v6_num=IPv6 \u6570\u91cf
|
||||||
always=\u957f\u671f
|
always=\u957f\u671f
|
||||||
schedule=Scheduler
|
schedule=Scheduler
|
||||||
cancel_all=\u53d6\u6d88\u6240\u6709\u914d\u7f6e!
|
cancel_all=\u53d6\u6d88\u6240\u6709\u914d\u7f6e!
|
||||||
@@ -1515,16 +1515,17 @@ the_same_ip_type=\u6e90IP\u4e0e\u76ee\u7684IP\u7684IP\u7c7b\u578b\u5fc5\u987b\u7
|
|||||||
src_ip_pattern=\u6E90IP\u683C\u5F0F
|
src_ip_pattern=\u6E90IP\u683C\u5F0F
|
||||||
dest_ip_pattern=\u76EE\u7684IP\u683C\u5F0F
|
dest_ip_pattern=\u76EE\u7684IP\u683C\u5F0F
|
||||||
src_port_pattern=\u6E90\u7AEF\u53E3\u683C\u5F0F
|
src_port_pattern=\u6E90\u7AEF\u53E3\u683C\u5F0F
|
||||||
dest_port_pattern=\u76EE\u7684\u7AEF\u53E3\u683C\u5F0F
|
dest_port_pattern=\u76EE\u7684\u7AEF\u53E3\u683C\u5F0F
|
||||||
url_group_configuration=URL Group Configuration
|
url_group_configuration=URL \u5206\u7ec4\u914d\u7f6e
|
||||||
dns_keyword_group_configuration=DNS Keyword Group Configuration
|
dns_keyword_group_configuration=DNS \u5173\u952e\u5b57\u5206\u7ec4\u914d\u7f6e
|
||||||
app_ip_correlation=APP IP Correlation
|
app_ip_correlation=APP IP \u901a\u8054
|
||||||
ip_group=IP Group
|
ip_group=IP \u5206\u7ec4
|
||||||
common_ip_config=Common IP Config
|
common_ip_config=Common IP \u914d\u7f6e
|
||||||
common_group=Common Group
|
common_group=Common \u5206\u7ec4
|
||||||
dns_keyword_group_manage=DNS Keyword Group Manage
|
dns_keyword_group_manage=DNS \u5173\u952e\u5b57\u5206\u7ec4\u7ba1\u7406
|
||||||
old_asn_group_manage=ASN Group
|
old_asn_group_manage=ASN \u5206\u7ec4
|
||||||
url_group_manage=URL Group Manage
|
url_group_manage=URL \u5206\u7ec4 \u7ba1\u7406
|
||||||
range_cross=\u6E90IP\u4E0E\u76EE\u7684IP\u8303\u56F4\u6709\u4EA4\u53C9
|
range_cross=\u6E90IP\u4E0E\u76EE\u7684IP\u8303\u56F4\u6709\u4EA4\u53C9
|
||||||
app_ip_correlation=APP\u5173\u8054\u7279\u5F81IP\u914D\u7F6E
|
app_ip_correlation=APP\u5173\u8054\u7279\u5F81IP\u914D\u7F6E
|
||||||
public_private_file_error=\u516C\u79C1\u94A5\u8BC1\u4E66\u4E0D\u5339\u914D
|
public_private_file_error=\u516C\u79C1\u94A5\u8BC1\u4E66\u4E0D\u5339\u914D
|
||||||
|
https_url_format_tip=URL(http[s]://xxx.xx)
|
||||||
@@ -9,9 +9,6 @@ page.pageSize=20
|
|||||||
#\u5206\u9875\u914d\u7f6e
|
#\u5206\u9875\u914d\u7f6e
|
||||||
page.count=0
|
page.count=0
|
||||||
|
|
||||||
#\u7d22\u5f15\u9875\u8def\u5f84
|
|
||||||
web.view.index=/nis/index
|
|
||||||
|
|
||||||
#\u7f13\u5b58\u8bbe\u7f6e
|
#\u7f13\u5b58\u8bbe\u7f6e
|
||||||
ehcache.configFile=cache/ehcache-local.xml
|
ehcache.configFile=cache/ehcache-local.xml
|
||||||
#ehcache.configFile=cache/ehcache-rmi.xml
|
#ehcache.configFile=cache/ehcache-rmi.xml
|
||||||
@@ -60,71 +57,12 @@ version=V1.0.0
|
|||||||
#\u4e0a\u4f20\u6587\u4ef6\u7edd\u5bf9\u8def\u5f84, \u8def\u5f84\u4e2d\u4e0d\u5141\u8bb8\u5305\u542b\u201cuserfiles\u201d
|
#\u4e0a\u4f20\u6587\u4ef6\u7edd\u5bf9\u8def\u5f84, \u8def\u5f84\u4e2d\u4e0d\u5141\u8bb8\u5305\u542b\u201cuserfiles\u201d
|
||||||
userfiles.basedir=upload
|
userfiles.basedir=upload
|
||||||
|
|
||||||
|
|
||||||
#============================#
|
|
||||||
#===== webservice settings ======#
|
|
||||||
#============================#
|
|
||||||
|
|
||||||
#ESB\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u1e69\ufffd\ufffd\u0373\u04bb\ufffd\ufffd\u05b7
|
|
||||||
webservice.esb.endpoint=http://10.55.0.197:7879/TongServiceProxy_doprocess/services/WebService1/
|
|
||||||
#webservice RID
|
|
||||||
webservice.rid=XFBL
|
|
||||||
|
|
||||||
#webservice user SID
|
|
||||||
webservice.yh.sid=s_2016_x2000
|
|
||||||
|
|
||||||
#webservice office SID
|
|
||||||
webservice.jg.sid=s_2015_x2000
|
|
||||||
|
|
||||||
#webservice data dict SID
|
|
||||||
webservice.data.dict.sid=s_2031_x2000
|
|
||||||
|
|
||||||
#webservice data dict bm SID
|
|
||||||
webservice.data.dict.bm.sid=s_2032_x2000
|
|
||||||
|
|
||||||
#webservice data dict code SID
|
|
||||||
webservice.data.dict.code.sid=s_2042_0660BD17-35E4-4482-AA3A-556F2C024902
|
|
||||||
|
|
||||||
#webservice request timeout for seconds
|
|
||||||
webservice.request.timeout=30
|
|
||||||
|
|
||||||
#\ufffd\ufffd\ufffd\ufffd\ufffdURL
|
|
||||||
webservice.jg.service.url=http://10.55.0.155:8080/jgService
|
|
||||||
|
|
||||||
#\ufffd\u00fb\ufffd\ufffd\ufffd\ufffd\ufffdURL
|
|
||||||
webservice.yh.service.url=http://10.55.0.155:8080/ryService
|
|
||||||
|
|
||||||
#\ufffd\ufffd\ufffd\ufffd\u05b5\ufffdURL
|
|
||||||
webservice.data.dict.service.url=http://10.55.0.155:8080/sjzdService
|
|
||||||
|
|
||||||
#\ufffd\ufffd\ufffd\ufffd\u05b5\ufffd\ufffd\ufffd\ufffdURL
|
|
||||||
webservice.data.dict.bm.url=http://10.55.0.155:8080/sjzdbmService
|
|
||||||
|
|
||||||
#\ufffd\ufffd\ufffd\ufffd\ufffd\ufffdURL
|
|
||||||
webservice.data.code.url=http://10.55.0.155:8080/sjmbService
|
|
||||||
|
|
||||||
#webservice\ufffd\u04ff\ufffd\ufffd\ufffd\ufffd\u00ff\u04b3\ufffd\ufffd\ufffd\ufffd
|
|
||||||
webservice.data.pagesize = 2000
|
|
||||||
#webservice\ufffd\ufffd\u01f0\u012c\ufffd\ufffd\u04b3
|
|
||||||
webservice.data.currentpage = 1
|
|
||||||
|
|
||||||
#webservice \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd
|
|
||||||
webservice.jgmb.name=CK_T_JC_RY
|
|
||||||
#webservice \ufffd\u00fb\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd
|
|
||||||
webservice.yhmb.name=CK_T_YH_RY
|
|
||||||
#webservice\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \u022b\ufffd\ufffd
|
|
||||||
webservice.method.name.ql=getData
|
|
||||||
# webservice\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd
|
|
||||||
webservice.method.name.zl=getDataZL
|
|
||||||
|
|
||||||
# redis\u914d\u7f6e\u6587\u4ef6
|
# redis\u914d\u7f6e\u6587\u4ef6
|
||||||
#redis \u5404\u4e2a\u5206\u7247\u7684 IP\u7aef\u53e3
|
#redis \u5404\u4e2a\u5206\u7247\u7684 IP\u7aef\u53e3
|
||||||
redis.cluster.host_port=10.0.6.32:6379,10.0.6.32:6380,10.0.6.32:6381,10.0.6.33:6379,10.0.6.33:6380,10.0.6.33:6381
|
redis.cluster.host_port=10.0.6.32:6379,10.0.6.32:6380,10.0.6.32:6381,10.0.6.33:6379,10.0.6.33:6380,10.0.6.33:6381
|
||||||
|
|
||||||
|
|
||||||
#\u4e2d\u5fc3\u73b0\u573aredis\u5730\u5740\u548c\u7aef\u53e3
|
#\u4e2d\u5fc3\u73b0\u573aredis\u5730\u5740\u548c\u7aef\u53e3
|
||||||
#redis.cluster.host_port=10.174.196.33:6379,10.174.196.33:6380,10.174.196.33:6381,10.174.196.34:6379,10.174.196.34:6380,10.174.196.34:6381,10.174.196.35:6379,10.174.196.35:6380,10.174.196.35:6381,10.174.196.36:6379,10.174.196.36:6380,10.174.196.36:6381,10.174.196.37:6379,10.174.196.37:6380,10.174.196.37:6381,10.174.196.38:6379,10.174.196.38:6380,10.174.196.38:6381,10.174.196.39:6379,10.174.196.39:6380,10.174.196.39:6381
|
|
||||||
|
|
||||||
redis.cluster.connectiontimeout=5000
|
redis.cluster.connectiontimeout=5000
|
||||||
redis.cluster.sotimeout=5000
|
redis.cluster.sotimeout=5000
|
||||||
redis.cluster.maxattempts=3
|
redis.cluster.maxattempts=3
|
||||||
@@ -169,54 +107,12 @@ http.pool.maxTotal=200
|
|||||||
http.pool.defaultMaxPerRoute=100
|
http.pool.defaultMaxPerRoute=100
|
||||||
##########HTTPCLIENT POOL END###################
|
##########HTTPCLIENT POOL END###################
|
||||||
search.dateformat=yyyy-MM-dd HH:mm:ss
|
search.dateformat=yyyy-MM-dd HH:mm:ss
|
||||||
search.eshostandport_A=10.0.6.115:9200
|
|
||||||
search.eshostandport_B=10.0.6.115:9200
|
|
||||||
search.eshostandport_C=10.0.6.115:9200
|
|
||||||
|
|
||||||
#search.eshostandport=10.174.196.135:9200
|
|
||||||
|
|
||||||
|
|
||||||
#\u65e5\u5fd7\u662f\u5426\u4ecehive\u4e2d\u67e5\u8be2
|
|
||||||
selFromHive=false
|
|
||||||
|
|
||||||
#\u662f\u5426\u83b7\u53d6\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2\u8bb0\u5f55\u7684\u603b\u6761\u6570
|
|
||||||
isGetHiveCount=false
|
|
||||||
|
|
||||||
#\u6bcf\u6b21\u83b7\u53d6\u6570\u636e\u4e2d\u5fc3\u591a\u5c11\u6761\u6570\u636e,\u54b1\u4eec\u5728\u5bf9\u83b7\u53d6\u7684\u6570\u636e\u8fdb\u884c\u5206\u9875\u5904\u7406
|
#\u6bcf\u6b21\u83b7\u53d6\u6570\u636e\u4e2d\u5fc3\u591a\u5c11\u6761\u6570\u636e,\u54b1\u4eec\u5728\u5bf9\u83b7\u53d6\u7684\u6570\u636e\u8fdb\u884c\u5206\u9875\u5904\u7406
|
||||||
everyGetHiveDataNum=10000
|
everyGetHiveDataNum=10000
|
||||||
|
|
||||||
#oracle\u6570\u636e\u5e93\u6709\u95ee\u9898\u4e0d\u4eceoracle\u67e5\u8be2\u6570\u636e,\u6240\u6709\u65e5\u5fd7\u6570\u636e\u5747\u4ece\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2
|
|
||||||
onlySelFromHive=false
|
|
||||||
|
|
||||||
#\u662f\u5426\u67e5\u8be2\u795e\u901a\u6570\u636e\u5e93
|
|
||||||
isSelectCluster=true
|
|
||||||
|
|
||||||
#\u7528\u6237\u67e5\u8be2\u65e5\u5fd7\u8d85\u8fc7\u591a\u5c11\u5c0f\u65f6\u53bb\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2
|
#\u7528\u6237\u67e5\u8be2\u65e5\u5fd7\u8d85\u8fc7\u591a\u5c11\u5c0f\u65f6\u53bb\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2
|
||||||
dataCenterTime=48
|
dataCenterTime=48
|
||||||
|
|
||||||
#\u662f\u5426\u5f00\u542f\u57fa\u7840\u9a8c\u8bc1
|
|
||||||
baseValidate=true
|
|
||||||
|
|
||||||
#\u662f\u5426\u5f00\u542f\u4e1a\u52a1\u9a8c\u8bc1
|
|
||||||
serviceValidate=true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#\u65e5\u5fd7\u5b58\u50a8\u672c\u5730\u65f6\u95f4(\u5355\u4f4d\u5c0f\u65f6)
|
|
||||||
logLocalTime=48
|
|
||||||
#\u5b9e\u65f6\u7edf\u8ba1\u9ed8\u8ba4\u67e5\u8be2\u672c\u5730\u4e00\u4e2a\u5c0f\u65f6\u7684\u6570\u636e(\u5355\u4f4d\uff1a\u5c0f\u65f6)
|
|
||||||
reportLocalTime=1
|
|
||||||
|
|
||||||
#\u795e\u901a\u6570\u636e\u5e93\u6700\u65e9\u65e5\u5fd7\u65f6\u95f4(A\u7248\u6beb\u79d2)
|
|
||||||
#2017-08-13 10:07:25
|
|
||||||
clusterAStartTime=1503504000725
|
|
||||||
#\u795e\u901a\u6570\u636e\u5e93\u6700\u65e9\u7ed3\u675f\u65f6\u95f4(B\u7248\u6beb\u79d2)
|
|
||||||
#2017-08-13 10:07:25
|
|
||||||
clusterBStartTime=1503504000725
|
|
||||||
############################################################################################################################################
|
|
||||||
#\u8bbe\u7f6e\u914d\u7f6e\u662f\u5426\u5165\u5e93
|
|
||||||
############################################################################################################################################
|
|
||||||
isCommit=true
|
|
||||||
############################################################################################################################################
|
############################################################################################################################################
|
||||||
############################################################################################################################################
|
############################################################################################################################################
|
||||||
httpUrl=http://10.0.7.14:9999/galaxy-service/service/cfg/
|
httpUrl=http://10.0.7.14:9999/galaxy-service/service/cfg/
|
||||||
@@ -286,8 +182,8 @@ ntcTotalReport=v1/ntcTotalReport
|
|||||||
trafficIpActiveFiveMinute=v1/trafficIpActiveFiveMinute
|
trafficIpActiveFiveMinute=v1/trafficIpActiveFiveMinute
|
||||||
trafficIpActiveOneHour=v1/trafficIpActiveOneHour
|
trafficIpActiveOneHour=v1/trafficIpActiveOneHour
|
||||||
|
|
||||||
client_connect_timeout=300000
|
client_connect_timeout=500000
|
||||||
client_read_timeout=300000
|
client_read_timeout=500000
|
||||||
log_time_interval=300000
|
log_time_interval=300000
|
||||||
logsearch_menu_id=152
|
logsearch_menu_id=152
|
||||||
#use elasticsearch or not#
|
#use elasticsearch or not#
|
||||||
@@ -589,7 +485,7 @@ ntcCollectRadiusLog=v1/ntcCollectRadiusLogs
|
|||||||
ntcConnRecordLog=v1/ntcConnRecordLogs
|
ntcConnRecordLog=v1/ntcConnRecordLogs
|
||||||
ntcConnRecordPercent=v1/ntcConnRecordPercent
|
ntcConnRecordPercent=v1/ntcConnRecordPercent
|
||||||
#\u5bfc\u51fa\u6700\u5927\u6761\u6570
|
#\u5bfc\u51fa\u6700\u5927\u6761\u6570
|
||||||
maxLogExportSize=2000
|
maxLogExportSize=20000
|
||||||
pxy_crtl_subscribe_id_region=PXY_CTRL_SUBSCRIBE_ID
|
pxy_crtl_subscribe_id_region=PXY_CTRL_SUBSCRIBE_ID
|
||||||
ntc_subscribe_id_region=NTC_SUBSCRIBE_ID
|
ntc_subscribe_id_region=NTC_SUBSCRIBE_ID
|
||||||
ntcAsnRecord=v1/ntcAsnRecord
|
ntcAsnRecord=v1/ntcAsnRecord
|
||||||
@@ -623,4 +519,5 @@ trafficAppBpsTrend=v1/trafficAppBpsTrend
|
|||||||
#vpn cgi error info
|
#vpn cgi error info
|
||||||
cgiError=cannot connect to vpnserver,Connection to the server has failed,Specified object can not be found,Too many users,User already exists,Too many created users,The destination server is not a VPN server,The connection has been interrupted,
|
cgiError=cannot connect to vpnserver,Connection to the server has failed,Specified object can not be found,Too many users,User already exists,Too many created users,The destination server is not a VPN server,The connection has been interrupted,
|
||||||
#\u83b7\u53d6\u670d\u52a1\u914d\u7f6e\u603b\u91cf\u63a5\u53e3
|
#\u83b7\u53d6\u670d\u52a1\u914d\u7f6e\u603b\u91cf\u63a5\u53e3
|
||||||
getConfigByService=v1/getConfigByService
|
getConfigByService=v1/getConfigByService
|
||||||
|
delAllCfg=v1/delAllConfig
|
||||||
@@ -144,7 +144,7 @@ is automatically deleted from the cache by the cache manager, regardless
|
|||||||
of whether or not it has expired.
|
of whether or not it has expired.
|
||||||
|
|
||||||
', null);
|
', null);
|
||||||
INSERT INTO `help_document` VALUES ('2', 'control_policy.md', 'Control Policy
|
INSERT INTO `help_document` VALUES ('2', 'Control Policy
|
||||||
|
|
||||||
On National Proxy System, Individual Control policy rules determine
|
On National Proxy System, Individual Control policy rules determine
|
||||||
whether to allow, block, redirect or replace a session based on traffic
|
whether to allow, block, redirect or replace a session based on traffic
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
DROP PROCEDURE IF EXISTS `proc_statistics_config`;
|
drop PROCEDURE proc_statistics_config;
|
||||||
delimiter ;;
|
|
||||||
CREATE DEFINER=`root`@`%` PROCEDURE `proc_statistics_config`()
|
CREATE DEFINER=`root`@`%` PROCEDURE `proc_statistics_config`()
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
@@ -67,7 +66,7 @@ BEGIN
|
|||||||
|
|
||||||
|
|
||||||
#20190328 增加定时任务后is_audit=1 && (is_valid=1 || is_valid=0) 即为approved (增加cfg_state=4[is_valid=0 && is_audit=1],代表定时任务审核过的),而cfg_state=1仅仅代表审核通过且有效的,界面展示的approved值实际包含cfg_state=4和cfg_state=1
|
#20190328 增加定时任务后is_audit=1 && (is_valid=1 || is_valid=0) 即为approved (增加cfg_state=4[is_valid=0 && is_audit=1],代表定时任务审核过的),而cfg_state=1仅仅代表审核通过且有效的,界面展示的approved值实际包含cfg_state=4和cfg_state=1
|
||||||
set @insert_statistics_sql := concat('insert into cfg_num_statistics(statistic_time,audit_time,function_id,service_id,action,compile_id,cfg_state) select ','''',ntime,'''',',','audit_time,function_id,service_id,action,compile_id,if(is_valid=-1,-1,if(is_valid=1,1,if(is_audit=0,0,if(is_audit=1,4,if(is_audit=2,2,if(is_audit=3,3,0)))))) cfg_state from ',tabName);
|
set @insert_statistics_sql := concat('insert into cfg_num_statistics(statistic_time,function_id,service_id,action,compile_id,cfg_state) select ','''',ntime,'''',',','function_id,service_id,action,compile_id,if(is_valid=-1,-1,if(is_valid=1,1,if(is_audit=0,0,if(is_audit=1,4,if(is_audit=2,2,if(is_audit=3,3,0)))))) cfg_state from ',tabName);
|
||||||
|
|
||||||
|
|
||||||
PREPARE execs FROM @insert_statistics_sql;
|
PREPARE execs FROM @insert_statistics_sql;
|
||||||
@@ -130,9 +129,4 @@ BEGIN
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
END IF;
|
END IF;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
END
|
END
|
||||||
;;
|
|
||||||
delimiter ;
|
|
||||||
|
|
||||||
#执行存储过程
|
|
||||||
call exec_procs();
|
|
||||||
@@ -73,32 +73,32 @@ UPDATE function_region_dict SET config_ip_port_show=3 WHERE function_id=401;
|
|||||||
#ASN IP修改只显示目的IP
|
#ASN IP修改只显示目的IP
|
||||||
UPDATE function_region_dict SET config_ip_port_show=3 WHERE function_id=600;
|
UPDATE function_region_dict SET config_ip_port_show=3 WHERE function_id=600;
|
||||||
#sql 更新字段语句
|
#sql 更新字段语句
|
||||||
UPDATE app_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE app_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM app_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE app_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE app_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM app_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE app_ip_range_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE app_ip_range_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM app_ip_range_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE app_ip_range_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE app_ip_range_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM app_ip_range_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE area_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE area_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM area_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE area_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE area_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM area_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE asn_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE asn_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM asn_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE asn_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE asn_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM asn_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE av_cont_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE av_cont_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_cont_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE av_cont_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE av_cont_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_cont_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE av_pic_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE av_pic_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_pic_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE av_pic_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE av_pic_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_pic_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE av_voip_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE av_voip_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_voip_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE av_voip_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE av_voip_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_voip_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE ddos_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE ddos_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ddos_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE ddos_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE ddos_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM ddos_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE dns_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE dns_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM dns_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE dns_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE dns_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM dns_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
UPDATE ip_port_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE ip_port_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
UPDATE ip_port_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM port_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`)
|
UPDATE ip_port_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
17
src/main/resources/sql/20190424/update_sys_menu.sql
Normal file
17
src/main/resources/sql/20190424/update_sys_menu.sql
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
--修改实时报表->流量统计->协议统计 国际化代码
|
||||||
|
UPDATE sys_menu SET code='protocol_statistics', name ='Protocol Statistics' WHERE id = 1215
|
||||||
|
|
||||||
|
--修改实时报表->流量统计->流量统计 国际化代码
|
||||||
|
UPDATE sys_menu SET code='traffic_statistics' WHERE id = 1207 >
|
||||||
|
|
||||||
|
--修改实时报表->流量统计->活跃IP统计 国际化代码
|
||||||
|
UPDATE sys_menu SET code='active_ip_statistics' WHERE id = 1211 >
|
||||||
|
|
||||||
|
--修改实时报表->流量统计->App统计 国际化代码
|
||||||
|
UPDATE sys_menu SET code='app_statistics' WHERE id = 1213 >
|
||||||
|
|
||||||
|
--修改实时报表->流量统计->服务统计 国际化代码
|
||||||
|
UPDATE sys_menu SET code='service_statistics' WHERE id = 1209 >
|
||||||
|
|
||||||
|
--修改实时报表->流量统计->网站统计 国际化代码
|
||||||
|
UPDATE sys_menu SET code='website_statistics' WHERE id = 1205 >
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
#function_region_dict 对应ip_pattern,port_pattern的字段长度拓展一倍,使用分号分隔源/目的
|
||||||
|
ALTER TABLE function_region_dict MODIFY config_ip_pattern VARCHAR(20) COMMENT "ip的格式 1:ip掩码;2:IP范围;3:IP;使用逗号分隔,源ip与目的IP使用;分隔";
|
||||||
|
ALTER TABLE function_region_dict MODIFY config_port_pattern VARCHAR(20) COMMENT "端口的格式,1:port;2:port_mask;使用逗号分隔,源端口与目的端口使用;分隔";
|
||||||
|
#各表修改ip_pattern,port_pattern
|
||||||
|
#app_ip_cfg
|
||||||
|
ALTER TABLE app_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE app_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE app_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE app_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#app_ip_range_cfg
|
||||||
|
ALTER TABLE app_ip_range_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE app_ip_range_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE app_ip_range_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE app_ip_range_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#area_ip_cfg
|
||||||
|
ALTER TABLE area_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE area_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE area_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE area_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#asn_ip_cfg
|
||||||
|
ALTER TABLE asn_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE asn_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE asn_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE asn_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#av_cont_ip_cfg
|
||||||
|
ALTER TABLE av_cont_ip_cfg change ip_pattern src_ip_pattern int COMMENT '源ip格式';
|
||||||
|
ALTER TABLE av_cont_ip_cfg add dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE av_cont_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE av_cont_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#av_pic_ip_cfg
|
||||||
|
ALTER TABLE av_pic_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE av_pic_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE av_pic_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE av_pic_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#av_voip_ip_cfg
|
||||||
|
ALTER TABLE av_voip_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE av_voip_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE av_voip_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE av_voip_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#ddos_ip_cfg
|
||||||
|
ALTER TABLE ddos_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE ddos_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE ddos_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE ddos_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#dns_ip_cfg
|
||||||
|
ALTER TABLE dns_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE dns_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE dns_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE dns_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#ip_port_cfg
|
||||||
|
ALTER TABLE ip_port_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE ip_port_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE ip_port_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE ip_port_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#ip_reuse_ip_cfg
|
||||||
|
ALTER TABLE ip_reuse_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE ip_reuse_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
ALTER TABLE ip_reuse_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||||
|
ALTER TABLE ip_reuse_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||||
|
#ip_reuse_policy_cfg
|
||||||
|
ALTER TABLE ip_reuse_policy_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||||
|
ALTER TABLE ip_reuse_policy_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||||
|
#修改字典的值
|
||||||
|
UPDATE function_region_dict SET config_ip_pattern ="1,2,3;1,2,3" WHERE config_ip_pattern="1,2,3";
|
||||||
|
UPDATE function_region_dict SET config_ip_pattern ="1;1" WHERE config_ip_pattern="1";
|
||||||
|
UPDATE function_region_dict SET config_ip_pattern ="3;3" WHERE config_ip_pattern="3";
|
||||||
|
UPDATE function_region_dict SET config_ip_pattern ="1,3;1,3" WHERE config_ip_pattern="1,3";
|
||||||
|
|
||||||
|
UPDATE function_region_dict SET config_port_pattern ="1;1" WHERE config_port_pattern="1";
|
||||||
|
UPDATE function_region_dict SET config_port_pattern ="1,2;1,2" WHERE config_port_pattern="1,2";
|
||||||
|
#Spoofing IP修改只显示目的IP
|
||||||
|
UPDATE function_region_dict SET config_ip_port_show=3 WHERE function_id=401;
|
||||||
|
#ASN IP修改只显示目的IP
|
||||||
|
UPDATE function_region_dict SET config_ip_port_show=3 WHERE function_id=600;
|
||||||
|
#sql 更新字段语句
|
||||||
|
UPDATE app_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM app_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE app_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM app_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE app_ip_range_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM app_ip_range_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE app_ip_range_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM app_ip_range_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE area_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM area_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE area_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM area_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE asn_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM asn_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE asn_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM asn_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE av_cont_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_cont_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE av_cont_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_cont_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE av_pic_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_pic_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE av_pic_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_pic_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE av_voip_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_voip_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE av_voip_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_voip_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE ddos_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ddos_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE ddos_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM ddos_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE dns_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM dns_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE dns_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM dns_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
|
||||||
|
UPDATE ip_port_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
|
UPDATE ip_port_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||||
@@ -10,7 +10,36 @@
|
|||||||
<div class="row ipInfo">
|
<div class="row ipInfo">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="protocol" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||||
|
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
<input type="hidden" name="protocolId" value="0">
|
||||||
|
</div>
|
||||||
|
<div for="protocol"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="direction" class="selectpicker show-tick form-control required" >
|
||||||
|
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
||||||
|
<option value="${directionC.itemCode}" <c:if test="${_cfg.direction==directionC.itemCode || (_cfg.direction==null && directionC.itemCode==0)}">selected</c:if>><spring:message code="${directionC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="direction"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -30,33 +59,67 @@
|
|||||||
<div for="ipType"></div>
|
<div for="ipType"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
</div>
|
||||||
<div class="form-group ">
|
<div class="row ipCol">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<select name="protocol" class="selectpicker show-tick form-control required">
|
|
||||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
|
||||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
|
||||||
</c:forEach>
|
|
||||||
</select>
|
|
||||||
<input type="hidden" name="protocolId" value="0">
|
|
||||||
</div>
|
|
||||||
<div for="protocol"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="src_ip_pattern"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="ipPattern" class="selectpicker show-tick form-control required">
|
<select name="srcIpPattern" class="selectpicker show-tick form-control required">
|
||||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||||
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.ipPattern==ipPatternC.itemCode || (_cfg.ipPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.srcIpPattern==ipPatternC.itemCode || (_cfg.srcIpPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="ipPattern"></div>
|
<div for="srcIpPattern"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input class="form-control required ipCheck" type="text" name="srcIpAddress" value="${_cfg.srcIpAddress}">
|
||||||
|
</div>
|
||||||
|
<div for="srcIpAddress"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row hidden ipCol">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="src_port_pattern"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="srcPortPattern" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||||
|
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.srcPortPattern==portPatternC.itemCode || (_cfg.srcPortPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="srcPortPattern"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input class="form-control required portCheck" type="text" name="srcPort" value="${_cfg.srcPort}">
|
||||||
|
</div>
|
||||||
|
<div for="srcPort"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row hidden ipCol">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="dest_ip_pattern"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="destIpPattern" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||||
|
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.destIpPattern==ipPatternC.itemCode || (_cfg.destIpPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="destIpPattern"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -69,25 +132,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<c:choose>
|
<div class="row hidden ipCol">
|
||||||
<c:when test="${_cfg.cfgId==null}">
|
|
||||||
<div class="row hidden port">
|
|
||||||
</c:when>
|
|
||||||
<c:otherwise>
|
|
||||||
<div class="row port">
|
|
||||||
</c:otherwise>
|
|
||||||
</c:choose>
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="dest_port_pattern"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="portPattern" class="selectpicker show-tick form-control required">
|
<select name="destPortPattern" class="selectpicker show-tick form-control required">
|
||||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||||
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.portPattern==portPatternC.itemCode || (_cfg.portPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.destPortPattern==portPatternC.itemCode || (_cfg.destPortPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div for="portPattern"></div>
|
<div for="destPortPattern"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -100,49 +156,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<c:choose>
|
<div class="row">
|
||||||
<c:when test="${_cfg.cfgId==null}">
|
|
||||||
<div class="row hidden destPort">
|
|
||||||
</c:when>
|
|
||||||
<c:otherwise>
|
|
||||||
<div class="row destPort">
|
|
||||||
</c:otherwise>
|
|
||||||
</c:choose>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<select name="direction" class="selectpicker show-tick form-control required" >
|
|
||||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
|
||||||
<option value="${directionC.itemCode}" <c:if test="${_cfg.direction==directionC.itemCode || (_cfg.direction==null && directionC.itemCode==0)}">selected</c:if>><spring:message code="${directionC.itemValue}"/></option>
|
|
||||||
</c:forEach>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div for="direction"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<c:if test="${_cfg.cfgId==null}">
|
|
||||||
<div class="row">
|
|
||||||
<button type="button" class="btn btn-red-hollow center-block" onClick="more(this);" data-click-times="0"><spring:message code="show_more"/></button>
|
<button type="button" class="btn btn-red-hollow center-block" onClick="more(this);" data-click-times="0"><spring:message code="show_more"/></button>
|
||||||
</div>
|
|
||||||
</c:if>
|
|
||||||
<div class="row destPort">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input type="hidden" name="srcIpAddress" value="${_cfg.srcIpAddress}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group ">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input type="hidden" name="srcPort" value="${_cfg.srcPort}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ function isBatch(url){
|
|||||||
){
|
){
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
return false;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除
|
//删除
|
||||||
@@ -164,6 +164,26 @@ function del(url){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
var isAudit=$("#isAudit").val();
|
||||||
|
var isValid=$("#isValid").val();
|
||||||
|
|
||||||
|
// 批量删除:is_audit 3/0/null && is_valid 0/null 此条件下允许(取反提示)
|
||||||
|
if(!((isAudit==null || isAudit=='' || isAudit==3 || isAudit==0 )
|
||||||
|
&& (isValid==null || isValid==''|| isValid==0))){
|
||||||
|
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isAudit==null || isAudit==''){
|
||||||
|
isAudit="3,0";
|
||||||
|
}
|
||||||
|
if(isValid==null || isValid==''){
|
||||||
|
isValid="0";
|
||||||
|
}
|
||||||
|
|
||||||
|
url=url+"&batchAuditValue="+isAudit;
|
||||||
|
url=url+"&batchValidValue="+isValid;
|
||||||
|
|
||||||
url = url+"&"
|
url = url+"&"
|
||||||
if(isBatch(url)) {
|
if(isBatch(url)) {
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
@@ -189,11 +209,10 @@ function update(url){
|
|||||||
return;
|
return;
|
||||||
} */
|
} */
|
||||||
if($(checkboxes).filter(":checked").length==1){
|
if($(checkboxes).filter(":checked").length==1){
|
||||||
//TODO 生效配置可更改功能,在最后功能实现完成后打开【打开时确认来函和专项是否影响】
|
/* if(cked.val()==1){
|
||||||
if(cked.val()==1){
|
|
||||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}/*else if(cked.val()==3){
|
} *//*else if(cked.val()==3){
|
||||||
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
@@ -228,6 +247,24 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
|||||||
doAll(checkboxes,url);
|
doAll(checkboxes,url);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
var isAudit=$("#isAudit").val();
|
||||||
|
var isValid=$("#isValid").val();
|
||||||
|
|
||||||
|
// 审核通过:is_audit 0/null && is_valid 0 此条件下允许(取反提示)
|
||||||
|
if(!((isAudit==null || isAudit=='' || isAudit==0 )
|
||||||
|
&& (isValid==null || isValid==''|| isValid==0))){
|
||||||
|
top.$.jBox.tip("<spring:message code='has_prohibit_pass'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isAudit==null || isAudit==''){
|
||||||
|
isAudit="0";
|
||||||
|
}
|
||||||
|
if(isValid==null || isValid==''){
|
||||||
|
isValid="0";
|
||||||
|
}
|
||||||
|
url=url+"&batchAuditValue="+isAudit;
|
||||||
|
url=url+"&batchValidValue="+isValid;
|
||||||
url = url+"&"
|
url = url+"&"
|
||||||
//配置批量下发
|
//配置批量下发
|
||||||
if(isBatch(url)){
|
if(isBatch(url)){
|
||||||
@@ -256,6 +293,27 @@ function noPassOpt(url){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
var isAudit=$("#isAudit").val();
|
||||||
|
var isValid=$("#isValid").val();
|
||||||
|
|
||||||
|
// 审核不通过:is_audit 0/null && is_valid 0/null 此条件下允许(取反提示)
|
||||||
|
if(!((isAudit==null || isAudit=='' || isAudit==0 )
|
||||||
|
&& (isValid==null || isValid==''|| isValid==0))){
|
||||||
|
top.$.jBox.tip("<spring:message code='has_prohibit_nopass'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isAudit==null || isAudit==''){
|
||||||
|
isAudit="0";
|
||||||
|
}
|
||||||
|
if(isValid==null || isValid==''){
|
||||||
|
isValid="0";
|
||||||
|
}
|
||||||
|
|
||||||
|
url=url+"&batchAuditValue="+isAudit;
|
||||||
|
url=url+"&batchValidValue="+isValid;
|
||||||
|
|
||||||
url = url+"&"
|
url = url+"&"
|
||||||
//配置批量审核(未通过)
|
//配置批量审核(未通过)
|
||||||
if(isBatch(url)){
|
if(isBatch(url)){
|
||||||
@@ -334,6 +392,24 @@ function cancelPassOpt(url){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
var isAudit=$("#isAudit").val();
|
||||||
|
var isValid=$("#isValid").val();
|
||||||
|
// 取消审核通过:is_audit 1/null && is_valid 0(定时任务)/1/null 此条件下允许(取反提示)
|
||||||
|
if(!((isAudit==null || isAudit=='' || isAudit==1 )
|
||||||
|
&& (isValid==null || isValid=='' || isValid==1 || isValid==0))){
|
||||||
|
top.$.jBox.tip("<spring:message code='hasnot_approved'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isAudit==null || isAudit==''){
|
||||||
|
isAudit="1";
|
||||||
|
}
|
||||||
|
if(isValid==null || isValid==''){
|
||||||
|
isValid="1,0";
|
||||||
|
}
|
||||||
|
url=url+"&batchAuditValue="+isAudit;
|
||||||
|
url=url+"&batchValidValue="+isValid;
|
||||||
|
|
||||||
url = url+"&"
|
url = url+"&"
|
||||||
//配置批量取消
|
//配置批量取消
|
||||||
if(isBatch(url)){
|
if(isBatch(url)){
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
<div class="theme-panel hidden-xs hidden-sm">
|
<div class="theme-panel hidden-xs hidden-sm">
|
||||||
|
|
||||||
<%-- <shiro:hasPermission name="avContUrl:config"> --%>
|
<%-- <shiro:hasPermission name="avContUrl:config"> --%>
|
||||||
<button type="button" class="btn btn-primary"
|
<button type="button" class="addId btn btn-primary"
|
||||||
onClick="javascript:window.location='${ctx}/basics/asnGroup/asnGroupForm'">
|
onClick="javascript:window.location='${ctx}/basics/asnGroup/asnGroupForm'">
|
||||||
<i class="fa fa-plus"></i>
|
<i class="fa fa-plus"></i>
|
||||||
<spring:message code="add"></spring:message></button>
|
<spring:message code="add"></spring:message></button>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var defaultIpInfo;
|
var defaultIpInfo;
|
||||||
$(function(){
|
$(function(){
|
||||||
$("input[name$='destPort']").parents(".form-group").addClass("hidden");
|
//$("input[name$='destPort']").parents(".form-group").addClass("hidden");
|
||||||
$("select[name$='portPattern']").parents(".form-group").addClass("hidden");
|
//$("select[name$='portPattern']").parents(".form-group").addClass("hidden");
|
||||||
$("select[name$='protocol']").parents(".form-group").addClass("hidden");
|
$("select[name$='protocol']").parents(".form-group").addClass("hidden");
|
||||||
$("select[name$='direction']").parents(".form-group").addClass("hidden");
|
$("select[name$='direction']").parents(".form-group").addClass("hidden");
|
||||||
defaultIpInfo=$(".ipInfo").clone();
|
defaultIpInfo=$(".ipInfo").clone();
|
||||||
@@ -93,7 +93,7 @@ var addContent = function(obj, contentClassName) {
|
|||||||
$("select[name$='ipType']").on("change",function(){
|
$("select[name$='ipType']").on("change",function(){
|
||||||
switchIpInfo(this);
|
switchIpInfo(this);
|
||||||
});
|
});
|
||||||
$("select[name$='ipPattern']").on("change",function(){
|
$("select[name$='IpPattern']").on("change",function(){
|
||||||
switchIpInfo(this);
|
switchIpInfo(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -167,8 +167,10 @@ var reSort=function(obj,index){
|
|||||||
serviceType="${region.configServiceType}"
|
serviceType="${region.configServiceType}"
|
||||||
ipPortShow="${region.configIpPortShow}"
|
ipPortShow="${region.configIpPortShow}"
|
||||||
ipType="${region.configIpType}"
|
ipType="${region.configIpType}"
|
||||||
ipPattern="${region.configIpPattern}"
|
srcIpPattern="${fn:split(region.configIpPattern,';')[0]}"
|
||||||
portPattern="${region.configPortPattern}"
|
destIpPattern="${fn:split(region.configIpPattern,';')[1]}"
|
||||||
|
srcPortPattern="${fn:split(region.configPortPattern,';')[0]}"
|
||||||
|
destPortPattern="${fn:split(region.configPortPattern,';')[1]}"
|
||||||
direction="${region.configDirection}"
|
direction="${region.configDirection}"
|
||||||
protocol="${region.configProtocol}"
|
protocol="${region.configProtocol}"
|
||||||
regionType="${region.regionType}"
|
regionType="${region.regionType}"
|
||||||
@@ -265,96 +267,6 @@ var reSort=function(obj,index){
|
|||||||
onClick="delContent(this,'ipInfo');" />
|
onClick="delContent(this,'ipInfo');" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<select name="asnIpCfgs[0].ipType" class="selectpicker show-tick form-control required">
|
|
||||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
|
||||||
<option value="${ipTypeC.itemCode}"
|
|
||||||
<c:if test="${_cfg.asnIpCfgs[0].ipType==ipTypeC.itemCode
|
|
||||||
|| (_cfg.asnIpCfgs[0].ipType==null && ipTypeC.itemCode==4)}">
|
|
||||||
selected
|
|
||||||
</c:if>
|
|
||||||
>
|
|
||||||
<spring:message code="${ipTypeC.itemValue}"/>
|
|
||||||
</option>
|
|
||||||
</c:forEach>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div for="asnIpCfgs[0].ipType"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row ip">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<select name="asnIpCfgs[0].ipPattern" class="selectpicker show-tick form-control required">
|
|
||||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
|
||||||
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.asnIpCfgs[0].ipPattern==ipPatternC.itemCode || (_cfg.asnIpCfgs[0].ipPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
|
||||||
</c:forEach>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div for="asnIpCfgs[0].ipPattern"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group ">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input class="form-control required ipCheck" type="text" name="asnIpCfgs[0].srcIpAddress" value="${_cfg.asnIpCfgs[0].srcIpAddress}">
|
|
||||||
</div>
|
|
||||||
<div for="asnIpCfgs[0].srcIpAddress"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row port">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<select name="asnIpCfgs[0].portPattern" class="selectpicker show-tick form-control required">
|
|
||||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
|
||||||
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.asnIpCfgs[0].portPattern==portPatternC.itemCode || (_cfg.asnIpCfgs[0].portPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
|
||||||
</c:forEach>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div for="asnIpCfgs[0].portPattern"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group ">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input class="form-control required portCheck" type="text" name="asnIpCfgs[0].srcPort" value="${_cfg.asnIpCfgs[0].srcPort}">
|
|
||||||
</div>
|
|
||||||
<div for="asnIpCfgs[0].srcPort"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row destPort">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group ">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input class="form-control required ipCheck" type="text" name="asnIpCfgs[0].destIpAddress" value="${_cfg.asnIpCfgs[0].destIpAddress}">
|
|
||||||
</div>
|
|
||||||
<div for="asnIpCfgs[0].destIpAddress"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group ">
|
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input class="form-control required portCheck" type="text" name="asnIpCfgs[0].destPort" value="${_cfg.asnIpCfgs[0].destPort}">
|
|
||||||
</div>
|
|
||||||
<div for="asnIpCfgs[0].destPort"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row protocol">
|
<div class="row protocol">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group ">
|
<div class="form-group ">
|
||||||
@@ -387,6 +299,125 @@ var reSort=function(obj,index){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="asnIpCfgs[0].ipType" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||||
|
<option value="${ipTypeC.itemCode}"
|
||||||
|
<c:if test="${_cfg.asnIpCfgs[0].ipType==ipTypeC.itemCode
|
||||||
|
|| (_cfg.asnIpCfgs[0].ipType==null && ipTypeC.itemCode==4)}">
|
||||||
|
selected
|
||||||
|
</c:if>
|
||||||
|
>
|
||||||
|
<spring:message code="${ipTypeC.itemValue}"/>
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].ipType"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="src_ip_pattern"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="asnIpCfgs[0].srcIpPattern" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||||
|
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.asnIpCfgs[0].srcIpPattern==ipPatternC.itemCode || (_cfg.asnIpCfgs[0].srcIpPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].srcIpPattern"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input class="form-control required ipCheck" type="text" name="asnIpCfgs[0].srcIpAddress" value="${_cfg.asnIpCfgs[0].srcIpAddress}">
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].srcIpAddress"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="src_port_pattern"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="asnIpCfgs[0].srcPortPattern" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||||
|
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.asnIpCfgs[0].srcPortPattern==portPatternC.itemCode || (_cfg.asnIpCfgs[0].srcPortPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].srcPortPattern"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input class="form-control required portCheck" type="text" name="asnIpCfgs[0].srcPort" value="${_cfg.asnIpCfgs[0].srcPort}">
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].srcPort"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="asnIpCfgs[0].destIpPattern" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||||
|
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.asnIpCfgs[0].destIpPattern==ipPatternC.itemCode || (_cfg.asnIpCfgs[0].destIpPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].destIpPattern"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input class="form-control required ipCheck" type="text" name="asnIpCfgs[0].destIpAddress" value="${_cfg.asnIpCfgs[0].destIpAddress}">
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].destIpAddress"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="dest_port_pattern"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="asnIpCfgs[0].destPortPattern" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||||
|
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.asnIpCfgs[0].destPortPattern==portPatternC.itemCode || (_cfg.asnIpCfgs[0].destPortPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].destPortPattern"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input class="form-control required portCheck" type="text" name="asnIpCfgs[0].destPort" value="${_cfg.asnIpCfgs[0].destPort}">
|
||||||
|
</div>
|
||||||
|
<div for="asnIpCfgs[0].destPort"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%-- <div class="row">
|
<%-- <div class="row">
|
||||||
<button type="button" class="btn btn-red-hollow center-block"
|
<button type="button" class="btn btn-red-hollow center-block"
|
||||||
onClick="more(this);" data-click-times="0">
|
onClick="more(this);" data-click-times="0">
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user