diff --git a/src/main/java/com/nis/web/service/configuration/DdosCfgService.java b/src/main/java/com/nis/web/service/configuration/DdosCfgService.java index 9f528efa4..7ba835604 100644 --- a/src/main/java/com/nis/web/service/configuration/DdosCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/DdosCfgService.java @@ -18,6 +18,7 @@ import com.nis.domain.configuration.DdosIpCfg; import com.nis.domain.maat.ToMaatResult; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; +import com.nis.util.StringUtil; import com.nis.web.dao.configuration.DdosCfgDao; import com.nis.web.security.UserUtils; import com.nis.web.service.BaseService; @@ -51,6 +52,18 @@ public class DdosCfgService extends BaseService{ Date createTime=new Date(); //设置区域运营商信息 setAreaEffectiveIds(entity); + String antiddosProtocol = entity.getAntiddosProtocol(); + Long bpsThreadshold = entity.getBpsThreadshold(); + Long ppsThreadshold = entity.getPpsThreadshold(); + if(StringUtil.isBlank(antiddosProtocol)) { + entity.setAntiddosProtocol(""); + } + if(bpsThreadshold==null) { + entity.setBpsThreadshold(0l); + } + if(ppsThreadshold==null) { + entity.setPpsThreadshold(0l); + } //新增 if(entity.getCfgId()==null){ entity.setCreatorId(UserUtils.getUser().getId()); @@ -80,6 +93,7 @@ public class DdosCfgService extends BaseService{ entity.setIsAudit(0); entity.setEditorId(UserUtils.getUser().getId()); entity.setEditTime(editTime); + ddosCfgDao.update(entity); } } @@ -115,6 +129,7 @@ public class DdosCfgService extends BaseService{ public void audit(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){ DdosIpCfg entity = new DdosIpCfg(); + entity=ddosCfgDao.getDdosIpCfg(Long.valueOf(id)); List list = new ArrayList(); entity.setCfgId(Long.valueOf(id)); @@ -125,11 +140,19 @@ public class DdosCfgService extends BaseService{ ddosCfgDao.update(entity); - entity=ddosCfgDao.getDdosIpCfg(Long.valueOf(id)); String antiddosProtocol = entity.getAntiddosProtocol(); Long bpsThreadshold = entity.getBpsThreadshold(); Long ppsThreadshold = entity.getPpsThreadshold(); Map map= new HashMap(); + if(StringUtil.isBlank(antiddosProtocol)) { + antiddosProtocol=""; + } + if(bpsThreadshold==null) { + bpsThreadshold=0l; + } + if(ppsThreadshold==null) { + ppsThreadshold=0l; + } map.put("protocol", antiddosProtocol); map.put("bps_threadshold", bpsThreadshold); map.put("pps_threadshold", ppsThreadshold); diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 136fe5f85..42577a0e0 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1253,6 +1253,6 @@ root_certificate=der cer crt pem intermediate_entity_certificate=p12 private_certificate=pem key p12 antiddos_protocol=DDOS Protocol -bps_threadshold=Traffic Threshold Bit/S -pps_threadshold=Traffic Threshold Pkt/S +bps_threadshold=Traffic Threshold(bps) +pps_threadshold=Traffic Threshold(pps) one_more_greater_zero=At Least One Threshold Is Not 0. \ No newline at end of file diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 882570846..efce31b79 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1273,6 +1273,6 @@ root_certificate=der cer crt pem intermediate_entity_certificate=p12 private_certificate=pem key p12 antiddos_protocol=DDOS Protocol -bps_threadshold=Traffic Threshold Bit/S -pps_threadshold=Traffic Threshold Pkt/S +bps_threadshold=Traffic Threshold(bps) +pps_threadshold=Traffic Threshold(pps) one_more_greater_zero=At Least One Threshold Is Not 0. \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 3809c82a9..91cbe569b 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1247,6 +1247,6 @@ root_certificate=der cer crt pem intermediate_entity_certificate=p12 private_certificate=pem key p12 antiddos_protocol=DDOS\u534F\u8BAE -bps_threadshold=\u6D41\u91CF\u9608\u503C\u5B57\u8282\u6570 Bit/S -pps_threadshold=\u6D41\u91CF\u9608\u503C\u5305\u6570 Pkt/S +bps_threadshold=\u6D41\u91CF\u9608\u503C(bps) +pps_threadshold=\u6D41\u91CF\u9608\u503C(pps) one_more_greater_zero=\u6D41\u91CF\u9608\u503C\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A 0 \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/include/form/dDosIpInfo.jsp b/src/main/webapp/WEB-INF/include/form/dDosIpInfo.jsp index 01c0adc45..77bb4eae4 100644 --- a/src/main/webapp/WEB-INF/include/form/dDosIpInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/dDosIpInfo.jsp @@ -22,7 +22,7 @@
- +
@@ -34,7 +34,7 @@
- +