(1)index 跟子配置保存放到service同一个事务中
(2)修复是否下发选项隐藏导致的空指针异常
This commit is contained in:
@@ -94,6 +94,7 @@ import com.nis.util.excel.thread.CheckStringFormatThread;
|
|||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.ArchiveServcie;
|
import com.nis.web.service.ArchiveServcie;
|
||||||
import com.nis.web.service.AreaService;
|
import com.nis.web.service.AreaService;
|
||||||
|
import com.nis.web.service.BaseService;
|
||||||
import com.nis.web.service.DictService;
|
import com.nis.web.service.DictService;
|
||||||
import com.nis.web.service.LogService;
|
import com.nis.web.service.LogService;
|
||||||
import com.nis.web.service.MenuService;
|
import com.nis.web.service.MenuService;
|
||||||
@@ -1248,7 +1249,7 @@ public class BaseController {
|
|||||||
String specServiceId = request.getParameter("appId");
|
String specServiceId = request.getParameter("appId");
|
||||||
String behaviorId = request.getParameter("behaviorId");
|
String behaviorId = request.getParameter("behaviorId");
|
||||||
String asnIpGroup = request.getParameter("asnGroupId");
|
String asnIpGroup = request.getParameter("asnGroupId");
|
||||||
String isSend = request.getParameter("isSend");
|
String isSend = request.getParameter("isSend")==null?"":request.getParameter("isSend");
|
||||||
SpecificServiceCfg specificServiceCfg = null;
|
SpecificServiceCfg specificServiceCfg = null;
|
||||||
if (serviceDict!=null&&(serviceDict.getServiceId().intValue() == 33 || serviceDict.getServiceId().intValue() == 145
|
if (serviceDict!=null&&(serviceDict.getServiceId().intValue() == 33 || serviceDict.getServiceId().intValue() == 145
|
||||||
|| serviceDict.getServiceId().intValue() == 35
|
|| serviceDict.getServiceId().intValue() == 35
|
||||||
@@ -1403,7 +1404,7 @@ public class BaseController {
|
|||||||
asnIpCfgs.add(_cfg);
|
asnIpCfgs.add(_cfg);
|
||||||
ind++;
|
ind++;
|
||||||
}
|
}
|
||||||
this.splitAndSave(regionDict, serviceDict, specificServiceCfg, asnIpCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
ipCfgService.saveAndSend(regionDict, serviceDict, specificServiceCfg, asnIpCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
||||||
cfgIndexInfos.clear();
|
cfgIndexInfos.clear();
|
||||||
appPolicyCfgs.clear();
|
appPolicyCfgs.clear();
|
||||||
_ipPortCfgs.clear();
|
_ipPortCfgs.clear();
|
||||||
@@ -1532,7 +1533,7 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
ind++;
|
ind++;
|
||||||
}
|
}
|
||||||
this.splitAndSave(regionDict, serviceDict, specificServiceCfg, _ipPortCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
ipCfgService.saveAndSend(regionDict, serviceDict, specificServiceCfg, _ipPortCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
||||||
cfgIndexInfos.clear();
|
cfgIndexInfos.clear();
|
||||||
appPolicyCfgs.clear();
|
appPolicyCfgs.clear();
|
||||||
_ipPortCfgs.clear();
|
_ipPortCfgs.clear();
|
||||||
@@ -1653,7 +1654,7 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
ind++;
|
ind++;
|
||||||
}
|
}
|
||||||
this.splitAndSave(regionDict, serviceDict, specificServiceCfg, _stringCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
ipCfgService.saveAndSend(regionDict, serviceDict, specificServiceCfg, _stringCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
||||||
cfgIndexInfos.clear();
|
cfgIndexInfos.clear();
|
||||||
appPolicyCfgs.clear();
|
appPolicyCfgs.clear();
|
||||||
_stringCfgs.clear();
|
_stringCfgs.clear();
|
||||||
@@ -1731,7 +1732,7 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
ind++;
|
ind++;
|
||||||
}
|
}
|
||||||
this.splitAndSave(regionDict, serviceDict, specificServiceCfg, _complexkeywordCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
ipCfgService.saveAndSend(regionDict, serviceDict, specificServiceCfg, _complexkeywordCfgs, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
||||||
cfgIndexInfos.clear();
|
cfgIndexInfos.clear();
|
||||||
appPolicyCfgs.clear();
|
appPolicyCfgs.clear();
|
||||||
_complexkeywordCfgs.clear();
|
_complexkeywordCfgs.clear();
|
||||||
@@ -1771,7 +1772,7 @@ public class BaseController {
|
|||||||
cfg.setCompileId(compileIds.get(ind));
|
cfg.setCompileId(compileIds.get(ind));
|
||||||
ind++;
|
ind++;
|
||||||
}
|
}
|
||||||
this.splitAndSave(regionDict, serviceDict, specificServiceCfg, _dnsResStrategies, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
ipCfgService.saveAndSend(regionDict, serviceDict, specificServiceCfg, _dnsResStrategies, cfgIndexInfos, appPolicyCfgs,isSend.equals("1"));
|
||||||
_dnsResStrategies.clear();
|
_dnsResStrategies.clear();
|
||||||
cfgIndexInfos.clear();
|
cfgIndexInfos.clear();
|
||||||
appPolicyCfgs.clear();
|
appPolicyCfgs.clear();
|
||||||
@@ -1850,144 +1851,6 @@ public class BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 分割并保存
|
|
||||||
* @param regionDict
|
|
||||||
* @param serviceDict
|
|
||||||
* @param specificServiceCfg
|
|
||||||
* @param asnNoMap
|
|
||||||
* @param list
|
|
||||||
* @param cfgIndexInfos
|
|
||||||
* @param appPolicyCfgs
|
|
||||||
*/
|
|
||||||
public void splitAndSave(FunctionRegionDict regionDict,FunctionServiceDict serviceDict,
|
|
||||||
SpecificServiceCfg specificServiceCfg,
|
|
||||||
List<? extends BaseCfg> list,List<CfgIndexInfo> cfgIndexInfos,
|
|
||||||
List<AppPolicyCfg> appPolicyCfgs,boolean send){
|
|
||||||
if(list!=null&&list.size()>0) {
|
|
||||||
String type=null;
|
|
||||||
if (list.get(0) instanceof BaseIpCfg) {
|
|
||||||
type="BaseIpCfg";
|
|
||||||
}else if(list.get(0) instanceof BaseStringCfg) {
|
|
||||||
type="BaseStringCfg";
|
|
||||||
}else if(list.get(0) instanceof ComplexkeywordCfg) {
|
|
||||||
type="ComplexkeywordCfg";
|
|
||||||
}else if(list.get(0) instanceof DnsResStrategy) {
|
|
||||||
type="DnsResStrategy";
|
|
||||||
}else if(list.get(0) instanceof AsnIpCfg) {
|
|
||||||
type="AsnIpCfg";
|
|
||||||
}
|
|
||||||
if (cfgIndexInfos != null && cfgIndexInfos.size() > 0) {
|
|
||||||
ipCfgService.saveCfgIndexOf(cfgIndexInfos);
|
|
||||||
}
|
|
||||||
if (appPolicyCfgs != null && appPolicyCfgs.size() > 0) {
|
|
||||||
appCfgService.savePolicyList(appPolicyCfgs);
|
|
||||||
}
|
|
||||||
if("BaseIpCfg".equals(type)) {
|
|
||||||
List<BaseIpCfg> listPage = (List<BaseIpCfg>) list;
|
|
||||||
if (regionDict.getFunctionId().equals(301)) {
|
|
||||||
ddosCfgService.saveDdosIpCfg((List<BaseIpCfg>)listPage);
|
|
||||||
}else if (regionDict.getFunctionId().equals(401)) {
|
|
||||||
dnsIpCfgService.saveDnsIpCfg((List<BaseIpCfg>)listPage);
|
|
||||||
}else if (specificServiceCfg!=null&®ionDict.getFunctionId().equals(405)) {
|
|
||||||
appCfgService.saveAppIpCfg((List<BaseIpCfg>)listPage,specificServiceCfg);
|
|
||||||
}else {
|
|
||||||
ipCfgService.saveIpBatch(regionDict,serviceDict,(List<BaseIpCfg>)listPage,send);
|
|
||||||
}
|
|
||||||
}else if("AsnIpCfg".equals(type)) {
|
|
||||||
List<AsnIpCfg> listPage = (List<AsnIpCfg>) list;
|
|
||||||
asnIpCfgService.saveAsnIpBatch(listPage);
|
|
||||||
}else if("BaseStringCfg".equals(type)) {
|
|
||||||
List<BaseStringCfg<?>> listPage = (List<BaseStringCfg<?>>) list;
|
|
||||||
// 调用对应配置的service
|
|
||||||
// ip_payload
|
|
||||||
if (regionDict.getDictId().intValue() == 167) {
|
|
||||||
// interceptCfgService.saveInterceptCfg(listPage);
|
|
||||||
interceptCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "intercept_pkt_bin",send);
|
|
||||||
}
|
|
||||||
// http url
|
|
||||||
if (regionDict.getDictId().intValue() == 9||regionDict.getDictId().intValue() == 15 || regionDict.getDictId().intValue() == 596) {
|
|
||||||
// websiteCfgService.saveHttpUrlCfg(listPage);
|
|
||||||
websiteCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "http_url_cfg",send);
|
|
||||||
}
|
|
||||||
// FTP url/content
|
|
||||||
if (regionDict.getDictId().intValue() == 36||regionDict.getDictId().intValue() == 37) {
|
|
||||||
// fileTransferCfgService.saveFtpCfg(listPage);
|
|
||||||
fileTransferCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "ftp_keyword_cfg",send);
|
|
||||||
}
|
|
||||||
// P2P eMule Keyword
|
|
||||||
if(regionDict.getDictId().intValue() == 158){
|
|
||||||
fileTransferCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "p2p_keyword_cfg",send);
|
|
||||||
}
|
|
||||||
// P2P File Marking
|
|
||||||
if(regionDict.getDictId().intValue() == 159){
|
|
||||||
// fileTransferCfgService.saveP2pCfg(listPage);
|
|
||||||
fileTransferCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "p2p_hash_cfg",send);
|
|
||||||
}
|
|
||||||
// BGP AS
|
|
||||||
if (regionDict.getFunctionId().equals(61)) {
|
|
||||||
// bgpCfgService.saveBgpAsCfg(listPage);
|
|
||||||
bgpCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "ntc_bgp_as_cfg",send);
|
|
||||||
}
|
|
||||||
// SSL SNI/SAN/CN
|
|
||||||
if (regionDict.getFunctionId().intValue() == 34) {
|
|
||||||
// websiteCfgService.saveSslCfg(listPage);
|
|
||||||
websiteCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "ssl_keyword_cfg",send);
|
|
||||||
}
|
|
||||||
// HTTP 请求/应答内容
|
|
||||||
if(regionDict.getDictId().intValue()==12||regionDict.getDictId().intValue()==13||regionDict.getDictId().intValue()==601||regionDict.getDictId().intValue()==602) {
|
|
||||||
// websiteCfgService.saveHttpBodyCfg(listPage);
|
|
||||||
websiteCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "http_body_cfg",send);
|
|
||||||
}
|
|
||||||
// 流媒体协议
|
|
||||||
if(regionDict.getDictId().intValue()==25){
|
|
||||||
// avContentCfgService.saveContUrlCfg(listPage);
|
|
||||||
avContentCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "av_cont_url_cfg",send);
|
|
||||||
}
|
|
||||||
// Voip Account
|
|
||||||
if(regionDict.getDictId().intValue()==16){
|
|
||||||
// avContentCfgService.saveVoIpAccountCfg(listPage);
|
|
||||||
avContentCfgService.saveStringCfgBatch(regionDict,serviceDict,listPage, "av_voip_account_cfg",send);
|
|
||||||
}
|
|
||||||
// APP域名特征
|
|
||||||
if(regionDict.getDictId().intValue()==64){
|
|
||||||
// appCfgService.saveAppDomainCfg(listPage);
|
|
||||||
appCfgService.saveAppDomainCfgBatch(listPage);
|
|
||||||
}
|
|
||||||
}else if("ComplexkeywordCfg".equals(type)) {
|
|
||||||
List<ComplexkeywordCfg> listPage = (List<ComplexkeywordCfg>) list;
|
|
||||||
// DNS
|
|
||||||
if (regionDict.getDictId().intValue() == 28) {
|
|
||||||
// websiteCfgService.saveDnsCfg(listPage);
|
|
||||||
websiteCfgService.saveComplexkeywordCfgBatch(listPage, "dns_domain_cfg");
|
|
||||||
}
|
|
||||||
// Mail
|
|
||||||
if (regionDict.getDictId().intValue() == 30 || regionDict.getDictId().intValue() == 31||regionDict.getDictId().intValue() == 599) {
|
|
||||||
// mailCfgService.saveMailCfg(listPage);
|
|
||||||
mailCfgService.saveComplexkeywordCfgBatch(listPage, "mail_keyword_cfg");
|
|
||||||
}
|
|
||||||
// HTTP请求头域
|
|
||||||
if(regionDict.getDictId().intValue()==10) {
|
|
||||||
// websiteCfgService.saveHttpReqHeadCfg(listPage);
|
|
||||||
websiteCfgService.saveComplexkeywordCfgBatch(listPage, "http_req_head_cfg");
|
|
||||||
}
|
|
||||||
// HTTP响应头域
|
|
||||||
if(regionDict.getDictId().intValue()==11) {
|
|
||||||
// websiteCfgService.saveHttpResHeadCfg(listPage);
|
|
||||||
websiteCfgService.saveComplexkeywordCfgBatch(listPage, "http_res_head_cfg");
|
|
||||||
}
|
|
||||||
// APP http特征
|
|
||||||
if(regionDict.getDictId().intValue()==63) {
|
|
||||||
// appCfgService.saveAppHttpCfg(listPage);
|
|
||||||
appCfgService.saveAppHttpCfgBatch(listPage);
|
|
||||||
}
|
|
||||||
}else if("DnsResStrategy".equals(type)) {
|
|
||||||
List<DnsResStrategy> listPage = (List<DnsResStrategy>) list;
|
|
||||||
// dnsResStrategyService.saveDnsResStrategies(listPage);
|
|
||||||
dnsResStrategyService.saveDnsResStrategyCfgBatch(listPage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 多域配置导出
|
* 多域配置导出
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import java.io.IOException;
|
|||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -46,25 +46,35 @@ import com.nis.domain.callback.InlineIp;
|
|||||||
import com.nis.domain.callback.NtcDnsResStrategy;
|
import com.nis.domain.callback.NtcDnsResStrategy;
|
||||||
import com.nis.domain.callback.ProxyObjKeyring;
|
import com.nis.domain.callback.ProxyObjKeyring;
|
||||||
import com.nis.domain.callback.ProxyObjTrustedCa;
|
import com.nis.domain.callback.ProxyObjTrustedCa;
|
||||||
import com.nis.domain.callback.ProxyObjTrustedCaCrl;
|
import com.nis.domain.configuration.AppDomainCfg;
|
||||||
|
import com.nis.domain.configuration.AppHttpCfg;
|
||||||
import com.nis.domain.configuration.AppIpCfg;
|
import com.nis.domain.configuration.AppIpCfg;
|
||||||
|
import com.nis.domain.configuration.AppPolicyCfg;
|
||||||
import com.nis.domain.configuration.AreaBean;
|
import com.nis.domain.configuration.AreaBean;
|
||||||
import com.nis.domain.configuration.AreaIpCfg;
|
import com.nis.domain.configuration.AreaIpCfg;
|
||||||
import com.nis.domain.configuration.BaseCfg;
|
import com.nis.domain.configuration.BaseCfg;
|
||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
|
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||||
|
import com.nis.domain.configuration.DdosIpCfg;
|
||||||
|
import com.nis.domain.configuration.DnsIpCfg;
|
||||||
import com.nis.domain.configuration.DnsResStrategy;
|
import com.nis.domain.configuration.DnsResStrategy;
|
||||||
import com.nis.domain.configuration.PxyObjKeyring;
|
import com.nis.domain.configuration.PxyObjKeyring;
|
||||||
import com.nis.domain.configuration.PxyObjTrustedCaCert;
|
import com.nis.domain.configuration.PxyObjTrustedCaCert;
|
||||||
import com.nis.domain.configuration.PxyObjTrustedCaCrl;
|
import com.nis.domain.configuration.PxyObjTrustedCaCrl;
|
||||||
|
import com.nis.domain.maat.GroupReuseAddBean;
|
||||||
|
import com.nis.domain.maat.GroupReuseCfg;
|
||||||
import com.nis.domain.maat.MaatCfg;
|
import com.nis.domain.maat.MaatCfg;
|
||||||
import com.nis.domain.maat.ToMaatBean;
|
|
||||||
import com.nis.domain.maat.ToMaatResult;
|
|
||||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||||
|
import com.nis.domain.maat.ToMaatBean;
|
||||||
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
|
import com.nis.domain.specific.ConfigGroupInfo;
|
||||||
|
import com.nis.domain.specific.SpecificServiceCfg;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Configurations;
|
import com.nis.util.Configurations;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
@@ -72,10 +82,15 @@ import com.nis.util.IpUtil;
|
|||||||
import com.nis.util.Reflections;
|
import com.nis.util.Reflections;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.util.StringUtils;
|
import com.nis.util.StringUtils;
|
||||||
import com.nis.web.dao.CrudDao;
|
import com.nis.web.dao.basics.AsnIpCfgDao;
|
||||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
import com.nis.web.dao.configuration.AppCfgDao;
|
||||||
|
import com.nis.web.dao.configuration.DdosCfgDao;
|
||||||
|
import com.nis.web.dao.configuration.DnsIpCfgDao;
|
||||||
|
import com.nis.web.dao.configuration.DnsResStrategyDao;
|
||||||
import com.nis.web.dao.configuration.IpCfgDao;
|
import com.nis.web.dao.configuration.IpCfgDao;
|
||||||
import com.nis.web.dao.configuration.StringCfgDao;
|
import com.nis.web.dao.configuration.StringCfgDao;
|
||||||
|
import com.nis.web.dao.specific.ConfigGroupInfoDao;
|
||||||
|
import com.nis.web.dao.specific.SpecificServiceCfgDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1398,6 +1413,294 @@ public abstract class BaseService {
|
|||||||
maatCfg.setIsValid(_cfg.getIsValid());
|
maatCfg.setIsValid(_cfg.getIsValid());
|
||||||
return maatCfg;
|
return maatCfg;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 分割并保存
|
||||||
|
* @param regionDict
|
||||||
|
* @param serviceDict
|
||||||
|
* @param specificServiceCfg
|
||||||
|
* @param asnNoMap
|
||||||
|
* @param list
|
||||||
|
* @param cfgIndexInfos
|
||||||
|
* @param appPolicyCfgs
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void saveAndSend(FunctionRegionDict regionDict,FunctionServiceDict serviceDict,
|
||||||
|
SpecificServiceCfg specificServiceCfg,
|
||||||
|
List<? extends BaseCfg> list,List<CfgIndexInfo> cfgIndexInfos,
|
||||||
|
List<AppPolicyCfg> appPolicyCfgs,boolean send){
|
||||||
|
if(list!=null&&list.size()>0) {
|
||||||
|
String type=null;
|
||||||
|
if (list.get(0) instanceof BaseIpCfg) {
|
||||||
|
type="BaseIpCfg";
|
||||||
|
}else if(list.get(0) instanceof BaseStringCfg) {
|
||||||
|
type="BaseStringCfg";
|
||||||
|
}else if(list.get(0) instanceof ComplexkeywordCfg) {
|
||||||
|
type="ComplexkeywordCfg";
|
||||||
|
}else if(list.get(0) instanceof DnsResStrategy) {
|
||||||
|
type="DnsResStrategy";
|
||||||
|
}else if(list.get(0) instanceof AsnIpCfg) {
|
||||||
|
type="AsnIpCfg";
|
||||||
|
}
|
||||||
|
if (cfgIndexInfos != null && cfgIndexInfos.size() > 0) {
|
||||||
|
this.saveCfgIndexOf(cfgIndexInfos);
|
||||||
|
}
|
||||||
|
if (appPolicyCfgs != null && appPolicyCfgs.size() > 0) {
|
||||||
|
this.savePolicyList(appPolicyCfgs);
|
||||||
|
}
|
||||||
|
if("BaseIpCfg".equals(type)) {
|
||||||
|
List<BaseIpCfg> listPage = (List<BaseIpCfg>) list;
|
||||||
|
if (specificServiceCfg!=null&®ionDict.getFunctionId().equals(405)) {
|
||||||
|
this.saveAppIpCfg((List<BaseIpCfg>)listPage,specificServiceCfg);
|
||||||
|
}else {
|
||||||
|
this.saveIpBatch(regionDict,serviceDict,(List<BaseIpCfg>)listPage,send);
|
||||||
|
}
|
||||||
|
}else if("AsnIpCfg".equals(type)) {
|
||||||
|
List<AsnIpCfg> listPage = (List<AsnIpCfg>) list;
|
||||||
|
this.saveAsnIpBatch(listPage);
|
||||||
|
}else if("BaseStringCfg".equals(type)) {
|
||||||
|
List<BaseStringCfg<?>> listPage = (List<BaseStringCfg<?>>) list;
|
||||||
|
// 调用对应配置的service
|
||||||
|
// ip_payload
|
||||||
|
if (regionDict.getDictId().intValue() == 167) {
|
||||||
|
// interceptCfgService.saveInterceptCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "intercept_pkt_bin",send);
|
||||||
|
}else
|
||||||
|
// http url
|
||||||
|
if (regionDict.getDictId().intValue() == 9||regionDict.getDictId().intValue() == 15 || regionDict.getDictId().intValue() == 596) {
|
||||||
|
// websiteCfgService.saveHttpUrlCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "http_url_cfg",send);
|
||||||
|
}else
|
||||||
|
// FTP url/content
|
||||||
|
if (regionDict.getDictId().intValue() == 36||regionDict.getDictId().intValue() == 37) {
|
||||||
|
// fileTransferCfgService.saveFtpCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "ftp_keyword_cfg",send);
|
||||||
|
}else
|
||||||
|
// P2P eMule Keyword
|
||||||
|
if(regionDict.getDictId().intValue() == 158){
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "p2p_keyword_cfg",send);
|
||||||
|
}else
|
||||||
|
// P2P File Marking
|
||||||
|
if(regionDict.getDictId().intValue() == 159){
|
||||||
|
// fileTransferCfgService.saveP2pCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "p2p_hash_cfg",send);
|
||||||
|
}else
|
||||||
|
// BGP AS
|
||||||
|
if (regionDict.getFunctionId().equals(61)) {
|
||||||
|
// bgpCfgService.saveBgpAsCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "ntc_bgp_as_cfg",send);
|
||||||
|
}else
|
||||||
|
// SSL SNI/SAN/CN
|
||||||
|
if (regionDict.getFunctionId().intValue() == 34) {
|
||||||
|
// websiteCfgService.saveSslCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "ssl_keyword_cfg",send);
|
||||||
|
}else
|
||||||
|
// HTTP 请求/应答内容
|
||||||
|
if(regionDict.getDictId().intValue()==12||regionDict.getDictId().intValue()==13||regionDict.getDictId().intValue()==601||regionDict.getDictId().intValue()==602) {
|
||||||
|
// websiteCfgService.saveHttpBodyCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "http_body_cfg",send);
|
||||||
|
}else
|
||||||
|
// 流媒体协议
|
||||||
|
if(regionDict.getDictId().intValue()==25){
|
||||||
|
// avContentCfgService.saveContUrlCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "av_cont_url_cfg",send);
|
||||||
|
}else
|
||||||
|
// Voip Account
|
||||||
|
if(regionDict.getDictId().intValue()==16){
|
||||||
|
// avContentCfgService.saveVoIpAccountCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "av_voip_account_cfg",send);
|
||||||
|
}else
|
||||||
|
// APP域名特征
|
||||||
|
if(regionDict.getDictId().intValue()==64){
|
||||||
|
// appCfgService.saveAppDomainCfg(listPage);
|
||||||
|
this.saveStringCfgBatch(regionDict,serviceDict,listPage, AppDomainCfg.getTablename(),send);
|
||||||
|
}
|
||||||
|
}else if("ComplexkeywordCfg".equals(type)) {
|
||||||
|
List<ComplexkeywordCfg> listPage = (List<ComplexkeywordCfg>) list;
|
||||||
|
// DNS
|
||||||
|
if (regionDict.getDictId().intValue() == 28) {
|
||||||
|
// websiteCfgService.saveDnsCfg(listPage);
|
||||||
|
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "dns_domain_cfg",send);
|
||||||
|
}else
|
||||||
|
// Mail
|
||||||
|
if (regionDict.getDictId().intValue() == 30 || regionDict.getDictId().intValue() == 31||regionDict.getDictId().intValue() == 599) {
|
||||||
|
// mailCfgService.saveMailCfg(listPage);
|
||||||
|
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "mail_keyword_cfg",send);
|
||||||
|
}else
|
||||||
|
// HTTP请求头域
|
||||||
|
if(regionDict.getDictId().intValue()==10) {
|
||||||
|
// websiteCfgService.saveHttpReqHeadCfg(listPage);
|
||||||
|
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_req_head_cfg",send);
|
||||||
|
}else
|
||||||
|
// HTTP响应头域
|
||||||
|
if(regionDict.getDictId().intValue()==11) {
|
||||||
|
// websiteCfgService.saveHttpResHeadCfg(listPage);
|
||||||
|
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_res_head_cfg",send);
|
||||||
|
}else
|
||||||
|
// APP http特征
|
||||||
|
if(regionDict.getDictId().intValue()==63) {
|
||||||
|
// appCfgService.saveAppHttpCfg(listPage);
|
||||||
|
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, AppHttpCfg.getTablename(),send);
|
||||||
|
}
|
||||||
|
}else if("DnsResStrategy".equals(type)) {
|
||||||
|
List<DnsResStrategy> listPage = (List<DnsResStrategy>) list;
|
||||||
|
// dnsResStrategyService.saveDnsResStrategies(listPage);
|
||||||
|
this.saveDnsResStrategyCfgBatch(listPage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void saveAsnIpBatch(List<AsnIpCfg> cfgs){
|
||||||
|
logger.warn("Start to save IP,size:"+cfgs.size());
|
||||||
|
long start=System.currentTimeMillis();
|
||||||
|
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
|
SqlSession batchSqlSession = null;
|
||||||
|
//需要通过新增域接口新增的ip集合
|
||||||
|
List<AsnIpCfg> toAddRegionAsnIpCfgs=Lists.newArrayList();
|
||||||
|
try{
|
||||||
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
|
for(AsnIpCfg cfg:cfgs) {
|
||||||
|
((AsnIpCfgDao) batchSqlSession.getMapper(AsnIpCfgDao.class)).insert(cfg);
|
||||||
|
if(Constants.VALID_YES==cfg.getIsValid().intValue()) {
|
||||||
|
toAddRegionAsnIpCfgs.add(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
batchSqlSession.commit();
|
||||||
|
}finally {
|
||||||
|
if(batchSqlSession != null){
|
||||||
|
batchSqlSession.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long end=System.currentTimeMillis();
|
||||||
|
logger.warn("Save IP finish,cost:"+(end-start));
|
||||||
|
if(toAddRegionAsnIpCfgs.size()>0) {
|
||||||
|
asnIPRegionSendToMaat(toAddRegionAsnIpCfgs,Constants.VALID_YES);
|
||||||
|
}
|
||||||
|
cfgs.clear();
|
||||||
|
toAddRegionAsnIpCfgs.clear();
|
||||||
|
cfgs=null;
|
||||||
|
toAddRegionAsnIpCfgs=null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导入配置时数据批量入库
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void saveDnsResStrategyCfgBatch(List<DnsResStrategy> data) {
|
||||||
|
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
|
SqlSession batchSqlSession = null;
|
||||||
|
try{
|
||||||
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
|
for(int index = 0; index < data.size();index++){
|
||||||
|
DnsResStrategy cfg = data.get(index);
|
||||||
|
((DnsResStrategyDao) batchSqlSession.getMapper(DnsResStrategyDao.class)).insert(cfg);
|
||||||
|
}
|
||||||
|
batchSqlSession.commit();
|
||||||
|
}finally {
|
||||||
|
if(batchSqlSession != null){
|
||||||
|
batchSqlSession.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 同一个app下的ip批量保存
|
||||||
|
* @param cfgs
|
||||||
|
* @param specificServiceCfg
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
||||||
|
public void saveAppIpCfg(List<BaseIpCfg> cfgs,SpecificServiceCfg specificServiceCfg){
|
||||||
|
logger.warn("Start to save IP");
|
||||||
|
ConfigGroupInfoDao configGroupInfoDao=SpringContextHolder.getBean(ConfigGroupInfoDao.class);
|
||||||
|
SpecificServiceCfgDao specificServiceCfgDao=SpringContextHolder.getBean(SpecificServiceCfgDao.class);
|
||||||
|
AppCfgDao appCfgDao=SpringContextHolder.getBean(AppCfgDao.class);
|
||||||
|
long start=System.currentTimeMillis();
|
||||||
|
ConfigGroupInfo configGroupInfo=configGroupInfoDao.getConfigGroupInfoByGroupId(specificServiceCfg.getGroupId());
|
||||||
|
if(configGroupInfo==null) {//一般特定服务的组号是新增之后就有的,不会进入这一步。
|
||||||
|
Integer groupId = ConfigServiceUtil.getId(2, 1).get(0);
|
||||||
|
Integer compileId=ConfigServiceUtil.getId(1, 1).get(0);
|
||||||
|
specificServiceCfg.setGroupId(groupId);
|
||||||
|
configGroupInfo = new ConfigGroupInfo();
|
||||||
|
configGroupInfo.setGroupId(specificServiceCfg.getGroupId());
|
||||||
|
configGroupInfo.setGroupName(specificServiceCfg.getSpecServiceName());
|
||||||
|
configGroupInfo.setIsIssued(0);
|
||||||
|
configGroupInfo.setGroupType(1);
|
||||||
|
configGroupInfo.setCompileId(compileId);
|
||||||
|
configGroupInfoDao.insertConfigGroupInfo(configGroupInfo);
|
||||||
|
//更新group_id
|
||||||
|
specificServiceCfg.setOpTime(new Date());
|
||||||
|
specificServiceCfgDao.update(specificServiceCfg);
|
||||||
|
}
|
||||||
|
Integer compileId = configGroupInfo.getCompileId();
|
||||||
|
// Varibles maxPacket=asnIpCfgDao.getVaribles("max_allowed_packet");
|
||||||
|
List<AppIpCfg> tempList=Lists.newArrayList();
|
||||||
|
int len=0;
|
||||||
|
for(BaseIpCfg cfg:cfgs) {
|
||||||
|
AppIpCfg entity=new AppIpCfg();
|
||||||
|
BeanUtils.copyProperties(cfg, entity);
|
||||||
|
entity.setCompileId(compileId);
|
||||||
|
int tempLen=entity.toString().getBytes(Charset.forName("UTF-8")).length;
|
||||||
|
if((len+tempLen)<Constants.MAX_ALLOWED_PACKET) {
|
||||||
|
tempList.add(entity);
|
||||||
|
len+=tempLen;
|
||||||
|
}else {
|
||||||
|
appCfgDao.insertAppIpCfgBatch(tempList);
|
||||||
|
tempList.clear();
|
||||||
|
tempList.add(entity);
|
||||||
|
len=tempLen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(tempList.size()>0) {
|
||||||
|
logger.warn("save ip size:"+tempList.size());
|
||||||
|
appCfgDao.insertAppIpCfgBatch(tempList);
|
||||||
|
tempList.clear();
|
||||||
|
}
|
||||||
|
long end=System.currentTimeMillis();
|
||||||
|
logger.warn("Save IP finish,cost:"+(end-start));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入配置保存CfgIndex
|
||||||
|
* @param cfgIndexInfos
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void saveCfgIndexOf(List<CfgIndexInfo> cfgIndexInfos){
|
||||||
|
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
|
SqlSession batchSqlSession = null;
|
||||||
|
try{
|
||||||
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
|
for(int index = 0; index < cfgIndexInfos.size();index++){
|
||||||
|
CfgIndexInfo cfgIndexInfo = cfgIndexInfos.get(index);
|
||||||
|
((IpCfgDao) batchSqlSession.getMapper(IpCfgDao.class)).saveCfgIndexForBatch(cfgIndexInfo);
|
||||||
|
}
|
||||||
|
batchSqlSession.commit();
|
||||||
|
}finally {
|
||||||
|
if(batchSqlSession != null){
|
||||||
|
batchSqlSession.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导入配置保存App策略
|
||||||
|
* @param appPolicyCfgs
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void savePolicyList(List<AppPolicyCfg> appPolicyCfgs){
|
||||||
|
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
|
SqlSession batchSqlSession = null;
|
||||||
|
try{
|
||||||
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
|
for(int index = 0; index < appPolicyCfgs.size();index++){
|
||||||
|
AppPolicyCfg _cfg = appPolicyCfgs.get(index);
|
||||||
|
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppPolicyCfgForBatch(_cfg);
|
||||||
|
}
|
||||||
|
batchSqlSession.commit();
|
||||||
|
}finally {
|
||||||
|
if(batchSqlSession != null){
|
||||||
|
batchSqlSession.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 导入配置时数据批量入库(IP配置)
|
* 导入配置时数据批量入库(IP配置)
|
||||||
*
|
*
|
||||||
@@ -1417,7 +1720,20 @@ public abstract class BaseService {
|
|||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
for(int index = 0; index < cfgs.size();index++){
|
for(int index = 0; index < cfgs.size();index++){
|
||||||
BaseIpCfg _cfg = cfgs.get(index);
|
BaseIpCfg _cfg = cfgs.get(index);
|
||||||
batchSqlSession.getMapper(IpCfgDao.class).insertForBatch(_cfg);
|
if (regionDict.getFunctionId().equals(301)) {
|
||||||
|
DdosIpCfg ddosIpCfg=new DdosIpCfg();
|
||||||
|
BeanUtils.copyProperties(_cfg, ddosIpCfg);
|
||||||
|
//如果insert加入了select last_insert_id,会拖慢6~7倍以上的效率
|
||||||
|
((DdosCfgDao) batchSqlSession.getMapper(DdosCfgDao.class)).insert(ddosIpCfg);
|
||||||
|
}else if (regionDict.getFunctionId().equals(401)) {
|
||||||
|
DnsIpCfg dnsIpCfg=new DnsIpCfg();
|
||||||
|
BeanUtils.copyProperties(_cfg, dnsIpCfg);
|
||||||
|
//如果insert加入了select last_insert_id,会拖慢6~7倍以上的效率
|
||||||
|
((DnsIpCfgDao) batchSqlSession.getMapper(DnsIpCfgDao.class)).insert(dnsIpCfg);
|
||||||
|
}else {
|
||||||
|
batchSqlSession.getMapper(IpCfgDao.class).insertForBatch(_cfg);
|
||||||
|
}
|
||||||
|
|
||||||
if(send) {
|
if(send) {
|
||||||
if(regionDict.getIsMaat().intValue()==1) {
|
if(regionDict.getIsMaat().intValue()==1) {
|
||||||
MaatCfg maatCfg=convertMaatCfg(_cfg,1);
|
MaatCfg maatCfg=convertMaatCfg(_cfg,1);
|
||||||
@@ -1503,7 +1819,13 @@ public abstract class BaseService {
|
|||||||
for (int index = 0; index < data.size(); index++) {
|
for (int index = 0; index < data.size(); index++) {
|
||||||
BaseStringCfg<?> _cfg = data.get(index);
|
BaseStringCfg<?> _cfg = data.get(index);
|
||||||
_cfg.setTableName(tableName);
|
_cfg.setTableName(tableName);
|
||||||
((StringCfgDao) batchSqlSession.getMapper(StringCfgDao.class)).saveStringCfgBatch(_cfg);
|
if(regionDict.getDictId().intValue()==64){
|
||||||
|
AppDomainCfg cfg=new AppDomainCfg();
|
||||||
|
BeanUtils.copyProperties(_cfg, cfg);
|
||||||
|
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppDomainCfgBatch(cfg);
|
||||||
|
}else {
|
||||||
|
((StringCfgDao) batchSqlSession.getMapper(StringCfgDao.class)).saveStringCfgBatch(_cfg);
|
||||||
|
}
|
||||||
if (send) {
|
if (send) {
|
||||||
if(regionDict.getIsMaat().intValue()==1) {
|
if(regionDict.getIsMaat().intValue()==1) {
|
||||||
configCompileList.add(convertMaatCfg(_cfg,2));
|
configCompileList.add(convertMaatCfg(_cfg,2));
|
||||||
@@ -1542,4 +1864,85 @@ public abstract class BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 导入配置时数据批量入库(增强字符串配置)
|
||||||
|
* @param data
|
||||||
|
* @param tableName
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
|
public void saveComplexkeywordCfgBatch(FunctionRegionDict regionDict, FunctionServiceDict serviceDict,List<ComplexkeywordCfg> data, String tableName,boolean send) {
|
||||||
|
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||||
|
SqlSession batchSqlSession = null;
|
||||||
|
try{
|
||||||
|
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||||
|
for(int index = 0; index < data.size();index++){
|
||||||
|
ComplexkeywordCfg cfg = data.get(index);
|
||||||
|
cfg.setTableName(tableName);
|
||||||
|
if(regionDict.getDictId().intValue()==63) {
|
||||||
|
AppHttpCfg _cfg=new AppHttpCfg();
|
||||||
|
BeanUtils.copyProperties(cfg, _cfg);
|
||||||
|
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppHttpCfgBatch(_cfg);
|
||||||
|
}else {
|
||||||
|
((StringCfgDao) batchSqlSession.getMapper(StringCfgDao.class)).saveComplexkeywordCfgBatch(cfg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
batchSqlSession.commit();
|
||||||
|
}finally {
|
||||||
|
if(batchSqlSession != null){
|
||||||
|
batchSqlSession.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* asn ip分组复用新增
|
||||||
|
* @param asnIpCfgs
|
||||||
|
*/
|
||||||
|
public void asnIPRegionSendToMaat(List<AsnIpCfg> asnIpCfgs,Integer valid) {
|
||||||
|
logger.warn("asnIPRegionSendToMaat start");
|
||||||
|
long start=System.currentTimeMillis();
|
||||||
|
GroupReuseAddBean maatBean = new GroupReuseAddBean();
|
||||||
|
List<GroupReuseCfg> groupReuseList=new ArrayList<>();
|
||||||
|
GroupReuseCfg groupReuseCfg=new GroupReuseCfg();
|
||||||
|
List<IpCfg> ipRegionList = groupReuseCfgAddRemoveConvert(asnIpCfgs,valid,null);
|
||||||
|
List<StringCfg> strRegionList = new ArrayList<>();
|
||||||
|
List<NumBoundaryCfg> numRegionList = new ArrayList<>();
|
||||||
|
groupReuseCfg.setIpRegionList(ipRegionList);
|
||||||
|
groupReuseCfg.setStrRegionList(strRegionList);
|
||||||
|
groupReuseCfg.setNumRegionList(numRegionList);
|
||||||
|
groupReuseList.add(groupReuseCfg);
|
||||||
|
maatBean.setGroupReuseCfgList(groupReuseList);
|
||||||
|
maatBean.setAuditTime(new Date());
|
||||||
|
maatBean.setCreatorName(UserUtils.getUser().getName());
|
||||||
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
|
if(valid==Constants.VALID_YES) {
|
||||||
|
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||||
|
//调用服务接口下发配置数据
|
||||||
|
String json=gsonToJson(maatBean);
|
||||||
|
if(asnIpCfgs.size()<=100) {
|
||||||
|
logger.info("asn ip复用域新增配置下发配置参数:"+json);
|
||||||
|
}else {
|
||||||
|
logger.info("asn ip复用域新增配置下发region条数:"+asnIpCfgs.size());
|
||||||
|
}
|
||||||
|
//调用服务接口下发配置
|
||||||
|
ToMaatResult result =ConfigServiceUtil.postGroupReuseSources(json);
|
||||||
|
logger.info("asn ip复用域新增配置响应信息:"+result.getMsg());
|
||||||
|
}else {
|
||||||
|
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||||
|
//调用服务接口下发配置数据
|
||||||
|
String json=gsonToJson(maatBean);
|
||||||
|
if(asnIpCfgs.size()<=100) {
|
||||||
|
logger.info("asn ip复用域删除配置下发配置参数:"+json);
|
||||||
|
}else {
|
||||||
|
logger.info("asn ip复用域删除配置下发region条数:"+asnIpCfgs.size());
|
||||||
|
|
||||||
|
}
|
||||||
|
//调用服务接口下发配置
|
||||||
|
ToMaatResult result = ConfigServiceUtil.put(json,3);
|
||||||
|
logger.info("asn ip复用域删除配置响应信息:"+result.getMsg());
|
||||||
|
}
|
||||||
|
long end=System.currentTimeMillis();
|
||||||
|
logger.warn("asnIPRegionSendToMaat finish,cost:"+(end-start));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,29 +131,6 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入配置时数据批量入库(增强字符串配置)
|
|
||||||
* @param data
|
|
||||||
* @param tableName
|
|
||||||
*/
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
||||||
public void saveComplexkeywordCfgBatch(List<ComplexkeywordCfg> data, String tableName) {
|
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
|
||||||
SqlSession batchSqlSession = null;
|
|
||||||
try{
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
||||||
for(int index = 0; index < data.size();index++){
|
|
||||||
ComplexkeywordCfg cfg = data.get(index);
|
|
||||||
cfg.setTableName(tableName);
|
|
||||||
((StringCfgDao) batchSqlSession.getMapper(StringCfgDao.class)).saveComplexkeywordCfgBatch(cfg);
|
|
||||||
}
|
|
||||||
batchSqlSession.commit();
|
|
||||||
}finally {
|
|
||||||
if(batchSqlSession != null){
|
|
||||||
batchSqlSession.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -231,25 +231,6 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
deleteByIdsBatch(entities);
|
deleteByIdsBatch(entities);
|
||||||
asnIPRegionSendToMaat(entities,Constants.VALID_NO);
|
asnIPRegionSendToMaat(entities,Constants.VALID_NO);
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
||||||
public void saveAsnIpBatch(List<AsnIpCfg> cfgs){
|
|
||||||
//需要通过新增域接口新增的ip集合
|
|
||||||
List<AsnIpCfg> toAddRegionAsnIpCfgs=Lists.newArrayList();
|
|
||||||
for(AsnIpCfg cfg:cfgs) {
|
|
||||||
if(Constants.VALID_YES==cfg.getIsValid().intValue()) {
|
|
||||||
toAddRegionAsnIpCfgs.add(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.save(cfgs);
|
|
||||||
// splitAndSend(toAddRegionAsnIpCfgs,Constants.VALID_YES);
|
|
||||||
if(toAddRegionAsnIpCfgs.size()>0) {
|
|
||||||
asnIPRegionSendToMaat(toAddRegionAsnIpCfgs,Constants.VALID_YES);
|
|
||||||
}
|
|
||||||
cfgs.clear();
|
|
||||||
toAddRegionAsnIpCfgs.clear();
|
|
||||||
cfgs=null;
|
|
||||||
toAddRegionAsnIpCfgs=null;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 分割IP region分次下发
|
* 分割IP region分次下发
|
||||||
* 由于在Controller中分割,此方法不需要调用,直接使用asnIPRegionSendToMaat方法即可
|
* 由于在Controller中分割,此方法不需要调用,直接使用asnIPRegionSendToMaat方法即可
|
||||||
@@ -283,56 +264,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* asn ip分组复用新增
|
|
||||||
* @param asnIpCfgs
|
|
||||||
*/
|
|
||||||
public void asnIPRegionSendToMaat(List<AsnIpCfg> asnIpCfgs,Integer valid) {
|
|
||||||
logger.warn("asnIPRegionSendToMaat start");
|
|
||||||
long start=System.currentTimeMillis();
|
|
||||||
GroupReuseAddBean maatBean = new GroupReuseAddBean();
|
|
||||||
List<GroupReuseCfg> groupReuseList=new ArrayList<>();
|
|
||||||
GroupReuseCfg groupReuseCfg=new GroupReuseCfg();
|
|
||||||
List<IpCfg> ipRegionList = groupReuseCfgAddRemoveConvert(asnIpCfgs,valid,null);
|
|
||||||
List<StringCfg> strRegionList = new ArrayList<>();
|
|
||||||
List<NumBoundaryCfg> numRegionList = new ArrayList<>();
|
|
||||||
groupReuseCfg.setIpRegionList(ipRegionList);
|
|
||||||
groupReuseCfg.setStrRegionList(strRegionList);
|
|
||||||
groupReuseCfg.setNumRegionList(numRegionList);
|
|
||||||
groupReuseList.add(groupReuseCfg);
|
|
||||||
maatBean.setGroupReuseCfgList(groupReuseList);
|
|
||||||
maatBean.setAuditTime(new Date());
|
|
||||||
maatBean.setCreatorName(UserUtils.getUser().getName());
|
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
|
||||||
if(valid==Constants.VALID_YES) {
|
|
||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
|
||||||
//调用服务接口下发配置数据
|
|
||||||
String json=gsonToJson(maatBean);
|
|
||||||
if(asnIpCfgs.size()<=100) {
|
|
||||||
logger.info("asn ip复用域新增配置下发配置参数:"+json);
|
|
||||||
}else {
|
|
||||||
logger.info("asn ip复用域新增配置下发region条数:"+asnIpCfgs.size());
|
|
||||||
}
|
|
||||||
//调用服务接口下发配置
|
|
||||||
ToMaatResult result =ConfigServiceUtil.postGroupReuseSources(json);
|
|
||||||
logger.info("asn ip复用域新增配置响应信息:"+result.getMsg());
|
|
||||||
}else {
|
|
||||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
|
||||||
//调用服务接口下发配置数据
|
|
||||||
String json=gsonToJson(maatBean);
|
|
||||||
if(asnIpCfgs.size()<=100) {
|
|
||||||
logger.info("asn ip复用域删除配置下发配置参数:"+json);
|
|
||||||
}else {
|
|
||||||
logger.info("asn ip复用域删除配置下发region条数:"+asnIpCfgs.size());
|
|
||||||
|
|
||||||
}
|
|
||||||
//调用服务接口下发配置
|
|
||||||
ToMaatResult result = ConfigServiceUtil.put(json,3);
|
|
||||||
logger.info("asn ip复用域删除配置响应信息:"+result.getMsg());
|
|
||||||
}
|
|
||||||
long end=System.currentTimeMillis();
|
|
||||||
logger.warn("asnIPRegionSendToMaat finish,cost:"+(end-start));
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 批量保存asn PolicyGroupInfo
|
* 批量保存asn PolicyGroupInfo
|
||||||
* @param entities
|
* @param entities
|
||||||
|
|||||||
@@ -319,65 +319,7 @@ public class AppCfgService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
||||||
public void savePolicyList(List<AppPolicyCfg> appPolicyCfgs){
|
|
||||||
for (AppPolicyCfg appPolicyCfg : appPolicyCfgs) {
|
|
||||||
appCfgDao.insertAppPolicyCfg(appPolicyCfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 同一个app下的ip批量保存
|
|
||||||
* @param cfgs
|
|
||||||
* @param specificServiceCfg
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
|
||||||
public void saveAppIpCfg(List<BaseIpCfg> cfgs,SpecificServiceCfg specificServiceCfg){
|
|
||||||
logger.warn("Start to save IP");
|
|
||||||
long start=System.currentTimeMillis();
|
|
||||||
ConfigGroupInfo configGroupInfo=configGroupInfoDao.getConfigGroupInfoByGroupId(specificServiceCfg.getGroupId());
|
|
||||||
if(configGroupInfo==null) {//一般特定服务的组号是新增之后就有的,不会进入这一步。
|
|
||||||
Integer groupId = ConfigServiceUtil.getId(2, 1).get(0);
|
|
||||||
Integer compileId=ConfigServiceUtil.getId(1, 1).get(0);
|
|
||||||
specificServiceCfg.setGroupId(groupId);
|
|
||||||
configGroupInfo = new ConfigGroupInfo();
|
|
||||||
configGroupInfo.setGroupId(specificServiceCfg.getGroupId());
|
|
||||||
configGroupInfo.setGroupName(specificServiceCfg.getSpecServiceName());
|
|
||||||
configGroupInfo.setIsIssued(0);
|
|
||||||
configGroupInfo.setGroupType(1);
|
|
||||||
configGroupInfo.setCompileId(compileId);
|
|
||||||
configGroupInfoDao.insertConfigGroupInfo(configGroupInfo);
|
|
||||||
//更新group_id
|
|
||||||
specificServiceCfg.setOpTime(new Date());
|
|
||||||
specificServiceCfgDao.update(specificServiceCfg);
|
|
||||||
}
|
|
||||||
Integer compileId = configGroupInfo.getCompileId();
|
|
||||||
// Varibles maxPacket=asnIpCfgDao.getVaribles("max_allowed_packet");
|
|
||||||
List<AppIpCfg> tempList=Lists.newArrayList();
|
|
||||||
int len=0;
|
|
||||||
for(BaseIpCfg cfg:cfgs) {
|
|
||||||
AppIpCfg entity=new AppIpCfg();
|
|
||||||
BeanUtils.copyProperties(cfg, entity);
|
|
||||||
entity.setCompileId(compileId);
|
|
||||||
int tempLen=entity.toString().getBytes(Charset.forName("UTF-8")).length;
|
|
||||||
if((len+tempLen)<Constants.MAX_ALLOWED_PACKET) {
|
|
||||||
tempList.add(entity);
|
|
||||||
len+=tempLen;
|
|
||||||
}else {
|
|
||||||
appCfgDao.insertAppIpCfgBatch(tempList);
|
|
||||||
tempList.clear();
|
|
||||||
tempList.add(entity);
|
|
||||||
len=tempLen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(tempList.size()>0) {
|
|
||||||
logger.warn("save ip size:"+tempList.size());
|
|
||||||
appCfgDao.insertAppIpCfgBatch(tempList);
|
|
||||||
tempList.clear();
|
|
||||||
}
|
|
||||||
long end=System.currentTimeMillis();
|
|
||||||
logger.warn("Save IP finish,cost:"+(end-start));
|
|
||||||
}
|
|
||||||
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
||||||
public void saveOrUpdateAppIpCfg(AppIpCfg entity) throws Exception {
|
public void saveOrUpdateAppIpCfg(AppIpCfg entity) throws Exception {
|
||||||
// 设置区域运营商信息
|
// 设置区域运营商信息
|
||||||
@@ -2128,51 +2070,4 @@ public class AppCfgService extends BaseService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入配置时数据批量入库
|
|
||||||
* @param listPage
|
|
||||||
*/
|
|
||||||
public void saveAppDomainCfgBatch(List<BaseStringCfg<?>> data) {
|
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
|
||||||
SqlSession batchSqlSession = null;
|
|
||||||
try{
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
||||||
for(int index = 0; index < data.size();index++){
|
|
||||||
BaseStringCfg<?> entity = data.get(index);
|
|
||||||
AppDomainCfg cfg=new AppDomainCfg();
|
|
||||||
BeanUtils.copyProperties(entity, cfg);
|
|
||||||
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppDomainCfgBatch(cfg);
|
|
||||||
}
|
|
||||||
batchSqlSession.commit();
|
|
||||||
}finally {
|
|
||||||
if(batchSqlSession != null){
|
|
||||||
batchSqlSession.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入配置时数据批量入库
|
|
||||||
* @param listPage
|
|
||||||
*/
|
|
||||||
public void saveAppHttpCfgBatch(List<ComplexkeywordCfg> data) {
|
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
|
||||||
SqlSession batchSqlSession = null;
|
|
||||||
try{
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
||||||
for(int index = 0; index < data.size();index++){
|
|
||||||
ComplexkeywordCfg entity = data.get(index);
|
|
||||||
AppHttpCfg cfg=new AppHttpCfg();
|
|
||||||
BeanUtils.copyProperties(entity, cfg);
|
|
||||||
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppHttpCfgBatch(cfg);
|
|
||||||
}
|
|
||||||
batchSqlSession.commit();
|
|
||||||
}finally {
|
|
||||||
if(batchSqlSession != null){
|
|
||||||
batchSqlSession.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,30 +66,6 @@ public class DdosCfgService extends BaseService{
|
|||||||
return ddosCfgDao.getDdosIpCfg(cfgId);
|
return ddosCfgDao.getDdosIpCfg(cfgId);
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveDdosIpCfg(List<BaseIpCfg> ipPortCfgs) {
|
|
||||||
List<DdosIpCfg> ddosIpCfgS=Lists.newArrayList(ipPortCfgs.size());
|
|
||||||
for(BaseIpCfg cfg:ipPortCfgs) {
|
|
||||||
DdosIpCfg ddosIpCfg=new DdosIpCfg();
|
|
||||||
BeanUtils.copyProperties(cfg, ddosIpCfg);
|
|
||||||
ddosIpCfgS.add(ddosIpCfg);
|
|
||||||
}
|
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
|
||||||
SqlSession batchSqlSession = null;
|
|
||||||
try{
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
||||||
for(int index = 0; index < ddosIpCfgS.size();index++){
|
|
||||||
DdosIpCfg ddosIpCfg = ddosIpCfgS.get(index);
|
|
||||||
//如果insert加入了select last_insert_id,会拖慢6~7倍以上的效率
|
|
||||||
((DdosCfgDao) batchSqlSession.getMapper(DdosCfgDao.class)).insert(ddosIpCfg);
|
|
||||||
}
|
|
||||||
batchSqlSession.commit();
|
|
||||||
}finally {
|
|
||||||
if(batchSqlSession != null){
|
|
||||||
batchSqlSession.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
||||||
public void saveOrUpdate(DdosIpCfg entity){
|
public void saveOrUpdate(DdosIpCfg entity){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
|
|||||||
@@ -51,30 +51,6 @@ public class DnsIpCfgService extends BaseService{
|
|||||||
return dnsIpCfgDao.getDnsIpCfg(cfgId);
|
return dnsIpCfgDao.getDnsIpCfg(cfgId);
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveDnsIpCfg(List<BaseIpCfg> cfgs) {
|
|
||||||
List<DnsIpCfg> dnsIpCfgs=Lists.newArrayList(cfgs.size());
|
|
||||||
for(BaseIpCfg cfg:cfgs) {
|
|
||||||
DnsIpCfg _cfg=new DnsIpCfg();
|
|
||||||
BeanUtils.copyProperties(cfg, _cfg);
|
|
||||||
dnsIpCfgs.add(_cfg);
|
|
||||||
}
|
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
|
||||||
SqlSession batchSqlSession = null;
|
|
||||||
try{
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
||||||
for(int index = 0; index < dnsIpCfgs.size();index++){
|
|
||||||
DnsIpCfg dnsIpCfg = dnsIpCfgs.get(index);
|
|
||||||
//如果insert加入了select last_insert_id,会拖慢6~7倍以上的效率
|
|
||||||
((DnsIpCfgDao) batchSqlSession.getMapper(DnsIpCfgDao.class)).insert(dnsIpCfg);
|
|
||||||
}
|
|
||||||
batchSqlSession.commit();
|
|
||||||
}finally {
|
|
||||||
if(batchSqlSession != null){
|
|
||||||
batchSqlSession.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
||||||
public void saveOrUpdate(DnsIpCfg entity){
|
public void saveOrUpdate(DnsIpCfg entity){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
|
|||||||
@@ -193,28 +193,6 @@ public class DnsResStrategyService extends BaseService{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入配置时数据批量入库
|
|
||||||
* @param data
|
|
||||||
*/
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
||||||
public void saveDnsResStrategyCfgBatch(List<DnsResStrategy> data) {
|
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
|
||||||
SqlSession batchSqlSession = null;
|
|
||||||
try{
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
||||||
for(int index = 0; index < data.size();index++){
|
|
||||||
DnsResStrategy cfg = data.get(index);
|
|
||||||
((DnsResStrategyDao) batchSqlSession.getMapper(DnsResStrategyDao.class)).insert(cfg);
|
|
||||||
}
|
|
||||||
batchSqlSession.commit();
|
|
||||||
}finally {
|
|
||||||
if(batchSqlSession != null){
|
|
||||||
batchSqlSession.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -112,23 +112,6 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveCfgIndexOf(List<CfgIndexInfo> cfgIndexInfos){
|
|
||||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
|
||||||
SqlSession batchSqlSession = null;
|
|
||||||
try{
|
|
||||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
||||||
for(int index = 0; index < cfgIndexInfos.size();index++){
|
|
||||||
CfgIndexInfo cfgIndexInfo = cfgIndexInfos.get(index);
|
|
||||||
((IpCfgDao) batchSqlSession.getMapper(IpCfgDao.class)).saveCfgIndexForBatch(cfgIndexInfo);
|
|
||||||
}
|
|
||||||
batchSqlSession.commit();
|
|
||||||
}finally {
|
|
||||||
if(batchSqlSession != null){
|
|
||||||
batchSqlSession.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
||||||
public void saveIpCfg(CfgIndexInfo entity){
|
public void saveIpCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.nis.domain.FunctionRegionDict;
|
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.configuration.AreaIpCfg;
|
import com.nis.domain.configuration.AreaIpCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
@@ -26,14 +25,13 @@ import com.nis.domain.configuration.IpPortCfg;
|
|||||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.domain.configuration.SslKeywordCfg;
|
import com.nis.domain.configuration.SslKeywordCfg;
|
||||||
import com.nis.domain.maat.MaatCfg;
|
import com.nis.domain.maat.MaatCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
|
||||||
import com.nis.domain.maat.ToMaatBean;
|
|
||||||
import com.nis.domain.maat.ToMaatResult;
|
|
||||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||||
|
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||||
import com.nis.domain.specific.ConfigGroupInfo;
|
import com.nis.domain.maat.ToMaatBean;
|
||||||
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
|
|||||||
Reference in New Issue
Block a user