diff --git a/src/main/java/com/nis/util/excel/ExportExcel.java b/src/main/java/com/nis/util/excel/ExportExcel.java index 932c07abd..b42ab7a7a 100644 --- a/src/main/java/com/nis/util/excel/ExportExcel.java +++ b/src/main/java/com/nis/util/excel/ExportExcel.java @@ -143,6 +143,16 @@ public class ExportExcel { String defaultValue=""; int index=0; String[] titleInfo=new String[3]; + + // Rule Name + if("config_describe".equals(headerStr)) { + commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; + index++; + //1、非空 + commentStr=commentStr+"▶"+msgProp.getProperty("required")+"\n"; + index++; + } + //p2p_hash_type if("p2p_hash_type".equals(headerStr)){ commentStr=""; @@ -403,13 +413,17 @@ public class ExportExcel { if("bps_threadshold".equals(headerStr)){ commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; index++; - commentStr=commentStr+msgProp.getProperty("input_integer")+"\n"; + commentStr=commentStr+"▶"+msgProp.getProperty("input_integer")+"\n"; + index++; + commentStr=commentStr+"▶"+msgProp.getProperty("min_value")+"1000000\n"; index++; } if("pps_threadshold".equals(headerStr)){ commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; index++; - commentStr=commentStr+msgProp.getProperty("input_integer")+"\n"; + commentStr=commentStr+"▶"+msgProp.getProperty("input_integer")+"\n"; + index++; + commentStr=commentStr+"▶"+msgProp.getProperty("min_value")+"1000\n"; index++; } if("group".equals(headerStr)) { @@ -1099,6 +1113,7 @@ public class ExportExcel { if(StringUtil.isEmpty(defaultValue)){ defaultValue="0"; } + defaultValue = region.getFunctionId().equals(301)?"1":defaultValue; } /*}*/ /*if(StringUtil.isEmpty(commentStr)){ diff --git a/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java b/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java index d8c7ce563..83def261f 100644 --- a/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java +++ b/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java @@ -378,16 +378,31 @@ public class CheckIpFormatThread implements Callable{ String.format(prop.getProperty("is_incorrect"), prop.getProperty("antiddos_protocol")) + ";"); } + if(bpsThreadshold==null) { errInfo.append( String.format(prop.getProperty("can_not_null"), prop.getProperty("bps_threadshold")) + ";"); + }else { + if(bpsThreadshold < 1000000) { + errInfo.append(prop.getProperty("bps_threadshold")+prop.getProperty("min_value")+"1000000;"); + }else if(String.valueOf(bpsThreadshold).length() > 18) { + errInfo.append(prop.getProperty("bps_threadshold")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":18") + ";"); + } } + if(ppsThreadshold==null) { errInfo.append( String.format(prop.getProperty("can_not_null"), prop.getProperty("pps_threadshold")) + ";"); + }else { + if(ppsThreadshold < 1000) { + errInfo.append(prop.getProperty("pps_threadshold")+prop.getProperty("min_value")+"1000;"); + }else if(String.valueOf(ppsThreadshold).length() > 18) { + errInfo.append(prop.getProperty("pps_threadshold")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":18") + ";"); + } } + if("TCP_SYN".equals(antiddosProtocol)) { baseIpCfg.setProtocol(6); }else if("UDP_NTP".equals(antiddosProtocol)) {