除APP feature和ASN IP外的业务增加批量配置取消功能;
修复ddos新增bug;
This commit is contained in:
@@ -451,6 +451,7 @@ public class ConfigServiceUtil {
|
||||
JSONObject resObject = JSONObject.fromObject(result);
|
||||
bean = (ToMaatResult) JSONObject.toBean(resObject,ToMaatResult.class);
|
||||
}else{
|
||||
logger.info("获取文件摘要响应结果"+result);
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -3276,6 +3276,7 @@ public class BaseController {
|
||||
|| baseCfg.getFunctionId().equals(3)) { //IP WHITELIST
|
||||
pageResult=ipCfgService.getIpCfgList(searchPage,searchCfg);
|
||||
}else if(baseCfg.getFunctionId().equals(212) //IP Payload
|
||||
|| baseCfg.getFunctionId().equals(214) //IP Replace
|
||||
|| baseCfg.getFunctionId().equals(7) //DNS
|
||||
|| baseCfg.getFunctionId().equals(8)//HTTP ADVANCED
|
||||
|| baseCfg.getFunctionId().equals(635) //HTTP 关键字
|
||||
@@ -3393,7 +3394,7 @@ public class BaseController {
|
||||
cfg.setAuditTime(entity.getAuditTime());
|
||||
newList.add(BaseService.convertCallBackProxyObjKeyring(cfg));
|
||||
ids.add(cfg.getCompileId());
|
||||
newList.add(cfg);
|
||||
/*newList.add(cfg);*/
|
||||
}
|
||||
}else if(className.equals("PxyObjTrustedCaCert")){
|
||||
list = pxyObjKeyringService.findTrustedCertPage(page,searchTrustedCaCertCfg).getList();
|
||||
|
||||
@@ -193,6 +193,9 @@
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.DdosIpCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ddos_ip_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
|
||||
@@ -2636,6 +2636,8 @@ public abstract class BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
long start=System.currentTimeMillis();
|
||||
long end=System.currentTimeMillis();
|
||||
if (send) {
|
||||
if(configCompileList.size() > 0) {
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -2644,6 +2646,7 @@ public abstract class BaseService {
|
||||
maatBean.setCreatorName(UserUtils.getUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
start=System.currentTimeMillis();
|
||||
// 调用服务接口下发配置数据
|
||||
String json = BaseService.gsonToJson(maatBean);
|
||||
if(configCompileList.size()>10) {
|
||||
@@ -2652,8 +2655,11 @@ public abstract class BaseService {
|
||||
logger.info("IP 配置下发配置参数:" + json);
|
||||
}
|
||||
// 调用服务接口下发配置
|
||||
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("IP 配置下发响应信息:" + result.getMsg());
|
||||
end=System.currentTimeMillis();
|
||||
logger.info("IP 配置下发配置耗时:" + (end-start));
|
||||
}else {
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(callbackIpList);
|
||||
@@ -2743,6 +2749,8 @@ public abstract class BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
long start=System.currentTimeMillis();
|
||||
long end=System.currentTimeMillis();
|
||||
if (send && configCompileList.size() > 0) {
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
@@ -2750,6 +2758,7 @@ public abstract class BaseService {
|
||||
maatBean.setCreatorName(UserUtils.getUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
start=System.currentTimeMillis();
|
||||
// 调用服务接口下发配置数据
|
||||
String json = BaseService.gsonToJson(maatBean);
|
||||
if(configCompileList.size()>10) {
|
||||
@@ -2760,6 +2769,8 @@ public abstract class BaseService {
|
||||
// 调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("字符串配置下发响应信息:" + result.getMsg());
|
||||
end=System.currentTimeMillis();
|
||||
logger.info("字符串配置下发配置耗时:" + (end-start));
|
||||
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
|
||||
Reference in New Issue
Block a user