diff --git a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java index af0dc2d55..854ac2038 100644 --- a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java @@ -31,6 +31,7 @@ public class AppPolicyCfg extends BaseCfg { */ private static final long serialVersionUID = -5679998383250783571L; private static final String tableName="app_policy_cfg"; + private String indexTable="app_policy_cfg"; @Expose @ExcelField(title="cfg_id",sort=0) private Integer compileId; @@ -268,5 +269,13 @@ public class AppPolicyCfg extends BaseCfg { public void setUserRegion5(String userRegion5) { this.userRegion5 = userRegion5; } + + public String getIndexTable() { + return indexTable; + } + + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java b/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java index 1ea7c126c..446203897 100644 --- a/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java +++ b/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java @@ -9,6 +9,7 @@ public class AvFileSampleCfg extends BaseCfg { * */ private static final long serialVersionUID = -2356472662189941874L; + private String indexTable="av_file_sample_cfg"; @Expose @SerializedName("srcFile") @ExcelField(title="src_file",sort=2) @@ -94,5 +95,11 @@ public class AvFileSampleCfg extends BaseCfg { public void setResultPath(String resultPath) { this.resultPath = resultPath; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/BaseCfg.java b/src/main/java/com/nis/domain/configuration/BaseCfg.java index 962c6fe22..3e339c2c9 100644 --- a/src/main/java/com/nis/domain/configuration/BaseCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseCfg.java @@ -139,6 +139,10 @@ public class BaseCfg extends BaseEntity implements Cloneable{ * 来函id */ protected Integer requestId; + /** + * 取消审核来函id + */ + protected Integer cancelRequestId; /** * 来函 */ @@ -884,5 +888,11 @@ public class BaseCfg extends BaseEntity implements Cloneable{ public void setUserRegion5(String userRegion5) { this.userRegion5 = userRegion5; } + public Integer getCancelRequestId() { + return cancelRequestId; + } + public void setCancelRequestId(Integer cancelRequestId) { + this.cancelRequestId = cancelRequestId; + } } diff --git a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java index e261cd37b..17c0e6b98 100644 --- a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java @@ -37,6 +37,7 @@ public class BaseIpCfg extends BaseCfg { super(); // TODO Auto-generated constructor stub } + private String indexTable="ip_port_cfg"; /** * ip类型 */ @@ -307,5 +308,11 @@ public class BaseIpCfg extends BaseCfg { public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcsSubscribeIdCfg) { this.ntcSubscribeIdCfg = ntcsSubscribeIdCfg; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java index caf00fc58..b56b5acde 100644 --- a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java +++ b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java @@ -28,6 +28,7 @@ public class CfgIndexInfo extends BaseCfg { */ private static final long serialVersionUID = 2796500715438264119L; private static final String tableName="cfg_index_info"; + private String indexTable="cfg_index_info"; private List voipAccounts;//Add表单使用 private List asnIpCfgs;//Add表单使用 private List voipIps; //Add表单使用 @@ -308,4 +309,11 @@ public class CfgIndexInfo extends BaseCfg { public static String getTablename() { return tableName; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } + } diff --git a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java index c1271858a..91200ff60 100644 --- a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java @@ -22,6 +22,7 @@ public class DdosIpCfg extends BaseIpCfg { * */ private static final long serialVersionUID = -5446903784736960824L; + private String indexTable="ddos_ip_cfg"; @ExcelField(title="antiddos_protocol",sort=41) private String antiddosProtocol;//目前支持TCP_SYN, DNS, NTP, @ExcelField(title="bps_threadshold",sort=42) @@ -47,6 +48,12 @@ public class DdosIpCfg extends BaseIpCfg { public void setPpsThreadshold(Long ppsThreadshold) { this.ppsThreadshold = ppsThreadshold; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/DnsIpCfg.java b/src/main/java/com/nis/domain/configuration/DnsIpCfg.java index 9307dbf27..061bd05a3 100644 --- a/src/main/java/com/nis/domain/configuration/DnsIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/DnsIpCfg.java @@ -26,6 +26,7 @@ public class DnsIpCfg extends BaseIpCfg { * */ private static final long serialVersionUID = 8149437730819674317L; + private String indexTable="dns_ip_cfg"; private String dnsStrategyName; private Integer dnsStrategyId; @@ -41,5 +42,11 @@ public class DnsIpCfg extends BaseIpCfg { public void setDnsStrategyName(String dnsStrategyName) { this.dnsStrategyName = dnsStrategyName; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/DnsResStrategy.java b/src/main/java/com/nis/domain/configuration/DnsResStrategy.java index 8d4a6a9af..c2a07db69 100644 --- a/src/main/java/com/nis/domain/configuration/DnsResStrategy.java +++ b/src/main/java/com/nis/domain/configuration/DnsResStrategy.java @@ -12,6 +12,7 @@ public class DnsResStrategy extends BaseCfg { * */ private static final long serialVersionUID = -2720862431960415564L; + private String indexTable="dns_res_strategy"; private Integer resGroup1Id; private Integer resGroup1Num; private Integer resGroup2Id; @@ -114,4 +115,11 @@ public class DnsResStrategy extends BaseCfg { public void setGroup1Name(String group1Name) { this.group1Name = group1Name; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } + } diff --git a/src/main/java/com/nis/domain/configuration/FileDigestCfg.java b/src/main/java/com/nis/domain/configuration/FileDigestCfg.java index 4b9905b63..8be421416 100644 --- a/src/main/java/com/nis/domain/configuration/FileDigestCfg.java +++ b/src/main/java/com/nis/domain/configuration/FileDigestCfg.java @@ -28,6 +28,7 @@ public class FileDigestCfg extends BaseCfg { */ private static final long serialVersionUID = 2796500715438264119L; private static final String tableName="file_digest_cfg"; + private String indexTable="file_digest_cfg"; @ExcelField(title="raw_len",sort=3) private Long rawLen; @ExcelField(title="digest",sort=2) @@ -82,5 +83,11 @@ public class FileDigestCfg extends BaseCfg { public void setNtcSubscribeIdCfgList(List ntcSubscribeIdCfgList) { this.ntcSubscribeIdCfgList = ntcSubscribeIdCfgList; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java b/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java index f8cb08dbd..aba76ae42 100644 --- a/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java +++ b/src/main/java/com/nis/domain/configuration/IpMultiplexPoolCfg.java @@ -17,6 +17,7 @@ public class IpMultiplexPoolCfg extends BaseCfg { * */ private static final long serialVersionUID = -5902468971425910528L; + private String indexTable="ip_multiplex_pool_cfg"; @Expose @SerializedName("cfgId") private Integer compileId; @@ -102,5 +103,11 @@ public class IpMultiplexPoolCfg extends BaseCfg { public void setGroupName(String groupName) { this.groupName = groupName; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/IpPortCfg.java b/src/main/java/com/nis/domain/configuration/IpPortCfg.java index 4dcfce294..1b5684027 100644 --- a/src/main/java/com/nis/domain/configuration/IpPortCfg.java +++ b/src/main/java/com/nis/domain/configuration/IpPortCfg.java @@ -17,6 +17,7 @@ package com.nis.domain.configuration; */ public class IpPortCfg extends BaseIpCfg { private static final String tableName="ip_port_cfg"; + private String indexTable="ip_port_cfg"; /** * @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么) * @@ -53,6 +54,12 @@ public class IpPortCfg extends BaseIpCfg { public static String getTablename() { return tableName; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/PxyObjKeyring.java b/src/main/java/com/nis/domain/configuration/PxyObjKeyring.java index 7ce57a738..cc43962f9 100644 --- a/src/main/java/com/nis/domain/configuration/PxyObjKeyring.java +++ b/src/main/java/com/nis/domain/configuration/PxyObjKeyring.java @@ -13,7 +13,7 @@ public class PxyObjKeyring extends BaseCfg { * */ private static final long serialVersionUID = -2720862431960415564L; - + private String indexTable="pxy_obj_keyring"; private String keyringType; private String privateKeyFile; private String publicKeyFile; @@ -84,6 +84,12 @@ public class PxyObjKeyring extends BaseCfg { public void setSubject(String subject) { this.subject = subject; } + public String getIndexTable() { + return indexTable; + } + public void setIndexTable(String indexTable) { + this.indexTable = indexTable; + } } diff --git a/src/main/java/com/nis/domain/configuration/template/ComplexStringAllTemplate.java b/src/main/java/com/nis/domain/configuration/template/ComplexStringAllTemplate.java index 4cde0b2b2..ef0ab7a96 100644 --- a/src/main/java/com/nis/domain/configuration/template/ComplexStringAllTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/ComplexStringAllTemplate.java @@ -18,7 +18,6 @@ public class ComplexStringAllTemplate { private String district; private String cfgKeywords; - private Integer exprType ; private Integer matchMethod ; private Integer isHex; private Integer isCaseInsenstive; @@ -44,13 +43,6 @@ public class ComplexStringAllTemplate { public void setCfgKeywords(String cfgKeywords) { this.cfgKeywords = cfgKeywords; } - @ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=13) - public Integer getExprType() { - return exprType; - } - public void setExprType(Integer exprType) { - this.exprType = exprType; - } @ExcelField(title="match_method",dictType="MATCH_METHOD",sort=14) public Integer getMatchMethod() { return matchMethod; diff --git a/src/main/java/com/nis/domain/configuration/template/StringAllTemplate.java b/src/main/java/com/nis/domain/configuration/template/StringAllTemplate.java index 67668bef6..46f8dbd21 100644 --- a/src/main/java/com/nis/domain/configuration/template/StringAllTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/StringAllTemplate.java @@ -17,7 +17,6 @@ public class StringAllTemplate { private String cfgDesc; private String cfgKeywords; - private Integer exprType ; private Integer matchMethod ; private Integer isHex; private Integer isCaseInsenstive; @@ -36,13 +35,6 @@ public class StringAllTemplate { public void setCfgKeywords(String cfgKeywords) { this.cfgKeywords = cfgKeywords; } - @ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=12) - public Integer getExprType() { - return exprType; - } - public void setExprType(Integer exprType) { - this.exprType = exprType; - } @ExcelField(title="match_method",dictType="MATCH_METHOD",sort=13) public Integer getMatchMethod() { return matchMethod; diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index 63365e51f..fcd86fde5 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -22,7 +22,7 @@ public final class Constants { * iP默认值 */ public static String IPV4_DEFAULT_IP_VALUE=Configurations.getStringProperty("ipv4_default_ip_value", "0.0.0.0"); - public static String IPV6_DEFAULT_IP_VALUE=Configurations.getStringProperty("ipv4_default_ip_value", "::"); + public static String IPV6_DEFAULT_IP_VALUE=Configurations.getStringProperty("ipv6_default_ip_value", "::"); public static String IPV4_DEFAULT_IP_SUBNET_VALUE=Configurations.getStringProperty("ipv4_default_ip_subnet_value", "0.0.0.0/32"); public static String IPV6_DEFAULT_IP_SUBNET_VALUE=Configurations.getStringProperty("ipv6_default_ip_subnet_value", "::/128"); public static String IPV4_DEFAULT_IP_RANGE_VALUE=Configurations.getStringProperty("ipv4_default_ip_range_value", "0.0.0.0-0.0.0.0"); diff --git a/src/main/java/com/nis/util/excel/ExportExcel.java b/src/main/java/com/nis/util/excel/ExportExcel.java index 4667a679e..df69418d1 100644 --- a/src/main/java/com/nis/util/excel/ExportExcel.java +++ b/src/main/java/com/nis/util/excel/ExportExcel.java @@ -174,10 +174,10 @@ public class ExportExcel { if(interceptReplaceZone !=null && interceptReplaceZone.size()>0){ for (SysDataDictionaryItem sysDataDictionaryItem : interceptReplaceZone) { if(StringUtil.isEmpty(msgProp.getProperty(sysDataDictionaryItem.getItemValue()))){ - commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+sysDataDictionaryItem.getItemValue()+"\n"; + commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+sysDataDictionaryItem.getItemValue()+")\n"; index++; }else{ - commentStr=commentStr+sysDataDictionaryItem.getItemCode()+":"+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+"\n"; + commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")\n"; index++; } } @@ -203,7 +203,7 @@ public class ExportExcel { commentStr=""; }else{ for (DnsResStrategy dnsResStrategy : resStrategys) { - commentStr=commentStr+dnsResStrategy.getCfgId()+":"+dnsResStrategy.getCfgDesc()+"\n"; + commentStr=commentStr+dnsResStrategy.getCfgId()+"("+dnsResStrategy.getCfgDesc()+")\n"; index++; } } @@ -239,11 +239,11 @@ public class ExportExcel { index++; } if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){ - commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range")+")"+"\n"; + commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip")+")"+"\n"; index++; } if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){ - commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet")+")"+"\n"; + commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")"+"\n"; index++; } } @@ -253,11 +253,11 @@ public class ExportExcel { index++; } if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){ - commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range")+")"+"\n"; + commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")"+"\n"; index++; } if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){ - commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet")+")"+"\n"; + commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")"+"\n\n"; index++; } } @@ -269,13 +269,10 @@ public class ExportExcel { headerStr=""; commentStr=""; }else{ - commentStr=msgProp.getProperty("example")+":\n"+commentStr; - index++; - /**TODO 规则: index++; - commentStr=msgProp.getProperty("example")+":\n"+commentStr; + commentStr=msgProp.getProperty("example_tip")+":\n"+commentStr; index++; 1、源ip和目的ip不能相等 index++; @@ -288,6 +285,37 @@ public class ExportExcel { 5、IPv6 Mask 掩码范围2-128 index++; */ + commentStr=msgProp.getProperty("example_tip")+":\n"+commentStr; + index++; + index++; + commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; + index++; + //1、源IP和目的IP不能相同 + commentStr=commentStr+"▶"+String.format(msgProp.getProperty("are_the_same") + , msgProp.getProperty("clientip") + ,msgProp.getProperty("serverip"))+"\n"; + index++; + index++; + //2、源IP和目的IP IP类型和IP格式必须一致 + commentStr=commentStr+"▶"+String.format(msgProp.getProperty("the_same_ip_type_pattern"))+"\n"; + index++; + index++; + //3、IP Range 开始IP和结束IP必须在同一网段 + commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_bit_field")+"\n"; + index++; + index++; + //4、IP Range 开始IP必须小于结束IP + commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_smaller")+"\n"; + index++; + index++; + //5、IPv4 Mask 掩码范围16-32 + commentStr=commentStr+"▶"+msgProp.getProperty("ipv4_subnet_tip")+","+msgProp.getProperty("ipv4_mask_range_tip")+"\n"; + index++; + index++; + //6、IPv6 Mask 掩码范围2-128 + commentStr=commentStr+"▶"+msgProp.getProperty("ipv6_subnet_tip")+","+msgProp.getProperty("ipv6_mask_range_tip")+"\n"; + index++; + index++; } } @@ -300,11 +328,11 @@ public class ExportExcel { index++; } if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){ - commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range")+")"+"\n"; + commentStr=commentStr+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv4_range_tip")+")"+"\n"; index++; } if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){ - commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_mask")+")"+"\n"; + commentStr=commentStr+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv4_subnet_tip")+")"+"\n"; index++; } } @@ -314,11 +342,11 @@ public class ExportExcel { index++; } if((","+region.getConfigIpPattern()+",").indexOf(",2,") > -1){ - commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range")+")"+"\n"; + commentStr=commentStr+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"("+msgProp.getProperty("ipv6_range_tip")+")"+"\n"; index++; } if((","+region.getConfigIpPattern()+",").indexOf(",1,") > -1){ - commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet")+")"+"\n"; + commentStr=commentStr+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"("+msgProp.getProperty("ipv6_subnet_tip")+")"+"\n\n"; index++; } } @@ -330,22 +358,37 @@ public class ExportExcel { headerStr=""; commentStr=""; }else{ - commentStr=msgProp.getProperty("example")+":\n"+commentStr; + commentStr=msgProp.getProperty("example_tip")+":\n"+commentStr; index++; - /**TODO - 规则: index++; - 1、源ip和目的ip不能相等 + commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; index++; - 2、源ip和目的ip格式必须一致 + //1、源IP和目的IP不能相同 + commentStr=commentStr+"▶"+String.format(msgProp.getProperty("are_the_same") + , msgProp.getProperty("clientip") + ,msgProp.getProperty("serverip"))+"\n"; index++; - 3、IPv4 Range 必须是C段IP index++; - 4、IPv4 Mask 掩码范围16-32 + //2、源IP和目的IP IP类型和IP格式必须一致 + commentStr=commentStr+"▶"+String.format(msgProp.getProperty("the_same_ip_type_pattern"))+"\n"; + index++; + index++; + //3、IP Range 开始IP和结束IP必须在同一网段 + commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_bit_field")+"\n"; + index++; + index++; + //4、IP Range 开始IP必须小于结束IP + commentStr=commentStr+"▶"+msgProp.getProperty("ip_range")+","+msgProp.getProperty("ip_range_smaller")+"\n"; + index++; + index++; + //5、IPv4 Mask 掩码范围16-32 + commentStr=commentStr+"▶"+msgProp.getProperty("ipv4_subnet_tip")+","+msgProp.getProperty("ipv4_mask_range_tip")+"\n"; + index++; + index++; + //6、IPv6 Mask 掩码范围2-128 + commentStr=commentStr+"▶"+msgProp.getProperty("ipv6_subnet_tip")+","+msgProp.getProperty("ipv6_mask_range_tip")+"\n"; index++; - 5、IPv6 Mask 掩码范围2-128 index++; - */ } } if("client_port".equals(headerStr)){ @@ -356,7 +399,7 @@ public class ExportExcel { index++; } if((","+region.getConfigPortPattern()+",").indexOf(",2,") > -1){ - commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_subnet")+")"+"\n"; + commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_mask")+")"+"\n\n"; index++; } }else{ @@ -367,20 +410,23 @@ public class ExportExcel { headerStr=""; commentStr=""; }else{ - commentStr=msgProp.getProperty("example")+":\n"+commentStr; + commentStr=msgProp.getProperty("example_tip")+":\n"+commentStr; index++; - /**TODO - 规则: index++; - 1、源端口和目的端口格式必须一致 + commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; index++; - 2、端口范围0-65535 + //1、源端口、目的端口格式必须一致 + commentStr=commentStr+"▶"+msgProp.getProperty("the_same_port_pattern")+"\n"; index++; - 3、端口掩码范围0-65535 index++; - 4、非TCP、UDP、ALL协议,端口必须为0 + //2、端口和端口掩码范围0-65535 + commentStr=commentStr+"▶"+msgProp.getProperty("port_mask_comment_tip")+"\n"; + index++; + index++; + //2、端口和端口掩码范围0-65535 + commentStr=commentStr+"▶"+msgProp.getProperty("protocol_and_port")+"\n"; + index++; index++; - */ } } if("server_port".equals(headerStr)){ @@ -391,25 +437,32 @@ public class ExportExcel { index++; } if((","+region.getConfigPortPattern()+",").indexOf(",2,") > -1){ - commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_subnet")+")"+"\n"; + commentStr=commentStr+Constants.PORT_MASK_DEFAULT+"(Port/"+msgProp.getProperty("port_mask")+")"+"\n\n"; index++; } }else{ headerStr=""; commentStr=""; } - /**TODO - 规则: - index++; - 1、源端口和目的端口格式必须一致 - index++; - 2、端口范围0-65535 - index++; - 3、端口掩码范围0-65535 - index++; - 4、非TCP、UDP、ALL协议,端口必须为0 - index++; - */ + if(StringUtil.isEmpty(commentStr)){ + headerStr=""; + commentStr=""; + }else{ + commentStr=msgProp.getProperty("example_tip")+":\n"+commentStr; + index++; + index++; + commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; + index++; + commentStr=commentStr+"▶"+msgProp.getProperty("the_same_port_pattern")+"\n"; + index++; + index++; + commentStr=commentStr+"▶"+msgProp.getProperty("port_mask_comment_tip")+"\n"; + index++; + index++; + commentStr=commentStr+"▶"+msgProp.getProperty("protocol_and_port")+"\n"; + index++; + index++; + } } } //导入的Protocol @@ -418,15 +471,20 @@ public class ExportExcel { commentStr=""; //ip block tcp if(service.getAction().equals(16) ){ - List protocol=DictUtils.getDictList("PROTOCOL"); + /** + *block 只有TCP不需要导入 + * */ + headerStr=""; + commentStr=""; + /*List protocol=DictUtils.getDictList("PROTOCOL"); if(protocol !=null && protocol.size()>0){ for (SysDataDictionaryItem sysDataDictionaryItem : protocol) { - if(sysDataDictionaryItem.getItemCode().equals(6)){ + if(sysDataDictionaryItem.getItemCode().equals("6")){ commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+sysDataDictionaryItem.getItemValue()+")"+"\n"; index++; } } - } + }*/ }else{ commentStr=""; List protocol=DictUtils.getDictList("PROTOCOL"); @@ -468,7 +526,8 @@ public class ExportExcel { } } } - if(StringUtil.isEmpty(commentStr)){ + if(StringUtil.isEmpty(commentStr) + ||(region.getConfigProtocol().split(",").length==1)){ headerStr=""; commentStr=""; }else{ @@ -479,7 +538,8 @@ public class ExportExcel { //Direction if("direction".equals(headerStr)){ - if(StringUtil.isEmpty(region.getConfigDirection())){ + if(StringUtil.isEmpty(region.getConfigDirection()) + ||(region.getConfigDirection().split(",").length==1)){ headerStr=""; commentStr=""; }else{ @@ -515,12 +575,16 @@ public class ExportExcel { }else if(region.getRegionType().equals(2) || region.getRegionType().equals(3)){ if(region.getRegionType().equals(3)){ if("district".equals(headerStr)){ - if(StringUtil.isEmpty(region.getConfigDistrict())){ + if(StringUtil.isEmpty(region.getConfigDistrict()) + ||(region.getConfigDistrict().split(",").length==1)){ headerStr=""; commentStr=""; }else{ - commentStr=region.getConfigDistrict(); - index++; + for (String districtStr : region.getConfigDistrict().split(",")) { + commentStr=commentStr+districtStr+"\n"; + index++; + } + } if(StringUtil.isEmpty(commentStr)){ headerStr=""; @@ -532,8 +596,39 @@ public class ExportExcel { } } //expr type + if("key_word".equals(headerStr)){ + if(!StringUtil.isEmpty(region.getConfigMultiKeywords())){ + if(region.getConfigMultiKeywords().equals(1)){//多关键字输入TODO + commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; + index++; + //允许输入多关键字,多个关键字用换行表示 + commentStr=commentStr+"▶"+msgProp.getProperty("multi_keywords_tip")+"\n"; + index++; + index++; + //单个关键字不允许输入不可见字符 + commentStr=commentStr+"▶"+msgProp.getProperty("visible_keyword_tip")+"\n"; + index++; + index++; + }else{ + commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; + index++; + index++; + //只允许输入单个关键字 + commentStr=commentStr+"▶"+msgProp.getProperty("single_keyword_tip")+"\n"; + index++; + index++; + //单个关键字不允许输入不可见字符 + commentStr=commentStr+"▶"+msgProp.getProperty("visible_keyword_tip")+"\n"; + index++; + } + + } + + } + //expr type if("expression_type".equals(headerStr)){ - if(StringUtil.isEmpty(region.getConfigExprType())){ + if(StringUtil.isEmpty(region.getConfigExprType()) + ||(region.getConfigExprType().split(",").length==1)){ headerStr=""; commentStr=""; }else{ @@ -562,7 +657,8 @@ public class ExportExcel { } //match method if("match_method".equals(headerStr)){ - if(StringUtil.isEmpty(region.getConfigMatchMethod())){ + if(StringUtil.isEmpty(region.getConfigMatchMethod()) + ||(region.getConfigMatchMethod().split(",").length==1)){ headerStr=""; commentStr=""; }else{ @@ -591,6 +687,7 @@ public class ExportExcel { } //ishex if("is_hex".equals(headerStr)){ + List list=new ArrayList(); if(StringUtil.isEmpty(region.getConfigHex())){ headerStr=""; commentStr=""; @@ -602,14 +699,22 @@ public class ExportExcel { for (SysDataDictionaryItem sysDataDictionaryItem : isHex) { if(sysDataDictionaryItem.getItemCode().equals("1")){ commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; + list.add(sysDataDictionaryItem.getItemCode()); index++; } + if(region.getConfigHex().split(",").length>1){ + if(sysDataDictionaryItem.getItemCode().equals("0")){ + commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; + list.add(sysDataDictionaryItem.getItemCode()); + index++; + } + } } - } - if(!((","+region.getConfigHex()+",").indexOf(",1,") >-1)){ + }else{ for (SysDataDictionaryItem sysDataDictionaryItem : isHex) { if(sysDataDictionaryItem.getItemCode().equals("0")){ commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; + list.add(sysDataDictionaryItem.getItemCode()); index++; } } @@ -617,7 +722,7 @@ public class ExportExcel { } } - if(StringUtil.isEmpty(commentStr)){ + if(StringUtil.isEmpty(commentStr) || (!StringUtil.isEmpty(list) && list.size()==1)){ headerStr=""; commentStr=""; }else{ @@ -626,6 +731,7 @@ public class ExportExcel { } } if("is_case_insenstive".equals(headerStr)){ + List list=new ArrayList(); if(StringUtil.isEmpty(region.getConfigHex())){ headerStr=""; commentStr=""; @@ -633,17 +739,22 @@ public class ExportExcel { commentStr=""; List isCaseSenstive=DictUtils.getDictList("CASE_INSENSTIVE"); if(isCaseSenstive !=null && isCaseSenstive.size()>0){ - if(((","+region.getConfigHex()+",").indexOf(",2,") >-1)){ + if(((","+region.getConfigHex()+",").indexOf(",0,") >-1)){ for (SysDataDictionaryItem sysDataDictionaryItem : isCaseSenstive) { - if(sysDataDictionaryItem.getItemCode().equals("1")){ + if(sysDataDictionaryItem.getItemCode().equals("0")){ commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; index++; } + if(region.getConfigHex().split(",").length>1){ + if(sysDataDictionaryItem.getItemCode().equals("1")){ + commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; + index++; + } + } } - } - if(!((","+region.getConfigHex()+",").indexOf(",2,") >-1)){ + }else{ for (SysDataDictionaryItem sysDataDictionaryItem : isCaseSenstive) { - if(sysDataDictionaryItem.getItemCode().equals("0")){ + if(sysDataDictionaryItem.getItemCode().equals("1")){ commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; index++; } @@ -652,7 +763,7 @@ public class ExportExcel { } } - if(StringUtil.isEmpty(commentStr)){ + if(StringUtil.isEmpty(commentStr) || (!StringUtil.isEmpty(list) && list.size()==1)){ headerStr=""; commentStr=""; }else{ diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index 758f467e7..ec21da70b 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -1097,8 +1097,16 @@ public class BaseController { if(serviceDict.getFunctionId().intValue()==5&&serviceDict.getAction().intValue()==64) { String userRegion1=baseIpCfg.getUserRegion1(); try { - Double ratelimt= Double.parseDouble(userRegion1); - if(ratelimt>0.009||ratelimt<0.001) { +// Double ratelimt= Double.parseDouble(userRegion1); + List ratelimtList=DictUtils.getDictList("RATE_LIMIT"); + boolean has=false; + for(SysDataDictionaryItem ratelimit:ratelimtList) { + if(ratelimit.getItemCode().equals(userRegion1)) { + has=true; + break; + } + } + if(!has) { errInfo.append(prop.getProperty("ratelimit")+"."+String.format(prop.getProperty("must_between"),0.001,0.009)+";"); } } catch (Exception e) { @@ -1142,7 +1150,7 @@ public class BaseController { } if (regionDict.getRegionType().equals(1)) { // 校验必填的IP,端口 - for (String code : configIpPortShow.split(",")) { + /*for (String code : configIpPortShow.split(",")) { if ("1".equals(code)) {// 源IP if (StringUtil.isEmpty(baseIpCfg.getSrcIpAddress())) { errInfo.append(String.format(prop.getProperty("can_not_null"), @@ -1164,48 +1172,58 @@ public class BaseController { prop.getProperty("server_port", "Server Port")) + ";"); } } - } + }*/ boolean srcIpEmpty = false; + boolean destIpEmpty = false; boolean srcPortEmpty = false; + boolean destPortEmpty = false; if (StringUtil.isEmpty(baseIpCfg.getSrcIpAddress())) { srcIpEmpty = true; } if (StringUtil.isEmpty(baseIpCfg.getDestIpAddress())) { - if (srcIpEmpty) {// 全部为空,填值 - if (canIPv4 && canIPFormat) { - baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_VALUE); - baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_VALUE); - baseIpCfg.setIpType(4); - baseIpCfg.setIpPattern(3); - } else if (canIPv6 && canIPFormat) { - baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_VALUE); - baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_VALUE); - baseIpCfg.setIpType(6); - baseIpCfg.setIpPattern(3); - } else if (canIPv4 && canIPSubnetFormat) { - baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE); - baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE); - baseIpCfg.setIpType(4); - baseIpCfg.setIpPattern(3); - } else if (canIPv6 && canIPSubnetFormat) { - baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE); - baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE); - baseIpCfg.setIpType(6); - baseIpCfg.setIpPattern(3); - } else if (canIPv4 && canIPRangeFormat) { - baseIpCfg.setSrcIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE); - baseIpCfg.setDestIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE); - baseIpCfg.setIpType(4); - baseIpCfg.setIpPattern(3); - } else if (canIPv6 && canIPRangeFormat) { - baseIpCfg.setSrcIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE); - baseIpCfg.setDestIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE); - baseIpCfg.setIpType(6); - baseIpCfg.setIpPattern(3); - } - - } else { - // 目的IP为空 + destIpEmpty = true; + } + if (StringUtil.isEmpty(baseIpCfg.getSrcPort())) { + srcPortEmpty = true; + } + if (StringUtil.isEmpty(baseIpCfg.getDestPort())) { + destPortEmpty = true; + } + if(srcIpEmpty&&destIpEmpty) { + if(configIpPortShow.indexOf("1")>-1&&configIpPortShow.indexOf("3")>-1) { + errInfo.append(String.format(prop.getProperty("can_not_null"), + prop.getProperty("client_ip", "Client IP")) + ";"); + }else if(configIpPortShow.indexOf("1")>-1) { + errInfo.append(String.format(prop.getProperty("can_not_null"), + prop.getProperty("client_ip", "Client IP")) + ";"); + }else if(configIpPortShow.indexOf("3")>-1) { + errInfo.append(String.format(prop.getProperty("can_not_null"), + prop.getProperty("server_ip", "Server IP")) + ";"); + } + }else if (destIpEmpty) {// 目的IP为空 + if(configIpPortShow.indexOf("3")>-1&&configIpPortShow.indexOf("1")==-1) {//目的IP必填 + errInfo.append(String.format(prop.getProperty("can_not_null"), + prop.getProperty("server_ip", "Server IP")) + ";"); + }else if(configIpPortShow.indexOf("1")>-1){ + /*if(Constants.IPV6_DEFAULT_IP_RANGE_VALUE.equals(baseIpCfg.getSrcIpAddress())) { + errInfo.append(prop.getProperty("client_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"'")+";"); + }else if(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.equals(baseIpCfg.getSrcIpAddress())) { + errInfo.append(prop.getProperty("client_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"'")+";"); + }else if(Constants.IPV6_DEFAULT_IP_VALUE.equals(baseIpCfg.getSrcIpAddress())) { + errInfo.append(prop.getProperty("client_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV6_DEFAULT_IP_VALUE+"'")+";"); + }else if(Constants.IPV4_DEFAULT_IP_RANGE_VALUE.equals(baseIpCfg.getSrcIpAddress())) { + errInfo.append(prop.getProperty("client_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"'")+";"); + }else if(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.equals(baseIpCfg.getSrcIpAddress())) { + errInfo.append(prop.getProperty("client_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"'")+";"); + }else if(Constants.IPV4_DEFAULT_IP_VALUE.equals(baseIpCfg.getSrcIpAddress())) { + errInfo.append(prop.getProperty("client_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV4_DEFAULT_IP_VALUE+"'")+";"); + }*/ String matchType = this.validIPAddress("client_ip", errInfo, baseIpCfg.getSrcIpAddress(), ipType, ipPattern); if (matchType.startsWith("IPV6")) { @@ -1215,8 +1233,8 @@ public class BaseController { baseIpCfg.setIpPattern(2); if (baseIpCfg.getSrcIpAddress() .startsWith(Constants.IPV6_DEFAULT_IP_RANGE_VALUE.split("-")[0])) { - errInfo.append(prop.getProperty("client_ip") + String.format("can_not_be", - 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()); @@ -1224,8 +1242,8 @@ public class BaseController { baseIpCfg.setIpPattern(1); if (baseIpCfg.getSrcIpAddress() .startsWith(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) { - errInfo.append(prop.getProperty("client_ip") + String.format("can_not_be", - 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()); @@ -1233,7 +1251,7 @@ public class BaseController { baseIpCfg.setIpPattern(3); if (baseIpCfg.getSrcIpAddress().equals(Constants.IPV6_DEFAULT_IP_VALUE)) { errInfo.append(prop.getProperty("client_ip") - + String.format("can_not_be", Constants.IPV6_DEFAULT_IP_VALUE)); + + String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)+";"); } } baseIpCfg.setIpType(6); @@ -1245,8 +1263,8 @@ public class BaseController { baseIpCfg.setIpPattern(2); if (baseIpCfg.getSrcIpAddress() .startsWith(Constants.IPV4_DEFAULT_IP_RANGE_VALUE.split("-")[0])) { - errInfo.append(prop.getProperty("client_ip") + String.format("can_not_be", - 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()); @@ -1254,8 +1272,8 @@ public class BaseController { baseIpCfg.setIpPattern(1); if (baseIpCfg.getSrcIpAddress() .startsWith(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) { - errInfo.append(prop.getProperty("client_ip") + String.format("can_not_be", - 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()); @@ -1263,14 +1281,37 @@ public class BaseController { baseIpCfg.setIpPattern(3); if (baseIpCfg.getSrcIpAddress().equals(Constants.IPV4_DEFAULT_IP_VALUE)) { errInfo.append(prop.getProperty("client_ip") - + String.format("can_not_be", Constants.IPV4_DEFAULT_IP_VALUE)); + + String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)+";"); } } baseIpCfg.setIpType(4); } } - } else { - if (srcIpEmpty) {// 源IP为空 + + } else if (srcIpEmpty) {// 源IP为空 + if(configIpPortShow.indexOf("1")>-1&&configIpPortShow.indexOf("3")==-1) {//源IP必填 + errInfo.append(String.format(prop.getProperty("can_not_null"), + prop.getProperty("client_ip", "Client IP")) + ";"); + }else if(configIpPortShow.indexOf("3")>-1){ + /*if(Constants.IPV6_DEFAULT_IP_RANGE_VALUE.equals(baseIpCfg.getDestIpAddress())) { + errInfo.append(prop.getProperty("server_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV6_DEFAULT_IP_RANGE_VALUE+"'")+";"); + }else if(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.equals(baseIpCfg.getDestIpAddress())) { + errInfo.append(prop.getProperty("server_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV6_DEFAULT_IP_SUBNET_VALUE+"'")+";"); + }else if(Constants.IPV6_DEFAULT_IP_VALUE.equals(baseIpCfg.getDestIpAddress())) { + errInfo.append(prop.getProperty("server_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV6_DEFAULT_IP_VALUE+"'")+";"); + }else if(Constants.IPV4_DEFAULT_IP_RANGE_VALUE.equals(baseIpCfg.getDestIpAddress())) { + errInfo.append(prop.getProperty("server_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV4_DEFAULT_IP_RANGE_VALUE+"'")+";"); + }else if(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.equals(baseIpCfg.getDestIpAddress())) { + errInfo.append(prop.getProperty("server_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV4_DEFAULT_IP_SUBNET_VALUE+"'")+";"); + }else if(Constants.IPV4_DEFAULT_IP_VALUE.equals(baseIpCfg.getDestIpAddress())) { + errInfo.append(prop.getProperty("server_ip") + String.format(prop.getProperty("can_not_be"), + "'"+Constants.IPV4_DEFAULT_IP_VALUE+"'")+";"); + }*/ String matchType = this.validIPAddress("server_ip", errInfo, baseIpCfg.getDestIpAddress(), ipType, ipPattern); if (matchType.startsWith("IPV6")) { @@ -1280,8 +1321,8 @@ public class BaseController { baseIpCfg.setIpPattern(2); if (baseIpCfg.getDestIpAddress() .startsWith(Constants.IPV6_DEFAULT_IP_RANGE_VALUE.split("-")[0])) { - errInfo.append(prop.getProperty("server_ip") + String.format("can_not_be", - 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()); @@ -1289,8 +1330,8 @@ public class BaseController { baseIpCfg.setIpPattern(1); if (baseIpCfg.getDestIpAddress() .startsWith(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) { - errInfo.append(prop.getProperty("server_ip") + String.format("can_not_be", - 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()); @@ -1298,7 +1339,7 @@ public class BaseController { baseIpCfg.setIpPattern(3); if (baseIpCfg.getDestIpAddress().equals(Constants.IPV6_DEFAULT_IP_VALUE)) { errInfo.append(prop.getProperty("server_ip") - + String.format("can_not_be", Constants.IPV6_DEFAULT_IP_VALUE)); + + String.format(prop.getProperty("can_not_be"), Constants.IPV6_DEFAULT_IP_VALUE)+";"); } } baseIpCfg.setIpType(6); @@ -1312,8 +1353,8 @@ public class BaseController { baseIpCfg.setIpPattern(2); if (baseIpCfg.getDestIpAddress() .startsWith(Constants.IPV4_DEFAULT_IP_RANGE_VALUE.split("-")[0])) { - errInfo.append(prop.getProperty("server_ip") + String.format("can_not_be", - 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()); @@ -1321,8 +1362,8 @@ public class BaseController { baseIpCfg.setIpPattern(1); if (baseIpCfg.getDestIpAddress() .startsWith(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE.split("/")[0])) { - errInfo.append(prop.getProperty("server_ip") + String.format("can_not_be", - 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()); @@ -1330,65 +1371,61 @@ public class BaseController { baseIpCfg.setIpPattern(3); if (baseIpCfg.getDestIpAddress().equals(Constants.IPV4_DEFAULT_IP_VALUE)) { errInfo.append(prop.getProperty("server_ip") - + String.format("can_not_be", Constants.IPV4_DEFAULT_IP_VALUE)); + + String.format(prop.getProperty("can_not_be"), Constants.IPV4_DEFAULT_IP_VALUE)+";"); } } baseIpCfg.setIpType(4); } + } + } else {//全不为空 + String matchType = this.validIPAddress("client_ip", errInfo, baseIpCfg.getSrcIpAddress(), + ipType, ipPattern); + String matchType1 = this.validIPAddress("server_ip", errInfo, baseIpCfg.getDestIpAddress(), + ipType, ipPattern); + if (StringUtils.isNotBlank(matchType)&&StringUtils.isNotBlank(matchType1)&& + !matchType.equals(matchType1)) { + errInfo.append(prop.get("the_same_ip_type_pattern") + ";"); + } + // baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress()); + // baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress()); + if (matchType.startsWith("IPV6")) { + baseIpCfg.setIpType(6); } else { - String matchType = this.validIPAddress("client_ip", errInfo, baseIpCfg.getSrcIpAddress(), - ipType, ipPattern); - String matchType1 = this.validIPAddress("server_ip", errInfo, baseIpCfg.getDestIpAddress(), - ipType, ipPattern); - if (StringUtils.isNotBlank(matchType)&&StringUtils.isNotBlank(matchType1)&& - !matchType.equals(matchType1)) { - errInfo.append(prop.get("the_same_ip_type_pattern") + ";"); + baseIpCfg.setIpType(4); + } + if (matchType.endsWith("RANGE")) { + if (matchType.startsWith("IPV4")) { + this.validIPv4Range("client_ip", errInfo, baseIpCfg.getSrcIpAddress()); + this.validIPv4Range("server_ip", errInfo, baseIpCfg.getDestIpAddress()); } - // baseIpCfg.setSrcIpAddress(baseIpCfg.getSrcIpAddress()); - // baseIpCfg.setDestIpAddress(baseIpCfg.getDestIpAddress()); - if (matchType.startsWith("IPV6")) { - baseIpCfg.setIpType(6); - } else { - baseIpCfg.setIpType(4); - } - if (matchType.endsWith("RANGE")) { - if (matchType.startsWith("IPV4")) { - this.validIPv4Range("client_ip", errInfo, baseIpCfg.getSrcIpAddress()); - this.validIPv4Range("server_ip", errInfo, baseIpCfg.getDestIpAddress()); - } - if (baseIpCfg.getSrcIpAddress().split("-")[0] - .equals(baseIpCfg.getDestIpAddress().split("-")[0])) { - 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")) { - if (baseIpCfg.getSrcIpAddress().split("/")[0] - .equals(baseIpCfg.getDestIpAddress().split("/")[0])) { - errInfo.append(String.format(prop.getProperty("are_the_same"), - baseIpCfg.getSrcIpAddress().split("/")[0], - baseIpCfg.getDestIpAddress().split("/")[0]) + ";"); - } - baseIpCfg.setIpPattern(1); - } else { - if (baseIpCfg.getSrcIpAddress().equals(baseIpCfg.getDestIpAddress())) { - errInfo.append(String.format(prop.getProperty("are_the_same"), - prop.getProperty("client_ip"), prop.getProperty("server_ip")) + ";"); - } - baseIpCfg.setIpPattern(3); + if (baseIpCfg.getSrcIpAddress().split("-")[0] + .equals(baseIpCfg.getDestIpAddress().split("-")[0])) { + 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")) { + if (baseIpCfg.getSrcIpAddress().split("/")[0] + .equals(baseIpCfg.getDestIpAddress().split("/")[0])) { + errInfo.append(String.format(prop.getProperty("are_the_same"), + baseIpCfg.getSrcIpAddress().split("/")[0], + baseIpCfg.getDestIpAddress().split("/")[0]) + ";"); + } + baseIpCfg.setIpPattern(1); + } else { + if (baseIpCfg.getSrcIpAddress().equals(baseIpCfg.getDestIpAddress())) { + errInfo.append(String.format(prop.getProperty("are_the_same"), + prop.getProperty("client_ip"), prop.getProperty("server_ip")) + ";"); + } + baseIpCfg.setIpPattern(3); } } // TODO 判断源IP和目的IP的值 // TODO 判断源IP和目的IP格式 - - if (StringUtil.isEmpty(baseIpCfg.getSrcPort())) { - srcPortEmpty = true; - } - if (StringUtil.isEmpty(baseIpCfg.getDestPort())) { + if (destPortEmpty) { if (srcPortEmpty) { baseIpCfg.setSrcPort("0"); baseIpCfg.setDestPort("0"); diff --git a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java index 351396a5e..03b161717 100644 --- a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java @@ -3,6 +3,8 @@ package com.nis.web.controller.basics; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.Date; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -15,7 +17,9 @@ import org.apache.zookeeper.ZooDefs.Ids; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.mvc.support.RedirectAttributes; @@ -24,6 +28,8 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.nis.domain.Page; import com.nis.domain.basics.ServiceDictInfo; +import com.nis.domain.configuration.RequestInfo; +import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigDictUtils; import com.nis.util.Configurations; import com.nis.util.StringUtil; @@ -46,6 +52,63 @@ public class ServiceDictInfoController extends BaseController { } + @RequestMapping(value="requestSelectInfo") + public String requestSelectInfo(Model model){ + List requestInfos=requestInfoService.getValidRequestInfo(); + model.addAttribute("requestInfos", requestInfos); + return "/basics/requestSelectInfo"; + } + @ResponseBody + @RequestMapping(value="requestCancleInfoAjax", method = RequestMethod.POST) + public String requestCancleInfoAjax(Integer cancelRequestId,String ids,String indexTable){ + if(!StringUtil.isEmpty(ids)){ + String[] idArray = ids.split(","); + for(String id :idArray){ + try { + serviceDictInfoService.auditCancleRequestInfo(cancelRequestId,indexTable,id); + } catch (Exception e) { + e.printStackTrace(); + logger.error("审核添加取消来函信息失败",e); + return "false"; + } + } + } + return "true"; + } + /** + * + * 根据id获取取消审核时的来函号信息 + * @param ids + * @param indexTable + * @return + */ + @ResponseBody + @RequestMapping(value="requestCancleInfoNumber") + public Map requestCancleInfoNumber(String ids,String indexTable){ + List list = new ArrayList(); + String requestTitle=""; + Map map=new HashMap(); + if(!StringUtil.isEmpty(ids)){ + String[] idArray = ids.split(","); +// for(String id :idArray){ + try { + Integer cancelRequestId= serviceDictInfoService.requestCancleInfoNumber(indexTable.trim(),Long.parseLong(ids)); + if(cancelRequestId!=null) { + requestTitle = requestInfoService.getRequestTitleById(cancelRequestId.longValue()); + if(StringUtils.isBlank(requestTitle)) { + return map; + } + } + } catch (Exception e) { + e.printStackTrace(); + logger.error("查询取消审核来函信息失败",e); + return map; + } +// } + } + map.put("requestTitle", requestTitle); + return map; + } /** * 查询业务辅助表-业务字典信息列表(无条件分页查询) diff --git a/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java b/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java index ad8b5c716..0b6d37b88 100644 --- a/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java +++ b/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java @@ -144,6 +144,8 @@ public class IpMultiplexController extends CommonController { @RequestMapping(value = {"/saveOrUpdateSnat"}) public String saveOrUpdateSnat(String cfgName,RedirectAttributes model, IpPortCfg cfg) { + // 设置生效区域信息 + groupAreaService.setAreaEffective(cfg); this._saveOrUpdateIp(cfgName,model, cfg); return "redirect:" + adminPath +"/manipulation/ipmulitiplex/snatPolicyList?functionId="+cfg.getFunctionId(); } @@ -191,6 +193,8 @@ public class IpMultiplexController extends CommonController { @RequestMapping(value = {"/saveOrUpdateDnat"}) public String saveOrUpdateDnat(String cfgName,RedirectAttributes model, IpPortCfg cfg) { + // 设置生效区域信息 + groupAreaService.setAreaCodeByGroupId(cfg); this._saveOrUpdateIp(cfgName,model, cfg); return "redirect:" + adminPath +"/manipulation/ipmulitiplex/dnatPolicyList?functionId="+cfg.getFunctionId(); } diff --git a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java index 1a2f9cc20..8e7e3ae07 100644 --- a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java +++ b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.java @@ -76,6 +76,9 @@ public interface ServiceDictInfoDao extends CrudDao { List findItemDict(@Param("itemType")int itemType,@Param("isValid")int isValid,@Param("isLeaf")Integer isLeaf); List findAllItemDictByItemType(@Param("itemType")int itemType,@Param("isLeaf")Integer isLeaf); + void auditCancleRequestInfo(@Param("cancelRequestId")Integer cancelRequestId, @Param("indexTable")String indexTable,@Param("id") String id); + Integer requestCancleInfoNumber(@Param("indexTable")String indexTable,@Param("id")Long id); + diff --git a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml index 356c031e8..5a656754d 100644 --- a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml @@ -306,9 +306,12 @@ LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id - - - + + UPDATE ${indexTable} SET cancel_request_id = #{cancelRequestId} WHERE cfg_id = #{id} + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.java b/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.java index 4ca9687a0..d82bdf849 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.java @@ -17,6 +17,6 @@ public interface IpMultiplexPoolCfgDao extends CrudDao { IpMultiplexPoolCfg getCfgInfo(IpMultiplexPoolCfg cfg); - String getIspByGroupId(Integer groupId); + List getIspByGroupId(Integer groupId); } \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml index af7114c62..49b47a412 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpMultiplexPoolCfgDao.xml @@ -328,13 +328,13 @@ - SELECT - area_effective_ids + FROM - ip_multiplex_pool_cfg + ip_multiplex_pool_cfg r WHERE - policy_group = #{groupId} AND is_valid != -1 + r.POLICY_GROUP = #{groupId} AND r.IS_VALID != -1 \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java index 4394f9dae..205854335 100644 --- a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java +++ b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.java @@ -24,6 +24,8 @@ public interface RequestInfoDao extends CrudDao { List showTask(TaskInfo taskInfo); void delete(@Param("id") Long id); + + String getRequestTitleById(@Param("id")Long id); } \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml index c08b6396b..875a2d6f4 100644 --- a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml @@ -217,4 +217,8 @@ from request_info + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java b/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java index 6c1e0c5fa..7605fdca9 100644 --- a/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java +++ b/src/main/java/com/nis/web/service/basics/ServiceDictInfoService.java @@ -300,6 +300,23 @@ public class ServiceDictInfoService extends BaseService{ public List findAllLableDict() { return serviceDictInfoDao.findAllItemDictByItemType(Constants.ITEM_TYPE_LABEL,null); } + + + /** + * + * 取消审核的时候增加取消来函 + * @param cancelRequestId + * @param indexTable + * @param id + */ + @Transactional(readOnly=false,rollbackFor=RuntimeException.class) + public void auditCancleRequestInfo(Integer cancelRequestId, String indexTable, String id) { + serviceDictInfoDao.auditCancleRequestInfo(cancelRequestId, indexTable, id); + } + public Integer requestCancleInfoNumber(String indexTable, Long id) { + Integer cancleRequestId = serviceDictInfoDao.requestCancleInfoNumber( indexTable, id); + return cancleRequestId; + } diff --git a/src/main/java/com/nis/web/service/configuration/GroupAreaService.java b/src/main/java/com/nis/web/service/configuration/GroupAreaService.java index 88f06d66e..7a2f2b00a 100644 --- a/src/main/java/com/nis/web/service/configuration/GroupAreaService.java +++ b/src/main/java/com/nis/web/service/configuration/GroupAreaService.java @@ -85,21 +85,49 @@ public class GroupAreaService extends BaseService{ return policyGroups; } - // SNAT策略 组织生效区域信息 + public void setAreaCodeByGroupId(IpPortCfg cfg){ + Integer areaCode = groupAreaDao.getAreaCodeByGroupId(cfg.getDnsStrategyId()); + cfg.setAreaEffectiveIds(areaCode+""); + } + + // snat策略 设置生效区域信息 public void setAreaEffective(IpPortCfg cfg) { String areaEffectiveIds = ""; if(cfg.getDnsStrategyId() != 0){// 已选择分组 - // 1.获取该分组的省份信息 - Integer areaCode = groupAreaDao.getAreaCodeByGroupId(cfg.getDnsStrategyId()); + // 1.设置省份信息 + this.setAreaCodeByGroupId(cfg); + areaEffectiveIds = cfg.getAreaEffectiveIds(); + // 2.获取该分组下的IP复用地址池配置的ISP IpMultiplexPoolCfgService poolCfgService = SpringContextHolder.getBean(IpMultiplexPoolCfgService.class); - String ispInfo = poolCfgService.getIspByGroupId(cfg.getDnsStrategyId()); - if(ispInfo.indexOf(":") != -1){ - ispInfo = ispInfo.substring(ispInfo.indexOf(":")); + List cfgsList = poolCfgService.getIspByGroupId(cfg.getDnsStrategyId()); + String newAreaEffectiveIds = ""; + List ispList = new ArrayList<>(); + if(cfgsList.size() != 0){ + for (IpMultiplexPoolCfg poolCfg : cfgsList) { + String areaIsp = poolCfg.getAreaEffectiveIds(); + if(areaIsp.contains(":")){ + areaIsp = areaIsp.substring(areaIsp.indexOf(":")+1); + } + ispList.add(areaIsp); + } } - areaEffectiveIds = areaCode + ispInfo; + // 3.组织格式 + if(ispList.size() != 0){ + for (int i = 0; i < ispList.size(); i++) { + if(i < ispList.size()-1){ + newAreaEffectiveIds += cfg.getAreaEffectiveIds()+":"+ispList.get(i)+","; + }else{ + newAreaEffectiveIds += cfg.getAreaEffectiveIds()+":"+ispList.get(i); + } + } + areaEffectiveIds = newAreaEffectiveIds; + } + }else{ + areaEffectiveIds = cfg.getAreaEffectiveIds(); } cfg.setAreaEffectiveIds(areaEffectiveIds); + } // IP复用地址池 设置省份信息 diff --git a/src/main/java/com/nis/web/service/configuration/IpMultiplexPoolCfgService.java b/src/main/java/com/nis/web/service/configuration/IpMultiplexPoolCfgService.java index 375551e5c..86e944886 100644 --- a/src/main/java/com/nis/web/service/configuration/IpMultiplexPoolCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpMultiplexPoolCfgService.java @@ -181,7 +181,7 @@ public class IpMultiplexPoolCfgService extends BaseService{ * @param groupId * @return */ - public String getIspByGroupId(Integer groupId){ + public List getIspByGroupId(Integer groupId){ return ipMultiplexStrategyDao.getIspByGroupId(groupId); }; } diff --git a/src/main/java/com/nis/web/service/configuration/RequestInfoService.java b/src/main/java/com/nis/web/service/configuration/RequestInfoService.java index 42279a193..c922de8f1 100644 --- a/src/main/java/com/nis/web/service/configuration/RequestInfoService.java +++ b/src/main/java/com/nis/web/service/configuration/RequestInfoService.java @@ -118,4 +118,9 @@ public class RequestInfoService extends BaseService{ public List showTask(TaskInfo taskInfo) { return taskInfoDao.findList(taskInfo); } + + public String getRequestTitleById(Long id) { + return requestInfoDao.getRequestTitleById(id); + + } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index d6c8ecace..18d233219 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1267,7 +1267,7 @@ alternative_values= Alternative values can be %s certificate_error=Wrong format of public key file and private key file public_file_error=Wrong format of public key file private_file_error=Wrong format of private key file -keyframe_pic_required=No keyframe pictures have been selected. +keyframe_pic_required=No keyframe pictures have been selected. ipv4_range_tip=IPv4 Range ipv4_subnet_tip=IPv4/Subnet Mask ipv6_range_tip=IPv6 Range @@ -1280,4 +1280,6 @@ multi_keywords_tip=Allow multiple keywords to be entered \n and multiple keyword visible_keyword_tip=Single keyword is not allowed to enter \n invisible characters. single_keyword_tip=Only single key input is allowed. ipv4_mask_range_tip=IP mask must between 16 and 32 -ipv6_mask_range_tip=IP Mask must between 2 and 128 \ No newline at end of file +ipv6_mask_range_tip=IP Mask must between 2 and 128 +letter_cancel_info=Cancel Letter Info +import_tip_excel=Please choose a valid Excel file with which it's subfix is .xls or .xlsx to import. diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index b0476c029..771a431c5 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1287,7 +1287,7 @@ alternative_values= Alternative values can be %s certificate_error=Wrong format of public key file and private key file public_file_error=Wrong format of public key file private_file_error=Wrong format of private key file -keyframe_pic_required=No keyframe pictures have been selected. +keyframe_pic_required=No keyframe pictures have been selected. ipv4_range_tip=IPv4 Range ipv4_subnet_tip=IPv4/Subnet Mask ipv6_range_tip=IPv6 Range @@ -1300,4 +1300,6 @@ multi_keywords_tip=Allow multiple keywords to be entered \n and multiple keyword visible_keyword_tip=Single keyword is not allowed to enter \n invisible characters. single_keyword_tip=Only single key input is allowed. ipv4_mask_range_tip=IP mask must between 16 and 32 -ipv6_mask_range_tip=IP Mask must between 2 and 128 \ No newline at end of file +ipv6_mask_range_tip=IP Mask must between 2 and 128 +letter_cancel_info=Cancel Letter Info +import_tip_excel=Please choose a valid Excel file with which it's subfix is .xls or .xlsx to import. diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 6a9191517..b0d674234 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1262,7 +1262,7 @@ certificate_error=\u516C\u94A5\u3001\u79C1\u94A5\u6587\u4EF6\u683C\u5F0F\u9519\u public_file_error=\u516C\u94A5\u6587\u4EF6\u683C\u5F0F\u9519\u8BEF keyframe_pic_required=\u5C1A\u672A\u9009\u62E9\u5173\u952E\u5E27\u56FE\u7247 private_file_error=\u79C1\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 ipv4_range_tip=IPv4 Range ipv4_subnet_tip=IPv4/Subnet Mask ipv6_range_tip=IPv6 Range @@ -1275,4 +1275,6 @@ multi_keywords_tip=Allow multiple keywords to be entered \n and multiple keyword visible_keyword_tip=Single keyword is not allowed to enter \n invisible characters. single_keyword_tip=Only single key input is allowed. ipv4_mask_range_tip=IP mask must between 16 and 32 -ipv6_mask_range_tip=IP Mask must between 2 and 128 \ No newline at end of file +ipv6_mask_range_tip=IP Mask must between 2 and 128 +letter_cancel_info=\u53D6\u6D88\u5BA1\u6838\u6765\u51FD +import_tip_excel=\u8BF7\u9009\u62E9\u6587\u4EF6\u7ED3\u5C3E\u4E3A.xls\u6216\u8005.xlsx\u7684\u6709\u6548Excel\u6587\u4EF6\u5BFC\u5165 diff --git a/src/main/resources/sql/20181022/add_dictionary.sql b/src/main/resources/sql/20181022/add_dictionary.sql new file mode 100644 index 000000000..80055ef5e --- /dev/null +++ b/src/main/resources/sql/20181022/add_dictionary.sql @@ -0,0 +1,11 @@ +#取消审核时增加来函信息 数据库增加字段 +ALTER TABLE dns_ip_cfg ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE dns_res_strategy ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE ip_port_cfg ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE ddos_ip_cfg ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE av_file_sample_cfg ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE cfg_index_info ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE app_policy_cfg ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE pxy_obj_keyring ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE file_digest_cfg ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; +ALTER TABLE ip_multiplex_pool_cfg ADD cancel_request_id int(11) DEFAULT NULL COMMENT '取消审核来函'; \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/include/excel/importModal.jsp b/src/main/webapp/WEB-INF/include/excel/importModal.jsp index 8ebaa3c89..2b3fe6593 100644 --- a/src/main/webapp/WEB-INF/include/excel/importModal.jsp +++ b/src/main/webapp/WEB-INF/include/excel/importModal.jsp @@ -4,7 +4,7 @@