Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop
This commit is contained in:
@@ -3,12 +3,15 @@ package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.configuration.DdosIpCfg;
|
||||
@@ -123,11 +126,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();
|
||||
map.put("protocol", antiddosProtocol);
|
||||
map.put("bps_threadshold", bpsThreadshold);
|
||||
map.put("pps_threadshold", ppsThreadshold);
|
||||
|
||||
String json="";
|
||||
if(entity.getIsAudit()==1){
|
||||
List<InlineIp> ipList=new ArrayList<InlineIp>();
|
||||
InlineIp resStrategy=convertCallBackIp(entity,null);
|
||||
resStrategy.setUserRegion(new Gson().toJson(map));
|
||||
ipList.add(resStrategy);
|
||||
//调用服务接口下发配置数据
|
||||
json=gsonToJson(ipList);
|
||||
@@ -145,6 +156,7 @@ public class DdosCfgService extends BaseService{
|
||||
}else if(entity.getIsAudit()==3){
|
||||
List<InlineIp> resStrategyList=new ArrayList<>();
|
||||
InlineIp resStrategy=convertCallBackIp(entity,entity.getDnsStrategyId());
|
||||
resStrategy.setUserRegion(new Gson().toJson(map));
|
||||
resStrategyList.add(resStrategy);
|
||||
//调用服务接口取消配置
|
||||
json=gsonToJson(resStrategyList);
|
||||
|
||||
Reference in New Issue
Block a user