1.导入配置数据入库优化 2.修复VoIP配置 无IP域配置数据不显示BUG

This commit is contained in:
zhangwq
2018-11-17 23:59:50 +08:00
parent 2e4817e39b
commit 85123852b0
13 changed files with 346 additions and 101 deletions

View File

@@ -1772,63 +1772,91 @@ public class BaseController {
}else if("BaseStringCfg".equals(type)) {
List<BaseStringCfg<?>> listPage = (List<BaseStringCfg<?>>) list;
// 调用对应配置的service
// ip_payload
if (regionDict.getDictId().intValue() == 167) {
interceptCfgService.saveInterceptCfg(listPage);
// interceptCfgService.saveInterceptCfg(listPage);
interceptCfgService.saveStringCfgBatch(listPage, "intercept_pkt_bin");
}
// http url
if (regionDict.getDictId().intValue() == 9||regionDict.getDictId().intValue() == 15 || regionDict.getDictId().intValue() == 596) {
//websiteCfgService.saveHttpUrlCfg(listPage);
websiteCfgService.saveStringCfgBatch(listPage, WebsiteCfgDao.class,"http_url_cfg");
// websiteCfgService.saveHttpUrlCfg(listPage);
websiteCfgService.saveStringCfgBatch(listPage, "http_url_cfg");
}
// FTP url/content
if (regionDict.getDictId().intValue() == 36||regionDict.getDictId().intValue() == 37) {
fileTransferCfgService.saveFtpCfg(listPage);
// fileTransferCfgService.saveFtpCfg(listPage);
fileTransferCfgService.saveStringCfgBatch(listPage, "ftp_keyword_cfg");
}
if (regionDict.getFunctionId().equals(510)) { // P2p hash
/*
* if("p2p_hash".equals(regionDict.getConfigServiceType())) {
* fileTransferCfgService.saveP2pHashCfg(stringCfgs); }else {
*/
fileTransferCfgService.saveP2pCfg(listPage);
/* } */
// P2P eMule Keyword
if(regionDict.getDictId().intValue() == 158){
fileTransferCfgService.saveStringCfgBatch(listPage, "p2p_keyword_cfg");
}
// P2P File Marking
if(regionDict.getDictId().intValue() == 159){
// fileTransferCfgService.saveP2pCfg(listPage);
fileTransferCfgService.saveStringCfgBatch(listPage, "p2p_hash_cfg");
}
// BGP AS
if (regionDict.getFunctionId().equals(61)) {
bgpCfgService.saveBgpAsCfg(listPage);
// bgpCfgService.saveBgpAsCfg(listPage);
bgpCfgService.saveStringCfgBatch(listPage, "ntc_bgp_as_cfg");
}
// SSL SNI/SAN/CN
if (regionDict.getFunctionId().intValue() == 34) {
websiteCfgService.saveSslCfg(listPage);
// websiteCfgService.saveSslCfg(listPage);
websiteCfgService.saveStringCfgBatch(listPage, "ssl_keyword_cfg");
}
// HTTP 请求/应答内容
if(regionDict.getDictId().intValue()==12||regionDict.getDictId().intValue()==13||regionDict.getDictId().intValue()==601||regionDict.getDictId().intValue()==602) {
websiteCfgService.saveHttpBodyCfg(listPage);
// websiteCfgService.saveHttpBodyCfg(listPage);
websiteCfgService.saveStringCfgBatch(listPage, "http_body_cfg");
}
// 流媒体协议
if(regionDict.getDictId().intValue()==25){
avContentCfgService.saveContUrlCfg(listPage);
// avContentCfgService.saveContUrlCfg(listPage);
avContentCfgService.saveStringCfgBatch(listPage, "av_cont_url_cfg");
}
// Voip Account
if(regionDict.getDictId().intValue()==16){
avContentCfgService.saveVoIpAccountCfg(listPage);
// avContentCfgService.saveVoIpAccountCfg(listPage);
avContentCfgService.saveStringCfgBatch(listPage, "av_voip_account_cfg");
}
// APP域名特征
if(regionDict.getDictId().intValue()==64){
appCfgService.saveAppDomainCfg(listPage);
// 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.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.saveMailCfg(listPage);
mailCfgService.saveComplexkeywordCfgBatch(listPage, "mail_keyword_cfg");
}
// HTTP请求头域
if(regionDict.getDictId().intValue()==10) {
websiteCfgService.saveHttpReqHeadCfg(listPage);
// websiteCfgService.saveHttpReqHeadCfg(listPage);
websiteCfgService.saveComplexkeywordCfgBatch(listPage, "http_req_head_cfg");
}
// HTTP响应头域
if(regionDict.getDictId().intValue()==11) {
websiteCfgService.saveHttpResHeadCfg(listPage);
// websiteCfgService.saveHttpResHeadCfg(listPage);
websiteCfgService.saveComplexkeywordCfgBatch(listPage, "http_res_head_cfg");
}
// APP http特征
if(regionDict.getDictId().intValue()==63) {
appCfgService.saveAppHttpCfg(listPage);
// appCfgService.saveAppHttpCfg(listPage);
appCfgService.saveAppHttpCfgBatch(listPage);
}
}else if("DnsResStrategy".equals(type)) {
List<DnsResStrategy> listPage = (List<DnsResStrategy>) list;
dnsResStrategyService.saveDnsResStrategies(listPage);
// dnsResStrategyService.saveDnsResStrategies(listPage);// dns_res_strategy
dnsResStrategyService.saveDnsResStrategyCfgBatch(listPage);
}
}
if (cfgIndexInfos != null && cfgIndexInfos.size() > 0) {