修改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);
|
||||
|
||||
Reference in New Issue
Block a user