(1)导入模板生成取消将function_region_dict中字段只只有一个的时候,方向,协议,大小写敏感等字段隐藏
(2)ip导入方向协议导入时填入默认值
This commit is contained in:
@@ -609,6 +609,17 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
}
|
||||
}
|
||||
// TODO 判断Protocol的值
|
||||
if(baseIpCfg.getProtocol()==null) {
|
||||
if(protocol.indexOf("0")>-1) {
|
||||
baseIpCfg.setProtocol(0);
|
||||
}else if(protocol.indexOf("6")>-1) {
|
||||
baseIpCfg.setProtocol(6);
|
||||
}else if(protocol.indexOf("17")>-1) {
|
||||
baseIpCfg.setProtocol(17);
|
||||
}else if(StringUtils.isNotBlank(protocol)) {
|
||||
baseIpCfg.setProtocol(Integer.parseInt(protocol.split(",")[0]));
|
||||
}
|
||||
}
|
||||
boolean validProtocol = this.validProtocol(errInfo, baseIpCfg.getProtocol(), protocol);
|
||||
// 验证protocol与port是否符合逻辑
|
||||
if (validProtocol && validPort) {
|
||||
@@ -624,7 +635,13 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
} else {
|
||||
baseIpCfg.setDirection(baseIpCfg.getDirection());
|
||||
}
|
||||
|
||||
if(baseIpCfg.getDirection()==null) {
|
||||
if(direction.indexOf("0")>-1) {
|
||||
baseIpCfg.setDirection(0);
|
||||
}else if(StringUtils.isNotBlank(direction)) {
|
||||
baseIpCfg.setDirection(Integer.parseInt(direction.split(",")[0]));
|
||||
}
|
||||
}
|
||||
// TODO 判断Direction的值
|
||||
this.validDirection(errInfo, baseIpCfg.getDirection(), direction);
|
||||
}
|
||||
@@ -706,10 +723,10 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
*/
|
||||
public boolean validProtocol(StringBuffer errInfo, Integer protocol, String protocolPattern)
|
||||
throws ServiceException {
|
||||
if (protocol == null) {
|
||||
/*if (protocol == null) {
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("protocol")) + ";");
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
boolean has = false;
|
||||
for (String p : protocolPattern.split(",")) {
|
||||
if (p.equals(protocol.toString())) {
|
||||
|
||||
Reference in New Issue
Block a user