(1)修复回调类IP转换提示不能为range的bug
(2)DDOS IP模板提交 (3)DDOS IP导入提交 (4)修复DDOS IP REGION CONFIG_IP_PORT_SHOW的值为3,4
This commit is contained in:
@@ -57,6 +57,7 @@ import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.StringCfgTemplate;
|
||||
import com.nis.domain.configuration.template.AsnIpTemplate;
|
||||
import com.nis.domain.configuration.template.ComplexStringAllTemplate;
|
||||
import com.nis.domain.configuration.template.DdosIpTemplate;
|
||||
import com.nis.domain.configuration.template.DnsComplexStringTemplate;
|
||||
import com.nis.domain.configuration.template.IpAllTemplate;
|
||||
import com.nis.domain.configuration.template.IpCfgTemplate;
|
||||
@@ -1423,6 +1424,7 @@ public class BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
//p2p ip
|
||||
if (regionDict.getFunctionId().equals(510) && "p2p_ip".equals(regionDict.getConfigServiceType())) { // P2p
|
||||
// IP
|
||||
String userRegion1 = baseIpCfg.getUserRegion1();
|
||||
@@ -1469,6 +1471,36 @@ public class BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (regionDict.getFunctionId().equals(301)) {
|
||||
String antiddosProtocol=baseIpCfg.getAntiddosProtocol();
|
||||
Long bpsThreadshold= baseIpCfg.getBpsThreadshold();
|
||||
Long ppsThreadshold= baseIpCfg.getPpsThreadshold();
|
||||
if(StringUtils.isNotBlank(antiddosProtocol)) {
|
||||
List<SysDataDictionaryItem> antiddosProtocolDicts=DictUtils.getDictList("ANTIDDOS_PROTOCOL");
|
||||
boolean has=false;
|
||||
for(SysDataDictionaryItem ditc:antiddosProtocolDicts) {
|
||||
if(ditc.getItemCode().equals(antiddosProtocol)) {
|
||||
has=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!has) {
|
||||
errInfo.append(
|
||||
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"))
|
||||
+ ";");
|
||||
}
|
||||
if(ppsThreadshold==null) {
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("can_not_null"), prop.getProperty("pps_threadshold"))
|
||||
+ ";");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (regionDict.getRegionType().equals(1)) {
|
||||
// 校验必填的IP,端口
|
||||
/*
|
||||
@@ -3167,6 +3199,9 @@ public class BaseController {
|
||||
} else if (regionDict.getFunctionId().equals(600)) {// ANS IP
|
||||
List<AsnIpTemplate> list = ei.getDataList(AsnIpTemplate.class, this.getMsgProp(),regionDict);
|
||||
ipPortCfgs = this.checkIpCfg(serviceDict, regionDict, list);
|
||||
} else if (regionDict.getFunctionId().equals(301)) {// ANS IP
|
||||
List<DdosIpTemplate> list = ei.getDataList(DdosIpTemplate.class, this.getMsgProp(),regionDict);
|
||||
ipPortCfgs = this.checkIpCfg(serviceDict, regionDict, list);
|
||||
} else {
|
||||
List<IpAllTemplate> list = ei.getDataList(IpAllTemplate.class, this.getMsgProp(),regionDict);
|
||||
ipPortCfgs = this.checkIpCfg(serviceDict, regionDict, list);
|
||||
@@ -3297,7 +3332,12 @@ public class BaseController {
|
||||
}
|
||||
|
||||
if(ipPortCfgs!=null&&ipPortCfgs.size()>0) {
|
||||
ipCfgService.saveBatch(ipPortCfgs, IpCfgDao.class);
|
||||
if (regionDict.getFunctionId().equals(301)) {
|
||||
ddosCfgService.saveDdosIpCfg(ipPortCfgs);
|
||||
}else {
|
||||
ipCfgService.saveBatch(ipPortCfgs, IpCfgDao.class);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user