app payload导入L3_header特征配置时增加固定属性值;相关属性校验修改;导入模板批注修改
This commit is contained in:
@@ -133,5 +133,23 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
public void setNumCfgList(List<AppTcpCfg> numCfgList) {
|
||||
this.numCfgList = numCfgList;
|
||||
}
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
public Integer getIsHexbin() {
|
||||
return isHexbin;
|
||||
}
|
||||
public void setIsHexbin(Integer isHexbin) {
|
||||
this.isHexbin = isHexbin;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1038,7 +1038,12 @@ public class ExportExcel {
|
||||
}
|
||||
// APP Payload
|
||||
if(region.getFunctionId().equals(563)) {
|
||||
commentStr=commentStr+"▶"+"L3_header:"+msgProp.getProperty("need_input")+"'headerType'"+"\n";
|
||||
commentStr=commentStr+"▶"+"L3_header:"+msgProp.getProperty("need_input")+"'headerType', "+
|
||||
msgProp.getProperty("no_need_input")+"'"+
|
||||
msgProp.getProperty("key_word")+"'、'"+
|
||||
msgProp.getProperty("match_method")+"'、'"+
|
||||
msgProp.getProperty("is_hex")+"'、'"+
|
||||
msgProp.getProperty("is_case_insenstive")+"'"+"\n";
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,41 +92,23 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
||||
StringBuffer errInfo = new StringBuffer();
|
||||
AppComplexFeatureCfg baseStringCfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(list.get(i), baseStringCfg);
|
||||
// 配置描述、关键字长度限制
|
||||
// 配置描述长度限制
|
||||
if(baseStringCfg.getCfgDesc().length() > 128) {
|
||||
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
|
||||
}
|
||||
if(baseStringCfg.getCfgKeywords().length() < 4 || baseStringCfg.getCfgKeywords().length() > 1024){
|
||||
errInfo.append(prop.getProperty("key_word")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("min_length")+":4,"+prop.getProperty("max_length")+":1024") + ";");
|
||||
}
|
||||
|
||||
if (regionDict.getRegionType().equals(3)) {
|
||||
String keyword = baseStringCfg.getCfgKeywords();
|
||||
String district = baseStringCfg.getDistrict();
|
||||
if(!district.equals("L3_header")) {// district="L3_header"时 不校验keyword
|
||||
|
||||
if (StringUtils.isBlank(keyword)) {
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("can_not_null"), prop.getProperty("key_word") + " ") + ";");
|
||||
}else if(keyword.length() < 4 || keyword.length() > 1024){// 关键字长度限制
|
||||
errInfo.append(prop.getProperty("key_word")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("min_length")+":4,"+prop.getProperty("max_length")+":1024") + ";");
|
||||
}
|
||||
if (StringUtils.isNotBlank(dirtrictP)) {
|
||||
if (StringUtils.isBlank(district)) {
|
||||
if (dirtrictP.indexOf(",") == -1) {
|
||||
baseStringCfg.setDistrict(dirtrictP);
|
||||
} else {
|
||||
// baseStringCfg.setDistrict(dirtrictP.split(",")[0]);
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("can_not_null"), prop.getProperty("district") + " ")
|
||||
+ ";");
|
||||
}
|
||||
} else if (dirtrictP.indexOf(district) == -1) {
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("is_incorrect"), prop.getProperty("district") + " ")
|
||||
+ ";");
|
||||
} else if (dirtrictP.indexOf("others")>-1&&district.equals("others")) {
|
||||
//不允许自定义匹配区域导入
|
||||
errInfo.append(prop.getProperty("district")+" "+
|
||||
String.format(prop.getProperty("can_not_be"), " 'others'")+ ";");
|
||||
}
|
||||
}
|
||||
|
||||
if (mulityKeywordsP.equals("0")) {
|
||||
if (keyword.indexOf("\n") > -1) {
|
||||
errInfo.append(
|
||||
@@ -165,6 +147,30 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(dirtrictP)) {
|
||||
if (StringUtils.isBlank(district)) {
|
||||
if (dirtrictP.indexOf(",") == -1) {
|
||||
baseStringCfg.setDistrict(dirtrictP);
|
||||
} else {
|
||||
// baseStringCfg.setDistrict(dirtrictP.split(",")[0]);
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("can_not_null"), prop.getProperty("district") + " ")
|
||||
+ ";");
|
||||
}
|
||||
} else if (dirtrictP.indexOf(district) == -1) {
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("is_incorrect"), prop.getProperty("district") + " ")
|
||||
+ ";");
|
||||
} else if (dirtrictP.indexOf("others")>-1&&district.equals("others")) {
|
||||
//不允许自定义匹配区域导入
|
||||
errInfo.append(prop.getProperty("district")+" "+
|
||||
String.format(prop.getProperty("can_not_be"), " 'others'")+ ";");
|
||||
}
|
||||
}
|
||||
|
||||
if(!district.equals("L3_header")) {// district="L3_header"时 不校验exprType、matchMethod、isHex、isCaseInsenstive,为固定值
|
||||
Integer exprType = baseStringCfg.getExprType();
|
||||
boolean has = false;
|
||||
if (exprType == null) {
|
||||
@@ -305,7 +311,7 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
||||
errInfo.append(prop.getProperty("hex_case_insensitive")+ ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// APP Payload L3_HEADER的特殊属性限制
|
||||
if(baseStringCfg.getDistrict().equals("L3_header")) {
|
||||
String headerType = baseStringCfg.getHeaderType();
|
||||
@@ -318,7 +324,13 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
||||
}else{
|
||||
appMultiFeatureCfgService.checkImportAppPayload(baseStringCfg, errInfo, prop);
|
||||
}
|
||||
if (errInfo.toString().length() == 0) {
|
||||
appMultiFeatureCfgService.setL3HeaderKeyword(baseStringCfg);
|
||||
}
|
||||
baseStringCfg.setIsHexbin(1);
|
||||
baseStringCfg.setIsCaseInsenstive(0);
|
||||
baseStringCfg.setExprType(3);
|
||||
baseStringCfg.setMatchMethod(0);
|
||||
}else {
|
||||
baseStringCfg.setHeaderType(null);
|
||||
baseStringCfg.setVer(null);
|
||||
|
||||
@@ -2048,6 +2048,11 @@ public class BaseController {
|
||||
appfeature.setCfgRegionValue(regionDict.getConfigRegionValue());
|
||||
appfeature.setCfgRegionType(String.valueOf(regionDict.getRegionType()));
|
||||
}
|
||||
if(cfg.getDistrict().equals("L3_header")) {
|
||||
appfeature.setIsHexbin(1);
|
||||
appfeature.setExprType(3);
|
||||
appfeature.setMatchMethod(0);
|
||||
}
|
||||
appFeatureIndexs.add(appfeature);
|
||||
|
||||
ind++;
|
||||
|
||||
@@ -1445,3 +1445,4 @@ hex_minlength_8=Please enter a hexadecimal string of length 8
|
||||
hex_minlength_16=Please enter a hexadecimal string of length 16
|
||||
need_input=Attributes need to be filled in
|
||||
max_input=Fill in at most four
|
||||
no_need_input=Attributes no need to be filled in
|
||||
@@ -1449,3 +1449,4 @@ hex_minlength_8=Please enter a hexadecimal string of length 8
|
||||
hex_minlength_16=Please enter a hexadecimal string of length 16
|
||||
need_input=Attributes need to be filled in
|
||||
max_input=Fill in at most four
|
||||
no_need_input=Attributes no need to be filled in
|
||||
@@ -1445,3 +1445,4 @@ hex_minlength_8=\u8BF7\u8F93\u5165\u957F\u5EA6\u4E3A8\u7684\u5341\u516D\u8FDB\u5
|
||||
hex_minlength_16=\u8BF7\u8F93\u5165\u957F\u5EA6\u4E3A16\u7684\u5341\u516D\u8FDB\u5236\u5B57\u7B26\u4E32
|
||||
need_input=\u9700\u8981\u586B\u5199\u5C5E\u6027
|
||||
max_input=\u6700\u591A\u586B\u5199\u56DB\u4E2A
|
||||
no_need_input=\u65E0\u9700\u586B\u5199\u5C5E\u6027
|
||||
Reference in New Issue
Block a user