修改ddos审核问题
This commit is contained in:
@@ -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<DdosIpCfg> 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);
|
||||
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="bps_threadshold"/></label>
|
||||
<div class="col-md-6">
|
||||
<input id="bpsThreadshold" class="form-control digits" maxlength="18" type="text" name="bpsThreadshold" value="${_cfg.bpsThreadshold}">
|
||||
<input id="bpsThreadshold" class="form-control digits" placeholder="Bit Per Second" maxlength="18" type="text" name="bpsThreadshold" value="${_cfg.bpsThreadshold}">
|
||||
</div>
|
||||
<div for="bpsThreadshold"></div>
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="pps_threadshold"/></label>
|
||||
<div class="col-md-6">
|
||||
<input id="ppsThreadshold" class="form-control digits" maxlength="18" type="text" name="ppsThreadshold" value="${_cfg.ppsThreadshold}">
|
||||
<input id="ppsThreadshold" class="form-control digits" placeholder="Packet Per Second" maxlength="18" type="text" name="ppsThreadshold" value="${_cfg.ppsThreadshold}">
|
||||
</div>
|
||||
<div for="ppsThreadshold"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user