配置导入增加配置描述、关键字长度限制;部分报表导出文件名修改

This commit is contained in:
zhangwenqing
2018-12-27 17:28:44 +08:00
parent 1948fd6763
commit 09705aca19
7 changed files with 62 additions and 5 deletions

View File

@@ -90,6 +90,14 @@ public class CheckComplexStringFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
ComplexkeywordCfg baseStringCfg = new ComplexkeywordCfg();
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)) {
if (regionDict.getFunctionId().equals(7)) {
Long dnsStrategyId = baseStringCfg.getDnsStrategyId();

View File

@@ -103,6 +103,11 @@ public class CheckIpFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
IpPortCfg baseIpCfg = new IpPortCfg();
BeanUtils.copyProperties(list.get(i), baseIpCfg);
// 配置描述长度限制
if(baseIpCfg.getCfgDesc().length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
// 特殊字段验证
// packet ip ratelimit
if (serviceDict!=null&&serviceDict.getFunctionId().intValue() == 5 && serviceDict.getAction().intValue() == 64) {

View File

@@ -88,6 +88,14 @@ public class CheckStringFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
BaseStringCfg baseStringCfg = new BaseStringCfg();
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(2)) {
if (regionDict.getFunctionId().equals(510) && "p2p_hash".equals(regionDict.getConfigServiceType())) {
String userRegion1 = baseStringCfg.getUserRegion1();