Compare commits
35 Commits
develop_20
...
develop_no
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
caaebed4a5 | ||
|
|
b3ba3c3961 | ||
|
|
faed29c8b8 | ||
|
|
32fe2bb3d3 | ||
|
|
b9f7fe1941 | ||
|
|
030fe60a93 | ||
|
|
f7f87d2ba9 | ||
|
|
01d5bbe9bc | ||
|
|
272042e432 | ||
|
|
c193b44f66 | ||
|
|
f8d9f106c3 | ||
|
|
d2d52b0b13 | ||
|
|
121fab31ea | ||
|
|
0c639a2d30 | ||
|
|
7afa89951c | ||
|
|
3f952f6a83 | ||
|
|
8c514c4e7e | ||
|
|
12a77173ca | ||
|
|
7949dc7da5 | ||
|
|
b665c4bc75 | ||
|
|
41d2e6ae2f | ||
|
|
9763cb3093 | ||
|
|
ef04251ef1 | ||
|
|
377cca923c | ||
|
|
ff444747ee | ||
|
|
e0b6f18615 | ||
|
|
61e920e9ec | ||
|
|
360fdd574a | ||
|
|
44d8b842a6 | ||
|
|
d2ddba9362 | ||
|
|
6034fa5bff | ||
|
|
ef82ba822f | ||
|
|
d587c67c03 | ||
|
|
dd0133b2d2 | ||
|
|
7d911e748a |
@@ -26,7 +26,7 @@ public class ProxyObjKeyring {
|
|||||||
private String privateKeyFile;
|
private String privateKeyFile;
|
||||||
@Expose
|
@Expose
|
||||||
private String publicKeyFile;
|
private String publicKeyFile;
|
||||||
@Expose
|
//@Expose
|
||||||
private Integer expireAfter;
|
private Integer expireAfter;
|
||||||
@Expose
|
@Expose
|
||||||
private String publicKeyAlgo;
|
private String publicKeyAlgo;
|
||||||
|
|||||||
@@ -833,6 +833,8 @@ public class ConfigConvertUtil {
|
|||||||
return gsonToJson(userRegionMap);
|
return gsonToJson(userRegionMap);
|
||||||
}else if(serviceId.equals(592)){
|
}else if(serviceId.equals(592)){
|
||||||
return "{}";
|
return "{}";
|
||||||
|
}else if(serviceId.equals(18)){
|
||||||
|
return "DNS_STRATEGY=0";
|
||||||
}else{
|
}else{
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
@@ -927,6 +929,13 @@ public class ConfigConvertUtil {
|
|||||||
}
|
}
|
||||||
return dictMap;
|
return dictMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 策略对象Obj list group估算ip range需要获取的region id数量
|
||||||
|
* @param srcList
|
||||||
|
* @param <T>
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static <T>List<Integer> calRangeIps(List<T> srcList ){
|
public static <T>List<Integer> calRangeIps(List<T> srcList ){
|
||||||
List<Integer> regionIdsList=new ArrayList<>();
|
List<Integer> regionIdsList=new ArrayList<>();
|
||||||
int total=0;
|
int total=0;
|
||||||
@@ -976,7 +985,8 @@ public class ConfigConvertUtil {
|
|||||||
return regionIdsList;
|
return regionIdsList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(total>0){
|
//拆分IP数量大于1获取ID
|
||||||
|
if(total>1){
|
||||||
regionIdsList=ConfigServiceUtil.getId(3,total);
|
regionIdsList=ConfigServiceUtil.getId(3,total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -437,5 +437,24 @@ public class DictUtils {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}*/
|
}*/
|
||||||
|
public static Map<Integer,Object> getObjGroupListServiceDicts(Integer functionId){
|
||||||
|
Map<Integer,Object> dictMap=new HashMap<>();
|
||||||
|
List<Map<String,Object>> templateList= ServiceConfigTemplateUtil.getServiceListByFunctionId(functionId);
|
||||||
|
StringBuffer buf=new StringBuffer();
|
||||||
|
for(Map<String,Object> temp:templateList){
|
||||||
|
if(temp.containsKey("serviceIds")){
|
||||||
|
String serviceIds= temp.get("serviceIds").toString();
|
||||||
|
buf.append(serviceIds).append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<FunctionServiceDict> serviceDicts=getFunctionServiceDictList();
|
||||||
|
for(FunctionServiceDict dict:serviceDicts){
|
||||||
|
for(String serviceId:buf.toString().split(",")){
|
||||||
|
if(StringUtils.isNotBlank(serviceId)&&dict.getServiceId().toString().equals(serviceId)){
|
||||||
|
dictMap.put(Integer.parseInt(serviceId),dict);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dictMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import com.google.gson.reflect.TypeToken;
|
|||||||
import com.nis.domain.FunctionServiceDict;
|
import com.nis.domain.FunctionServiceDict;
|
||||||
import com.nis.domain.basics.*;
|
import com.nis.domain.basics.*;
|
||||||
import com.nis.domain.configuration.*;
|
import com.nis.domain.configuration.*;
|
||||||
|
import com.nis.web.service.configuration.ObjGroupCfgConvert;
|
||||||
|
import com.nis.web.service.configuration.ObjectGroupService;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
import org.apache.commons.lang3.StringEscapeUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
@@ -141,7 +143,7 @@ public class SchedulerTaskUtil {
|
|||||||
//查询子域配置详情
|
//查询子域配置详情
|
||||||
if(cfgList!=null){
|
if(cfgList!=null){
|
||||||
if(isCommonGroup){
|
if(isCommonGroup){
|
||||||
groupIdSet=new HashSet<>();
|
groupIdSet=Collections.synchronizedSet(new HashSet<Integer>());
|
||||||
commGroupMap=ConfigConvertUtil.gsonFromJson(list.get(0).getCommonGroupIds(),Map.class);
|
commGroupMap=ConfigConvertUtil.gsonFromJson(list.get(0).getCommonGroupIds(),Map.class);
|
||||||
//将组中的域设置到cfg_index_info中
|
//将组中的域设置到cfg_index_info中
|
||||||
covertCommongroupIdsMap(commGroupMap,"ipGroup",list.get(0),configSynchronizationDao,IpCommCfg.class);
|
covertCommongroupIdsMap(commGroupMap,"ipGroup",list.get(0),configSynchronizationDao,IpCommCfg.class);
|
||||||
@@ -195,10 +197,10 @@ public class SchedulerTaskUtil {
|
|||||||
entity.setIsValid(isValid);//将最新的配置状态赋给配置对象
|
entity.setIsValid(isValid);//将最新的配置状态赋给配置对象
|
||||||
entity.setAuditTime(updateTime);
|
entity.setAuditTime(updateTime);
|
||||||
for(CfgIndexInfo cfg:list){
|
for(CfgIndexInfo cfg:list){
|
||||||
groupRelationList = new ArrayList();
|
groupRelationList = Collections.synchronizedList(new ArrayList());
|
||||||
ipRegionList = new ArrayList();
|
ipRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
strRegionList = new ArrayList();
|
strRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
numRegionList = new ArrayList();
|
numRegionList =Collections.synchronizedList(new ArrayList());
|
||||||
digestRegionList = new ArrayList();
|
digestRegionList = new ArrayList();
|
||||||
areaIpRegionList = new ArrayList();
|
areaIpRegionList = new ArrayList();
|
||||||
if(StringUtils.isNotBlank(cfg.getCommonGroupIds())){//公共分组
|
if(StringUtils.isNotBlank(cfg.getCommonGroupIds())){//公共分组
|
||||||
@@ -207,45 +209,82 @@ public class SchedulerTaskUtil {
|
|||||||
userRegion.append(ConfigConvertUtil.generateCommonGroupDefaultUserRegion(null,cfg.getServiceId()));
|
userRegion.append(ConfigConvertUtil.generateCommonGroupDefaultUserRegion(null,cfg.getServiceId()));
|
||||||
//子配置
|
//子配置
|
||||||
Map<String,Object> maatTableMap=ConfigConvertUtil.convertCommonGroupMaatTable(cfg,cfgList);
|
Map<String,Object> maatTableMap=ConfigConvertUtil.convertCommonGroupMaatTable(cfg,cfgList);
|
||||||
|
//多线程转换
|
||||||
|
ObjGroupCfgConvert ipConvert=new ObjGroupCfgConvert("ipGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
ipConvert.setGroupRelationList(groupRelationList);
|
||||||
|
ipConvert.setIpRegionList(ipRegionList);
|
||||||
|
ipConvert.setNumRegionList(numRegionList);
|
||||||
|
ipConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert subscribeIdConvert=new ObjGroupCfgConvert("subscribeIdGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
subscribeIdConvert.setGroupRelationList(groupRelationList);
|
||||||
|
subscribeIdConvert.setIpRegionList(ipRegionList);
|
||||||
|
subscribeIdConvert.setNumRegionList(numRegionList);
|
||||||
|
subscribeIdConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert urlConvert=new ObjGroupCfgConvert("urlGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
urlConvert.setGroupRelationList(groupRelationList);
|
||||||
|
urlConvert.setIpRegionList(ipRegionList);
|
||||||
|
urlConvert.setNumRegionList(numRegionList);
|
||||||
|
urlConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert domainConvert=new ObjGroupCfgConvert("domainGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
domainConvert.setGroupRelationList(groupRelationList);
|
||||||
|
domainConvert.setIpRegionList(ipRegionList);
|
||||||
|
domainConvert.setNumRegionList(numRegionList);
|
||||||
|
domainConvert.setStrRegionList(strRegionList);
|
||||||
|
Thread t1=new Thread(ipConvert);
|
||||||
|
Thread t2=new Thread(subscribeIdConvert);
|
||||||
|
Thread t3=new Thread(urlConvert);
|
||||||
|
Thread t4=new Thread(domainConvert);
|
||||||
|
t1.start();
|
||||||
|
t2.start();
|
||||||
|
t3.start();
|
||||||
|
t4.start();
|
||||||
|
try {
|
||||||
|
t1.join();
|
||||||
|
t2.join();
|
||||||
|
t3.join();
|
||||||
|
t4.join();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
logger.error("多线程join异常",e);
|
||||||
|
}
|
||||||
//IP公共分组
|
//IP公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
||||||
IpPortCfg _cfg = new IpPortCfg();
|
// IpPortCfg _cfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
// ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
// if(map.get("numRegionList")!=null){
|
||||||
numRegionList.addAll(map.get("numRegionList"));
|
// numRegionList.addAll(map.get("numRegionList"));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
//URL公共分组
|
//URL公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
//账号公共分组
|
//账号公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
//
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
//域名公共分组
|
//域名公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
//
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
BeanUtils.copyProperties(cfg, maatCfg);
|
BeanUtils.copyProperties(cfg, maatCfg);
|
||||||
if(cfg.getServiceId().equals(512)){
|
if(cfg.getServiceId().equals(512)){
|
||||||
maatCfg.setAction(2);
|
maatCfg.setAction(2);
|
||||||
@@ -1034,7 +1073,7 @@ public class SchedulerTaskUtil {
|
|||||||
logger.info("定时器修改配置状态:"+json);
|
logger.info("定时器修改配置状态:"+json);
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||||
logger.info("定时器修改配置状态响应时间:"+result.getMsg());
|
logger.info("定时器修改配置状态响应:"+result.getMsg());
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if("2".equals(serviceType)){//回调类配置
|
}else if("2".equals(serviceType)){//回调类配置
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public class ExportExcel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*** HTTP(s)替换 搜索区域 ***/
|
/*** HTTP(s)替换 搜索区域 ***/
|
||||||
if(("replace_zone".equals(headerStr)) && (region.getFunctionId().equals(209) || region.getAction().equals(80))){
|
if(("replace_zone".equals(headerStr)) && (region.getFunctionId().equals(209) || "80".equals(region.getAction()+""))){
|
||||||
commentStr="";
|
commentStr="";
|
||||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("CONTROL_REPLACE_ZONE");
|
List<SysDataDictionaryItem> dict=DictUtils.getDictList("CONTROL_REPLACE_ZONE");
|
||||||
if(dict !=null && dict.size()>0){
|
if(dict !=null && dict.size()>0){
|
||||||
|
|||||||
@@ -2,11 +2,14 @@ package com.nis.web.controller.configuration;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.nis.domain.FunctionServiceDict;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
|
import com.nis.domain.SysDataDictionaryItem;
|
||||||
import com.nis.domain.basics.PolicyGroupInfo;
|
import com.nis.domain.basics.PolicyGroupInfo;
|
||||||
import com.nis.domain.configuration.BaseCfg;
|
import com.nis.domain.configuration.BaseCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.ObjGroupCfg;
|
import com.nis.domain.configuration.ObjGroupCfg;
|
||||||
|
import com.nis.domain.specific.SpecificServiceCfg;
|
||||||
import com.nis.exceptions.CallExternalProceduresException;
|
import com.nis.exceptions.CallExternalProceduresException;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.*;
|
import com.nis.util.*;
|
||||||
|
|||||||
@@ -492,23 +492,24 @@ public class HttpRedirectPolicyController extends BaseController {
|
|||||||
titleList.add(entity.getMenuNameCode());
|
titleList.add(entity.getMenuNameCode());
|
||||||
titleList.add("NTC_HTTP_URL");
|
titleList.add("NTC_HTTP_URL");
|
||||||
titleList.add("NTC_HTTP_REQ_HDR");
|
titleList.add("NTC_HTTP_REQ_HDR");
|
||||||
|
titleList.add("NTC_HTTP_RES_HDR");
|
||||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||||
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
|
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
|
||||||
|
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||||
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
||||||
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
|
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
|
||||||
|
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||||
|
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||||
|
|
||||||
if (entity.getFunctionId() != 211) {
|
if (entity.getFunctionId() != 211) {
|
||||||
titleList.add("NTC_HTTP_RES_HDR");
|
|
||||||
titleList.add("NTC_HTTP_REQ_BODY");
|
titleList.add("NTC_HTTP_REQ_BODY");
|
||||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
|
||||||
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
||||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
|
||||||
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
||||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
|
||||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||||
if (entity.getFunctionId() != 208) {
|
if (entity.getFunctionId() != 208) {
|
||||||
titleList.add("NTC_HTTP_RES_BODY");
|
titleList.add("NTC_HTTP_RES_BODY");
|
||||||
|
|||||||
@@ -523,12 +523,16 @@ public class ManipulatPolicyController extends BaseController {
|
|||||||
|
|
||||||
titleList.add("NTC_HTTP_RES_HDR");
|
titleList.add("NTC_HTTP_RES_HDR");
|
||||||
titleList.add("NTC_HTTP_REQ_BODY");
|
titleList.add("NTC_HTTP_REQ_BODY");
|
||||||
|
titleList.add("NTC_HTTP_RES_BODY");
|
||||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||||
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
||||||
|
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
|
||||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||||
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
||||||
|
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
|
||||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||||
|
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||||
|
|
||||||
titleList.add("NTC_UNIVERSAL_IP");
|
titleList.add("NTC_UNIVERSAL_IP");
|
||||||
titleList.add("NTC_SUBSCRIBE_ID");
|
titleList.add("NTC_SUBSCRIBE_ID");
|
||||||
|
|||||||
@@ -231,7 +231,6 @@ public class PxyObjKeyringController extends BaseController {
|
|||||||
ResponseData data = result.getData();
|
ResponseData data = result.getData();
|
||||||
publicKeyFileAccessUrl = data.getAccessUrl();
|
publicKeyFileAccessUrl = data.getAccessUrl();
|
||||||
cfg.setPublicKeyFile(publicKeyFileAccessUrl);
|
cfg.setPublicKeyFile(publicKeyFileAccessUrl);
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (privateKeyFileI != null) {
|
if (privateKeyFileI != null) {
|
||||||
@@ -510,7 +509,7 @@ public class PxyObjKeyringController extends BaseController {
|
|||||||
}
|
}
|
||||||
titleList.add(entity.getMenuNameCode());
|
titleList.add(entity.getMenuNameCode());
|
||||||
classMap.put(entity.getMenuNameCode(), PxyObjKeyring.class);
|
classMap.put(entity.getMenuNameCode(), PxyObjKeyring.class);
|
||||||
String cfgIndexInfoNoExport = ",config_describe,whether_area_block,block_type,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
String cfgIndexInfoNoExport = ",expire_after,config_describe,whether_area_block,block_type,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||||
|
|
||||||
// 时间过滤
|
// 时间过滤
|
||||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class P2pLogController extends BaseController {
|
|||||||
|
|
||||||
String url = Constants.LOG_BASE_URL + Constants.NTC_P2P_LOG;
|
String url = Constants.LOG_BASE_URL + Constants.NTC_P2P_LOG;
|
||||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||||
logger.error("查询结果:" + recv);
|
// logger.error("查询结果:" + recv);
|
||||||
if (StringUtils.isNotBlank(recv)) {
|
if (StringUtils.isNotBlank(recv)) {
|
||||||
Gson gson = new GsonBuilder().create();
|
Gson gson = new GsonBuilder().create();
|
||||||
LogRecvData<NtcP2pLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcP2pLog>>() {
|
LogRecvData<NtcP2pLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcP2pLog>>() {
|
||||||
|
|||||||
@@ -454,7 +454,7 @@
|
|||||||
AND r.group_id in(${commonGroupIds})
|
AND r.group_id in(${commonGroupIds})
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${sqlMap.dsf}
|
<!--${sqlMap.dsf}-->
|
||||||
</trim>
|
</trim>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -642,87 +642,87 @@
|
|||||||
AND r.group_id in(${commonGroupIds})
|
AND r.group_id in(${commonGroupIds})
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${sqlMap.dsf}
|
<!-- ${sqlMap.dsf} -->
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getGroupIds" parameterType="com.nis.domain.basics.IpCommCfg" resultMap="IpCommGroupCfgMap">
|
<select id="getGroupIds" parameterType="com.nis.domain.basics.IpCommCfg" resultMap="IpCommGroupCfgMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="columns"></include>
|
<include refid="columns"></include>
|
||||||
FROM
|
FROM
|
||||||
ip_comm_cfg r
|
ip_comm_cfg r
|
||||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||||
<if test="cfgId != null">
|
<if test="cfgId != null">
|
||||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgRegionCode != null">
|
<if test="cfgRegionCode != null">
|
||||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="ipType != null">
|
<if test="ipType != null">
|
||||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpPattern != null">
|
<if test="srcIpPattern != null">
|
||||||
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="destIpPattern != null">
|
<if test="destIpPattern != null">
|
||||||
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="destIpAddress != null and destIpAddress != ''">
|
<if test="destIpAddress != null and destIpAddress != ''">
|
||||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPortPattern != null">
|
<if test="srcPortPattern != null">
|
||||||
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="destPortPattern != null">
|
<if test="destPortPattern != null">
|
||||||
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="srcPort != null and srcPort !=''">
|
<if test="srcPort != null and srcPort !=''">
|
||||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="destPort != null and destPort !=''">
|
<if test="destPort != null and destPort !=''">
|
||||||
AND r.DEST_PORT=#{destPort,jdbcType=VARCHAR}
|
AND r.DEST_PORT=#{destPort,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="direction != null">
|
<if test="direction != null">
|
||||||
AND r.DIRECTION=#{direction,jdbcType=INTEGER}
|
AND r.DIRECTION=#{direction,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isAudit != null">
|
<if test="isAudit != null">
|
||||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null and createTime !=''">
|
<if test="createTime != null and createTime !=''">
|
||||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editTime != null and editTime !='' ">
|
<if test="editTime != null and editTime !='' ">
|
||||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="serviceId != null">
|
<if test="serviceId != null">
|
||||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isAreaEffective != null">
|
<if test="isAreaEffective != null">
|
||||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="functionId != null">
|
<if test="functionId != null">
|
||||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="groupId != null">
|
<if test="groupId != null">
|
||||||
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteCfgByGroupIds" parameterType="java.lang.String" >
|
<delete id="deleteCfgByGroupIds" parameterType="java.lang.String" >
|
||||||
delete from ip_comm_cfg where group_id in (${groupIds})
|
delete from ip_comm_cfg where group_id in (${groupIds})
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -454,72 +454,72 @@
|
|||||||
AND r.group_id in(${commonGroupIds})
|
AND r.group_id in(${commonGroupIds})
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${sqlMap.dsf}
|
<!-- ${sqlMap.dsf}-->
|
||||||
</trim>
|
</trim>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getGroupIds" parameterType="com.nis.domain.basics.ScriberIdCommCfg" resultMap="commGroupCfgMap">
|
<select id="getGroupIds" parameterType="com.nis.domain.basics.ScriberIdCommCfg" resultMap="commGroupCfgMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="columns"></include>
|
<include refid="columns"></include>
|
||||||
FROM
|
FROM
|
||||||
scriberid_comm_cfg r
|
scriberid_comm_cfg r
|
||||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||||
<if test="cfgId != null">
|
<if test="cfgId != null">
|
||||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgDesc != null and cfgDesc != ''">
|
<if test="cfgDesc != null and cfgDesc != ''">
|
||||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||||
AND r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
AND r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgRegionCode != null">
|
<if test="cfgRegionCode != null">
|
||||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="cfgType != null and cfgType != ''">
|
<if test="cfgType != null and cfgType != ''">
|
||||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null and createTime !=''">
|
<if test="createTime != null and createTime !=''">
|
||||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="editTime != null and editTime !='' ">
|
<if test="editTime != null and editTime !='' ">
|
||||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||||
</if>
|
</if>
|
||||||
<if test="serviceId != null">
|
<if test="serviceId != null">
|
||||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="requestId != null">
|
<if test="requestId != null">
|
||||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isAreaEffective != null">
|
<if test="isAreaEffective != null">
|
||||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="classify != null and classify !=''">
|
<if test="classify != null and classify !=''">
|
||||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="attribute != null and attribute !=''">
|
<if test="attribute != null and attribute !=''">
|
||||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="lable != null and lable !=''">
|
<if test="lable != null and lable !=''">
|
||||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
||||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="functionId != null">
|
<if test="functionId != null">
|
||||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="groupId != null">
|
<if test="groupId != null">
|
||||||
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="commonGroupIds != null">
|
<if test="commonGroupIds != null">
|
||||||
AND r.group_id in(${commonGroupIds})
|
AND r.group_id in(${commonGroupIds})
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -466,7 +466,7 @@
|
|||||||
AND r.group_id in(${commonGroupIds})
|
AND r.group_id in(${commonGroupIds})
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${sqlMap.dsf}
|
<!--${sqlMap.dsf}-->
|
||||||
</trim>
|
</trim>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -226,12 +226,6 @@
|
|||||||
<if test="action != null">
|
<if test="action != null">
|
||||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
<if test="isValid != null">
|
|
||||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
<if test="isValid == null">
|
|
||||||
AND a.IS_VALID != -1
|
|
||||||
</if>
|
|
||||||
<choose>
|
<choose>
|
||||||
<!-- 判断是否批量操作 -->
|
<!-- 判断是否批量操作 -->
|
||||||
<when test="batchValidValue != null and batchValidValue != ''">
|
<when test="batchValidValue != null and batchValidValue != ''">
|
||||||
|
|||||||
@@ -8,22 +8,17 @@ import java.math.BigDecimal;
|
|||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.concurrent.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import com.nis.domain.basics.*;
|
import com.nis.domain.basics.*;
|
||||||
import com.nis.domain.configuration.*;
|
import com.nis.domain.configuration.*;
|
||||||
import com.nis.util.*;
|
import com.nis.util.*;
|
||||||
import com.nis.web.dao.CrudDao;
|
import com.nis.web.dao.CrudDao;
|
||||||
import com.nis.web.dao.basics.*;
|
import com.nis.web.dao.basics.*;
|
||||||
import com.nis.web.dao.configuration.*;
|
import com.nis.web.dao.configuration.*;
|
||||||
|
import com.nis.web.service.configuration.ObjGroupCfgConvert;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
import org.apache.commons.lang3.StringEscapeUtils;
|
||||||
@@ -1716,9 +1711,7 @@ public abstract class BaseService {
|
|||||||
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_req_head_cfg",send);
|
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_req_head_cfg",send);
|
||||||
}else
|
}else
|
||||||
// HTTP(s)响应头域
|
// HTTP(s)响应头域
|
||||||
if(regionDict.getDictId().intValue()==102 || regionDict.getDictId().intValue()==81 ||
|
if(regionDict.getConfigRegionValue().equals(Constants.HTTP_REDIRECT_RES_HEAD_REGION)) {
|
||||||
regionDict.getDictId().intValue()==87 || regionDict.getDictId().intValue()==93 ||
|
|
||||||
regionDict.getDictId().intValue()==702) {
|
|
||||||
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_res_head_cfg",send);
|
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_res_head_cfg",send);
|
||||||
}
|
}
|
||||||
}else if("DnsResStrategy".equals(type)) {
|
}else if("DnsResStrategy".equals(type)) {
|
||||||
@@ -3325,6 +3318,7 @@ public abstract class BaseService {
|
|||||||
ScriberIdCommGroupDao scriberIdCommGroupDao=SpringContextHolder.getBean(ScriberIdCommGroupDao.class);
|
ScriberIdCommGroupDao scriberIdCommGroupDao=SpringContextHolder.getBean(ScriberIdCommGroupDao.class);
|
||||||
DomainCommGroupDao domainCommGroupDao=SpringContextHolder.getBean(DomainCommGroupDao.class);
|
DomainCommGroupDao domainCommGroupDao=SpringContextHolder.getBean(DomainCommGroupDao.class);
|
||||||
CommonPolicyDao commonPolicyDao=SpringContextHolder.getBean(CommonPolicyDao.class);
|
CommonPolicyDao commonPolicyDao=SpringContextHolder.getBean(CommonPolicyDao.class);
|
||||||
|
//SchedulerDao schedulerDao=SpringContextHolder.getBean(SchedulerDao.class);
|
||||||
AreaIpCfgDao areaIpCfgDao=SpringContextHolder.getBean(AreaIpCfgDao.class);
|
AreaIpCfgDao areaIpCfgDao=SpringContextHolder.getBean(AreaIpCfgDao.class);
|
||||||
Set<String> ipDeletedGroups=new HashSet<>();
|
Set<String> ipDeletedGroups=new HashSet<>();
|
||||||
Set<String> urlDeletedGroups=new HashSet<>();
|
Set<String> urlDeletedGroups=new HashSet<>();
|
||||||
@@ -3362,6 +3356,7 @@ public abstract class BaseService {
|
|||||||
realGroupIds.deleteCharAt(realGroupIds.toString().length()-1);
|
realGroupIds.deleteCharAt(realGroupIds.toString().length()-1);
|
||||||
}
|
}
|
||||||
List<CfgIndexInfo> toUpdateCfgIndexInfos=new ArrayList<>();
|
List<CfgIndexInfo> toUpdateCfgIndexInfos=new ArrayList<>();
|
||||||
|
List<CfgIndexInfo> toDelSchedualCfgIndexInfos=new ArrayList<>();
|
||||||
List<CfgIndexInfo> toCancelCfgIndexInfos=new ArrayList<>();
|
List<CfgIndexInfo> toCancelCfgIndexInfos=new ArrayList<>();
|
||||||
//没有
|
//没有
|
||||||
if(StringUtils.isBlank(realGroupIds.toString())){
|
if(StringUtils.isBlank(realGroupIds.toString())){
|
||||||
@@ -3381,13 +3376,13 @@ public abstract class BaseService {
|
|||||||
Integer serviceId=cfgIndexInfo.getServiceId();
|
Integer serviceId=cfgIndexInfo.getServiceId();
|
||||||
if(serviceId!=null&&StringUtils.isNotBlank(cfgIndexInfo.getCommonGroupIds())){
|
if(serviceId!=null&&StringUtils.isNotBlank(cfgIndexInfo.getCommonGroupIds())){
|
||||||
MaatCfg maatCfg = new MaatCfg();
|
MaatCfg maatCfg = new MaatCfg();
|
||||||
Set<Integer> groupIdSet=new HashSet<>();
|
Set<Integer> groupIdSet=Collections.synchronizedSet(new HashSet<Integer>());
|
||||||
List<MaatCfg> configCompileList = new ArrayList();
|
List<MaatCfg> configCompileList = new ArrayList();
|
||||||
List<MaatCfg> cancelConfigCompileList = new ArrayList();
|
List<MaatCfg> cancelConfigCompileList = new ArrayList();
|
||||||
List<GroupCfg> groupRelationList = new ArrayList();
|
List<GroupCfg> groupRelationList = Collections.synchronizedList(new ArrayList());
|
||||||
List<IpCfg> ipRegionList = new ArrayList();
|
List<IpCfg> ipRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
List<StringCfg> strRegionList = new ArrayList();
|
List<StringCfg> strRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
List<NumBoundaryCfg> numRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
List<DigestCfg> digestRegionList = new ArrayList();
|
List<DigestCfg> digestRegionList = new ArrayList();
|
||||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||||
Map<String,Object> userRgionMap=gsonFromJson(cfgIndexInfo.getCommonGroupIds(),Map.class);
|
Map<String,Object> userRgionMap=gsonFromJson(cfgIndexInfo.getCommonGroupIds(),Map.class);
|
||||||
@@ -3405,6 +3400,7 @@ public abstract class BaseService {
|
|||||||
cfgIndexInfo.setCommonGroupIds("");
|
cfgIndexInfo.setCommonGroupIds("");
|
||||||
if(cfgIndexInfo.getIsValid()==Constants.VALID_NO){//未生效,直接更新配置,不用下发
|
if(cfgIndexInfo.getIsValid()==Constants.VALID_NO){//未生效,直接更新配置,不用下发
|
||||||
toUpdateCfgIndexInfos.add(cfgIndexInfo);
|
toUpdateCfgIndexInfos.add(cfgIndexInfo);
|
||||||
|
toDelSchedualCfgIndexInfos.add(cfgIndexInfo);
|
||||||
}else{//生效,需要取消配置
|
}else{//生效,需要取消配置
|
||||||
cfgIndexInfo.setIsValid(Constants.VALID_NO);
|
cfgIndexInfo.setIsValid(Constants.VALID_NO);
|
||||||
cfgIndexInfo.setIsAudit(Constants.AUDIT_NOT_YES);
|
cfgIndexInfo.setIsAudit(Constants.AUDIT_NOT_YES);
|
||||||
@@ -3459,47 +3455,84 @@ public abstract class BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileIds.add(cfgIndexInfo.getCompileId());
|
compileIds.add(cfgIndexInfo.getCompileId());
|
||||||
|
//多线程转换配置
|
||||||
|
ObjGroupCfgConvert ipConvert=new ObjGroupCfgConvert("ipGroup",cfgIndexInfo,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
ipConvert.setGroupRelationList(groupRelationList);
|
||||||
|
ipConvert.setIpRegionList(ipRegionList);
|
||||||
|
ipConvert.setNumRegionList(numRegionList);
|
||||||
|
ipConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert subscribeIdConvert=new ObjGroupCfgConvert("subscribeIdGroup",cfgIndexInfo,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
subscribeIdConvert.setGroupRelationList(groupRelationList);
|
||||||
|
subscribeIdConvert.setIpRegionList(ipRegionList);
|
||||||
|
subscribeIdConvert.setNumRegionList(numRegionList);
|
||||||
|
subscribeIdConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert urlConvert=new ObjGroupCfgConvert("urlGroup",cfgIndexInfo,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
urlConvert.setGroupRelationList(groupRelationList);
|
||||||
|
urlConvert.setIpRegionList(ipRegionList);
|
||||||
|
urlConvert.setNumRegionList(numRegionList);
|
||||||
|
urlConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert domainConvert=new ObjGroupCfgConvert("domainGroup",cfgIndexInfo,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
domainConvert.setGroupRelationList(groupRelationList);
|
||||||
|
domainConvert.setIpRegionList(ipRegionList);
|
||||||
|
domainConvert.setNumRegionList(numRegionList);
|
||||||
|
domainConvert.setStrRegionList(strRegionList);
|
||||||
|
Thread t1=new Thread(ipConvert);
|
||||||
|
Thread t2=new Thread(subscribeIdConvert);
|
||||||
|
Thread t3=new Thread(urlConvert);
|
||||||
|
Thread t4=new Thread(domainConvert);
|
||||||
|
t1.start();
|
||||||
|
t2.start();
|
||||||
|
t3.start();
|
||||||
|
t4.start();
|
||||||
|
try {
|
||||||
|
t1.join();
|
||||||
|
t2.join();
|
||||||
|
t3.join();
|
||||||
|
t4.join();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
logger.error("多线程join异常",e);
|
||||||
|
}
|
||||||
//子表
|
//子表
|
||||||
//IP公共分组
|
//IP公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getIpCommGroupCfgList())){
|
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getIpCommGroupCfgList())){
|
||||||
IpPortCfg cfg = new IpPortCfg();
|
// IpPortCfg cfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfgIndexInfo.getIpCommGroupCfgList(),1,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfgIndexInfo.getIpCommGroupCfgList(),1,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
// ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
// if(map.get("numRegionList")!=null){
|
||||||
numRegionList.addAll(map.get("numRegionList"));
|
// numRegionList.addAll(map.get("numRegionList"));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
//URL公共分组
|
//URL公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getUrlCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getUrlCommGroupList())){
|
||||||
CommonStringCfg cfg = new CommonStringCfg();
|
// CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getUrlCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getUrlCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
//账号公共分组
|
//账号公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getScriberIdCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getScriberIdCommGroupList())){
|
||||||
CommonStringCfg cfg = new CommonStringCfg();
|
// CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
|
//
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getScriberIdCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getScriberIdCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
//域名公共分组
|
//域名公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getDomainCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getDomainCommGroupList())){
|
||||||
CommonStringCfg cfg = new CommonStringCfg();
|
// CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
|
//
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getDomainCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getDomainCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
//构造提交综合服务参数格式
|
//构造提交综合服务参数格式
|
||||||
maatCfg.initDefaultValue();
|
maatCfg.initDefaultValue();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, maatCfg);
|
BeanUtils.copyProperties(cfgIndexInfo, maatCfg);
|
||||||
@@ -3564,15 +3597,23 @@ public abstract class BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//查询定时任务,失效定时任务
|
//查询定时任务,失效定时任务
|
||||||
// if(ids.toString().length()>0){
|
if(ids.toString().length()>0){
|
||||||
// ids.deleteCharAt(ids.toString().length()-1);
|
ids.deleteCharAt(ids.toString().length()-1);
|
||||||
// commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename());
|
commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename());
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
if(toUpdateCfgIndexInfos.size()>0){
|
if(toUpdateCfgIndexInfos.size()>0){
|
||||||
StringBuffer ids=new StringBuffer();
|
StringBuffer ids=new StringBuffer();
|
||||||
for(CfgIndexInfo info:toUpdateCfgIndexInfos){
|
for(CfgIndexInfo info:toUpdateCfgIndexInfos){
|
||||||
commonPolicyDao.updateCfgIndexCommonGroupIds(info);
|
commonPolicyDao.updateCfgIndexCommonGroupIds(info);
|
||||||
|
// if(StringUtils.isBlank(info.getCommonGroupIds())){
|
||||||
|
// ids.append(info.getCompileId()+",");
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(toDelSchedualCfgIndexInfos.size()>0){
|
||||||
|
StringBuffer ids=new StringBuffer();
|
||||||
|
for(CfgIndexInfo info:toDelSchedualCfgIndexInfos){
|
||||||
if(StringUtils.isBlank(info.getCommonGroupIds())){
|
if(StringUtils.isBlank(info.getCommonGroupIds())){
|
||||||
ids.append(info.getCompileId()+",");
|
ids.append(info.getCompileId()+",");
|
||||||
}
|
}
|
||||||
@@ -3596,7 +3637,12 @@ public abstract class BaseService {
|
|||||||
if(CollectionUtils.isNotEmpty(maatBean.getConfigCompileList())){
|
if(CollectionUtils.isNotEmpty(maatBean.getConfigCompileList())){
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("策略对象组下发配置参数:"+json);
|
if(json.length()<Constants.JSON_PRINT_LENTH) {
|
||||||
|
logger.info("策略对象组下发配置参数:" + json);
|
||||||
|
}else{
|
||||||
|
logger.info("策略对象组下发配置内容超过"+Constants.JSON_PRINT_LENTH+",不打印");
|
||||||
|
// FileUtils.writeToFile("D:\\send.json",json,false);
|
||||||
|
}
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
logger.info("策略对象组下发响应信息:"+result.getMsg());
|
logger.info("策略对象组下发响应信息:"+result.getMsg());
|
||||||
@@ -3619,36 +3665,38 @@ public abstract class BaseService {
|
|||||||
contains=false;
|
contains=false;
|
||||||
}
|
}
|
||||||
if(contains&&cfgIndexInfo.getIsValid()==Constants.VALID_YES){
|
if(contains&&cfgIndexInfo.getIsValid()==Constants.VALID_YES){
|
||||||
if("IpCommCfg".equals(clazz.getSimpleName())){
|
String commonGroupIds=userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1);
|
||||||
IpCommCfg searchCfg=new IpCommCfg();
|
if(StringUtils.isNotBlank(commonGroupIds)){
|
||||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
if("IpCommCfg".equals(clazz.getSimpleName())){
|
||||||
List commCfgs=dao.findAllList(searchCfg);
|
IpCommCfg searchCfg=new IpCommCfg();
|
||||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||||
cfgIndexInfo.setIpCommGroupCfgList(commCfgs);
|
List commCfgs=dao.findAllList(searchCfg);
|
||||||
}
|
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||||
}else if("ScriberIdCommCfg".equals(clazz.getSimpleName()) ){
|
cfgIndexInfo.setIpCommGroupCfgList(commCfgs);
|
||||||
ScriberIdCommCfg searchCfg=new ScriberIdCommCfg();
|
}
|
||||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
}else if("ScriberIdCommCfg".equals(clazz.getSimpleName()) ){
|
||||||
List commCfgs=dao.findAllList(searchCfg);
|
ScriberIdCommCfg searchCfg=new ScriberIdCommCfg();
|
||||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||||
cfgIndexInfo.setScriberIdCommGroupList(commCfgs);
|
List commCfgs=dao.findAllList(searchCfg);
|
||||||
}
|
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||||
}else if("UrlCommCfg".equals(clazz.getSimpleName())){
|
cfgIndexInfo.setScriberIdCommGroupList(commCfgs);
|
||||||
UrlCommCfg searchCfg=new UrlCommCfg();
|
}
|
||||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
}else if("UrlCommCfg".equals(clazz.getSimpleName())){
|
||||||
List commCfgs=dao.findAllList(searchCfg);
|
UrlCommCfg searchCfg=new UrlCommCfg();
|
||||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||||
cfgIndexInfo.setUrlCommGroupList(commCfgs);
|
List commCfgs=dao.findAllList(searchCfg);
|
||||||
}
|
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||||
}else if("DomainCommCfg".equals(clazz.getSimpleName())){
|
cfgIndexInfo.setUrlCommGroupList(commCfgs);
|
||||||
DomainCommCfg searchCfg=new DomainCommCfg();
|
}
|
||||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
}else if("DomainCommCfg".equals(clazz.getSimpleName())){
|
||||||
List commCfgs=dao.findAllList(searchCfg);
|
DomainCommCfg searchCfg=new DomainCommCfg();
|
||||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||||
cfgIndexInfo.setDomainCommGroupList(commCfgs);
|
List commCfgs=dao.findAllList(searchCfg);
|
||||||
|
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||||
|
cfgIndexInfo.setDomainCommGroupList(commCfgs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,11 +191,11 @@ public class DomainCommGroupService extends CrudService<CrudDao<DomainCommCfg>,
|
|||||||
serviceGroupIds = "";
|
serviceGroupIds = "";
|
||||||
for (String groupId : strings) {
|
for (String groupId : strings) {
|
||||||
Integer size = domainCommGroupDao.getCfgInfoByGroupIds(groupId);
|
Integer size = domainCommGroupDao.getCfgInfoByGroupIds(groupId);
|
||||||
if(size == 0) { // 需配置取消
|
if(size == 0) {
|
||||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.DOMAIN_OBJ_GROUP_TYPE);
|
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.DOMAIN_OBJ_GROUP_TYPE);
|
||||||
if(flag) { // 需配置更新
|
if(flag) { // 需配置取消
|
||||||
serviceGroupIds += ","+groupId;
|
serviceGroupIds += ","+groupId;
|
||||||
}else {
|
}else { // 需配置更新
|
||||||
groupIds += ","+groupId;
|
groupIds += ","+groupId;
|
||||||
}
|
}
|
||||||
}else { // 需配置更新
|
}else { // 需配置更新
|
||||||
|
|||||||
@@ -184,11 +184,11 @@ public class IpCommGroupCfgService extends BaseService {
|
|||||||
serviceGroupIds = "";
|
serviceGroupIds = "";
|
||||||
for (String groupId : strings) {
|
for (String groupId : strings) {
|
||||||
Integer size = ipCommGroupCfgDao.getCfgInfoByGroupIds(groupId);
|
Integer size = ipCommGroupCfgDao.getCfgInfoByGroupIds(groupId);
|
||||||
if(size == 0) { // 需配置取消
|
if(size == 0) {
|
||||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.IP_OBJ_GROUP_TYPE);
|
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.IP_OBJ_GROUP_TYPE);
|
||||||
if(flag) { // 需配置更新
|
if(flag) { // 需配置取消
|
||||||
serviceGroupIds += ","+groupId;
|
serviceGroupIds += ","+groupId;
|
||||||
}else {
|
}else { // 需配置更新
|
||||||
groupIds += ","+groupId;
|
groupIds += ","+groupId;
|
||||||
}
|
}
|
||||||
}else { // 需配置更新
|
}else { // 需配置更新
|
||||||
|
|||||||
@@ -191,11 +191,11 @@ public class ScriberIdCommGroupService extends CrudService<CrudDao<ScriberIdComm
|
|||||||
serviceGroupIds = "";
|
serviceGroupIds = "";
|
||||||
for (String groupId : strings) {
|
for (String groupId : strings) {
|
||||||
Integer size = scriberIdCommGroupDao.getCfgInfoByGroupIds(groupId);
|
Integer size = scriberIdCommGroupDao.getCfgInfoByGroupIds(groupId);
|
||||||
if(size == 0) { // 需配置取消
|
if(size == 0) {
|
||||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.SUBID_OBJ_GROUP_TYPE);
|
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.SUBID_OBJ_GROUP_TYPE);
|
||||||
if(flag) { // 需配置更新
|
if(flag) { // 需配置取消
|
||||||
serviceGroupIds += ","+groupId;
|
serviceGroupIds += ","+groupId;
|
||||||
}else {
|
}else { // 需配置更新
|
||||||
groupIds += ","+groupId;
|
groupIds += ","+groupId;
|
||||||
}
|
}
|
||||||
}else { // 需配置更新
|
}else { // 需配置更新
|
||||||
|
|||||||
@@ -191,11 +191,11 @@ public class UrlCommGroupService extends CrudService<CrudDao<UrlCommCfg>, UrlCom
|
|||||||
serviceGroupIds = "";
|
serviceGroupIds = "";
|
||||||
for (String groupId : strings) {
|
for (String groupId : strings) {
|
||||||
Integer size = urlCommGroupDao.getCfgInfoByGroupIds(groupId);
|
Integer size = urlCommGroupDao.getCfgInfoByGroupIds(groupId);
|
||||||
if(size == 0) { // 需配置取消
|
if(size == 0) {
|
||||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.URL_OBJ_GROUP_TYPE);
|
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.URL_OBJ_GROUP_TYPE);
|
||||||
if(flag) { // 需配置更新
|
if(flag) { // 需配置取消
|
||||||
serviceGroupIds += ","+groupId;
|
serviceGroupIds += ","+groupId;
|
||||||
}else {
|
}else { // 需配置更新
|
||||||
groupIds += ","+groupId;
|
groupIds += ","+groupId;
|
||||||
}
|
}
|
||||||
}else { // 需配置更新
|
}else { // 需配置更新
|
||||||
|
|||||||
@@ -2430,55 +2430,100 @@ public class ConfigSynchronizationService extends BaseService{
|
|||||||
List<Map<String,Object>> cfgList=(List<Map<String,Object>>)cfgMap.get(cfg.getServiceId());
|
List<Map<String,Object>> cfgList=(List<Map<String,Object>>)cfgMap.get(cfg.getServiceId());
|
||||||
Map<String,Object> maatTableMap=ConfigConvertUtil.convertCommonGroupMaatTable(cfg,cfgList);
|
Map<String,Object> maatTableMap=ConfigConvertUtil.convertCommonGroupMaatTable(cfg,cfgList);
|
||||||
Set<Integer> groupIdSet=new HashSet<>();
|
Set<Integer> groupIdSet=new HashSet<>();
|
||||||
|
//多线程转换配置
|
||||||
|
ObjGroupCfgConvert ipConvert=new ObjGroupCfgConvert("ipGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
ipConvert.setGroupRelationList(groupRelationList);
|
||||||
|
ipConvert.setIpRegionList(ipRegionList);
|
||||||
|
ipConvert.setNumRegionList(numRegionList);
|
||||||
|
ipConvert.setStrRegionList(strRegionList);
|
||||||
|
ipConvert.setIsValid(entity.getIsValid());
|
||||||
|
ipConvert.setAuditTime(entity.getAuditTime());
|
||||||
|
ObjGroupCfgConvert subscribeIdConvert=new ObjGroupCfgConvert("subscribeIdGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
subscribeIdConvert.setGroupRelationList(groupRelationList);
|
||||||
|
subscribeIdConvert.setIpRegionList(ipRegionList);
|
||||||
|
subscribeIdConvert.setNumRegionList(numRegionList);
|
||||||
|
subscribeIdConvert.setStrRegionList(strRegionList);
|
||||||
|
subscribeIdConvert.setIsValid(entity.getIsValid());
|
||||||
|
subscribeIdConvert.setAuditTime(entity.getAuditTime());
|
||||||
|
ObjGroupCfgConvert urlConvert=new ObjGroupCfgConvert("urlGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
urlConvert.setGroupRelationList(groupRelationList);
|
||||||
|
urlConvert.setIpRegionList(ipRegionList);
|
||||||
|
urlConvert.setNumRegionList(numRegionList);
|
||||||
|
urlConvert.setStrRegionList(strRegionList);
|
||||||
|
urlConvert.setIsValid(entity.getIsValid());
|
||||||
|
urlConvert.setAuditTime(entity.getAuditTime());
|
||||||
|
ObjGroupCfgConvert domainConvert=new ObjGroupCfgConvert("domainGroup",cfg,1,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
domainConvert.setGroupRelationList(groupRelationList);
|
||||||
|
domainConvert.setIpRegionList(ipRegionList);
|
||||||
|
domainConvert.setNumRegionList(numRegionList);
|
||||||
|
domainConvert.setStrRegionList(strRegionList);
|
||||||
|
domainConvert.setIsValid(entity.getIsValid());
|
||||||
|
domainConvert.setAuditTime(entity.getAuditTime());
|
||||||
|
Thread t1=new Thread(ipConvert);
|
||||||
|
Thread t2=new Thread(subscribeIdConvert);
|
||||||
|
Thread t3=new Thread(urlConvert);
|
||||||
|
Thread t4=new Thread(domainConvert);
|
||||||
|
t1.start();
|
||||||
|
t2.start();
|
||||||
|
t3.start();
|
||||||
|
t4.start();
|
||||||
|
try {
|
||||||
|
t1.join();
|
||||||
|
t2.join();
|
||||||
|
t3.join();
|
||||||
|
t4.join();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
logger.error("多线程join异常",e);
|
||||||
|
}
|
||||||
//IP公共分组
|
//IP公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
||||||
IpPortCfg _cfg = new IpPortCfg();
|
// IpPortCfg _cfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||||
_cfg.setIsValid(entity.getIsValid());
|
// _cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
// _cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
// _cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
// ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
// if(map.get("numRegionList")!=null){
|
||||||
numRegionList.addAll(map.get("numRegionList"));
|
// numRegionList.addAll(map.get("numRegionList"));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
//URL公共分组
|
//URL公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||||
_cfg.setIsValid(entity.getIsValid());
|
// _cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
// _cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
// _cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
//账号公共分组
|
//账号公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||||
_cfg.setIsValid(entity.getIsValid());
|
// _cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
// _cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
// _cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
//域名公共分组
|
//域名公共分组
|
||||||
if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId",});
|
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId",});
|
||||||
_cfg.setIsValid(entity.getIsValid());
|
// _cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
// _cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
// _cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
BeanUtils.copyProperties(cfg, maatCfg);
|
BeanUtils.copyProperties(cfg, maatCfg);
|
||||||
if(cfg.getServiceId().equals(512)){
|
if(cfg.getServiceId().equals(512)){
|
||||||
maatCfg.setAction(2);
|
maatCfg.setAction(2);
|
||||||
@@ -2514,6 +2559,7 @@ public class ConfigSynchronizationService extends BaseService{
|
|||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
if(isUpdateCfg) {
|
if(isUpdateCfg) {
|
||||||
//logger.info("配置批量下发:"+json);
|
//logger.info("配置批量下发:"+json);
|
||||||
|
// FileUtils.writeToFile("D:\\send.json",json,false);
|
||||||
//调用服务接口同步回调类配置
|
//调用服务接口同步回调类配置
|
||||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
if(result!=null){
|
if(result!=null){
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
package com.nis.web.service.configuration;
|
||||||
|
|
||||||
|
import com.nis.domain.FunctionServiceDict;
|
||||||
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
|
import com.nis.domain.configuration.CommonStringCfg;
|
||||||
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
|
import com.nis.domain.maat.MaatCfg;
|
||||||
|
import com.nis.util.ConfigConvertUtil;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class ObjGroupCfgConvert implements Runnable{
|
||||||
|
private static final Logger logger= Logger.getLogger(ObjGroupCfgConvert.class);
|
||||||
|
private CfgIndexInfo cfgIndexInfo;
|
||||||
|
private Integer isAudit;
|
||||||
|
private Map<Integer, FunctionServiceDict> serviceDictMap;
|
||||||
|
private Set<Integer> groupIdSet;
|
||||||
|
private List<MaatCfg.GroupCfg> groupRelationList;
|
||||||
|
private List<MaatCfg.IpCfg> ipRegionList;
|
||||||
|
private List<MaatCfg.StringCfg> strRegionList;
|
||||||
|
private List<MaatCfg.NumBoundaryCfg> numRegionList;
|
||||||
|
private Map<String,Object> maatTableMap;
|
||||||
|
private String groupName;
|
||||||
|
private Integer isValid;
|
||||||
|
private Date auditTime;
|
||||||
|
public ObjGroupCfgConvert(String groupName,CfgIndexInfo cfgIndexInfo,Integer isAudit,Map<Integer,FunctionServiceDict> serviceDictMap,Map<String,Object> maatTableMap,Set<Integer> groupIdSet){
|
||||||
|
this.cfgIndexInfo=cfgIndexInfo;
|
||||||
|
this.isAudit=isAudit;
|
||||||
|
this.serviceDictMap=serviceDictMap;
|
||||||
|
this.groupIdSet=groupIdSet;
|
||||||
|
this.groupName=groupName;
|
||||||
|
this.maatTableMap=maatTableMap;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try{
|
||||||
|
//IP公共分组
|
||||||
|
if("ipGroup".equalsIgnoreCase(groupName)&& CollectionUtils.isNotEmpty(cfgIndexInfo.getIpCommGroupCfgList())){
|
||||||
|
IpPortCfg cfg = new IpPortCfg();
|
||||||
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
if(isValid!=null){
|
||||||
|
cfg.setIsValid(isValid);
|
||||||
|
}
|
||||||
|
cfg.setIsAudit(isAudit);
|
||||||
|
if(auditTime!=null){
|
||||||
|
cfg.setAuditTime(auditTime);
|
||||||
|
}
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfgIndexInfo.getIpCommGroupCfgList(),1,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
ipRegionList=map.get("dstList");
|
||||||
|
if(map.get("numRegionList")!=null){
|
||||||
|
numRegionList.addAll(map.get("numRegionList"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if("urlGroup".equalsIgnoreCase(groupName)&&CollectionUtils.isNotEmpty(cfgIndexInfo.getUrlCommGroupList())){
|
||||||
|
CommonStringCfg cfg = new CommonStringCfg();
|
||||||
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
if(isValid!=null){
|
||||||
|
cfg.setIsValid(isValid);
|
||||||
|
}
|
||||||
|
cfg.setIsAudit(isAudit);
|
||||||
|
if(auditTime!=null){
|
||||||
|
cfg.setAuditTime(auditTime);
|
||||||
|
}
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getUrlCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
strRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//账号公共分组
|
||||||
|
if("subscribeIdGroup".equalsIgnoreCase(groupName)&&CollectionUtils.isNotEmpty(cfgIndexInfo.getScriberIdCommGroupList())){
|
||||||
|
CommonStringCfg cfg = new CommonStringCfg();
|
||||||
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
if(isValid!=null){
|
||||||
|
cfg.setIsValid(isValid);
|
||||||
|
}
|
||||||
|
cfg.setIsAudit(isAudit);
|
||||||
|
if(auditTime!=null){
|
||||||
|
cfg.setAuditTime(auditTime);
|
||||||
|
}
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getScriberIdCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
strRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//域名公共分组
|
||||||
|
if("domainGroup".equalsIgnoreCase(groupName)&&CollectionUtils.isNotEmpty(cfgIndexInfo.getDomainCommGroupList())){
|
||||||
|
CommonStringCfg cfg = new CommonStringCfg();
|
||||||
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
if(isValid!=null){
|
||||||
|
cfg.setIsValid(isValid);
|
||||||
|
}
|
||||||
|
cfg.setIsAudit(isAudit);
|
||||||
|
if(auditTime!=null){
|
||||||
|
cfg.setAuditTime(auditTime);
|
||||||
|
}
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getDomainCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
strRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Throwable e){
|
||||||
|
logger.error("ObjGroupCfgConvert failed",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MaatCfg.GroupCfg> getGroupRelationList() {
|
||||||
|
return groupRelationList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupRelationList(List<MaatCfg.GroupCfg> groupRelationList) {
|
||||||
|
this.groupRelationList = groupRelationList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MaatCfg.IpCfg> getIpRegionList() {
|
||||||
|
return ipRegionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpRegionList(List<MaatCfg.IpCfg> ipRegionList) {
|
||||||
|
this.ipRegionList = ipRegionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MaatCfg.StringCfg> getStrRegionList() {
|
||||||
|
return strRegionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStrRegionList(List<MaatCfg.StringCfg> strRegionList) {
|
||||||
|
this.strRegionList = strRegionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MaatCfg.NumBoundaryCfg> getNumRegionList() {
|
||||||
|
return numRegionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumRegionList(List<MaatCfg.NumBoundaryCfg> numRegionList) {
|
||||||
|
this.numRegionList = numRegionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsValid() {
|
||||||
|
return isValid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsValid(Integer isValid) {
|
||||||
|
this.isValid = isValid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getAuditTime() {
|
||||||
|
return auditTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuditTime(Date auditTime) {
|
||||||
|
this.auditTime = auditTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,8 +16,6 @@ import com.nis.web.dao.configuration.CommonPolicyDao;
|
|||||||
import com.nis.web.dao.configuration.ObjectGroupDao;
|
import com.nis.web.dao.configuration.ObjectGroupDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.BaseService;
|
import com.nis.web.service.BaseService;
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.lang.StringEscapeUtils;
|
import org.apache.commons.lang.StringEscapeUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -92,30 +90,78 @@ public class ObjectGroupService extends BaseService {
|
|||||||
}
|
}
|
||||||
entity.setIsValid(0);
|
entity.setIsValid(0);
|
||||||
entity.setIsAudit(0);
|
entity.setIsAudit(0);
|
||||||
//设置service_id
|
//设置service_id 改为从jsp页面获取
|
||||||
if("HTTPS".equalsIgnoreCase(protocolType)){
|
// if("HTTPS".equalsIgnoreCase(protocolType)){
|
||||||
if(entity.getAction().equals(1)){
|
// if(entity.getAction().equals(1)){
|
||||||
entity.setServiceId(592);
|
// entity.setServiceId(592);
|
||||||
}else if(entity.getAction().equals(16)){
|
// }else if(entity.getAction().equals(16)){
|
||||||
entity.setServiceId(576);
|
// entity.setServiceId(576);
|
||||||
}
|
// }
|
||||||
}else if("INTERCEPT".equalsIgnoreCase(protocolType)){
|
// }else if("INTERCEPT".equalsIgnoreCase(protocolType)){
|
||||||
entity.setServiceId(512);
|
// entity.setServiceId(512);
|
||||||
}else if("HTTP".equalsIgnoreCase(protocolType)){
|
// }else if("HTTP".equalsIgnoreCase(protocolType)){
|
||||||
if(entity.getAction().equals(1)){
|
// if(entity.getAction().equals(1)){
|
||||||
entity.setServiceId(129);
|
// entity.setServiceId(129);
|
||||||
}else if(entity.getAction().equals(16)){
|
// }else if(entity.getAction().equals(16)){
|
||||||
entity.setServiceId(17);
|
// entity.setServiceId(17);
|
||||||
}
|
// }
|
||||||
}else if(StringUtils.isBlank(protocolType)){
|
// }else if("MAIL".equalsIgnoreCase(protocolType)){
|
||||||
if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){
|
// if(entity.getAction().equals(1)){
|
||||||
if(entity.getAction().equals(1)){
|
// entity.setServiceId(132);
|
||||||
entity.setServiceId(128);
|
// }else if(entity.getAction().equals(16)){
|
||||||
}else if(entity.getAction().equals(16)){
|
// entity.setServiceId(20);
|
||||||
entity.setServiceId(16);
|
// }
|
||||||
}
|
// }else if("DNS".equalsIgnoreCase(protocolType)){
|
||||||
}
|
// if(entity.getAction().equals(1)){
|
||||||
}
|
// entity.setServiceId(130);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(18);
|
||||||
|
// }
|
||||||
|
// }else if("FTP".equalsIgnoreCase(protocolType)){
|
||||||
|
// if(entity.getAction().equals(1)){
|
||||||
|
// entity.setServiceId(133);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(21);
|
||||||
|
// }
|
||||||
|
// }else if("BGP".equalsIgnoreCase(protocolType)){
|
||||||
|
// if(entity.getAction().equals(1)){
|
||||||
|
// entity.setServiceId(143);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(31);
|
||||||
|
// }
|
||||||
|
// }else if("SSL".equalsIgnoreCase(protocolType)){
|
||||||
|
// if(entity.getAction().equals(1)){
|
||||||
|
// entity.setServiceId(131);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(19);
|
||||||
|
// }
|
||||||
|
// }else if("P2P".equalsIgnoreCase(protocolType)){
|
||||||
|
// if(entity.getAction().equals(1)){
|
||||||
|
// entity.setServiceId(146);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(34);
|
||||||
|
// }
|
||||||
|
// }else if("streaming_media".equalsIgnoreCase(protocolType)){
|
||||||
|
// if(entity.getAction().equals(1)){
|
||||||
|
// entity.setServiceId(151);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(39);
|
||||||
|
// }
|
||||||
|
// }else if("voip".equalsIgnoreCase(protocolType)){
|
||||||
|
// if(entity.getAction().equals(1)){
|
||||||
|
// entity.setServiceId(150);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(38);
|
||||||
|
// }
|
||||||
|
// }else if(StringUtils.isBlank(protocolType)){
|
||||||
|
// if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){
|
||||||
|
// if(entity.getAction().equals(1)){
|
||||||
|
// entity.setServiceId(128);
|
||||||
|
// }else if(entity.getAction().equals(16)){
|
||||||
|
// entity.setServiceId(16);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -144,13 +190,6 @@ public class ObjectGroupService extends BaseService {
|
|||||||
logger.info("数据保存出错");
|
logger.info("数据保存出错");
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isValid==1) {
|
|
||||||
entity.setIsAudit(1);
|
|
||||||
entity.setIsValid(1);
|
|
||||||
auditPolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//处理公共分组
|
//处理公共分组
|
||||||
if(MapUtils.isNotEmpty(entity.getUserRegion())){
|
if(MapUtils.isNotEmpty(entity.getUserRegion())){
|
||||||
@@ -180,12 +219,6 @@ public class ObjectGroupService extends BaseService {
|
|||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isValid==1) {
|
|
||||||
entity.setIsAudit(1);
|
|
||||||
entity.setIsValid(1);
|
|
||||||
auditPolicy(entity, entity.getIsAudit(), Constants.UPDATE_ACTION);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//更新UD_FLAG
|
//更新UD_FLAG
|
||||||
if(StringUtils.isNotBlank(oldCommonGroupIds)){
|
if(StringUtils.isNotBlank(oldCommonGroupIds)){
|
||||||
@@ -255,6 +288,17 @@ public class ObjectGroupService extends BaseService {
|
|||||||
}
|
}
|
||||||
//处理定时任务
|
//处理定时任务
|
||||||
handelScheduleCfg(entity, entity.getIndexTable(), entity);
|
handelScheduleCfg(entity, entity.getIndexTable(), entity);
|
||||||
|
//修复已经生效的配置添加定时任务
|
||||||
|
if(isValid==1) {
|
||||||
|
entity.setIsAudit(1);
|
||||||
|
entity.setIsValid(1);
|
||||||
|
if(entity.getCfgId()==null){
|
||||||
|
auditPolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||||
|
}else{
|
||||||
|
auditPolicy(entity, entity.getIsAudit(), Constants.UPDATE_ACTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public CfgIndexInfo getObjGroupPolicyWithoutSubCfg(Long cfgId){
|
public CfgIndexInfo getObjGroupPolicyWithoutSubCfg(Long cfgId){
|
||||||
CfgIndexInfo entity = commonPolicyDao.getPolicyById(cfgId);
|
CfgIndexInfo entity = commonPolicyDao.getPolicyById(cfgId);
|
||||||
@@ -291,8 +335,38 @@ public class ObjectGroupService extends BaseService {
|
|||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
public CfgIndexInfo getObjGroupPolicyMultyThread(Long cfgId){
|
||||||
|
CfgIndexInfo entity = commonPolicyDao.getPolicyById(cfgId);
|
||||||
|
entity.setUserRegion((Map<String,Object>)this.gsonFromJson(entity.getCommonGroupIds(),Map.class));
|
||||||
|
GetSubBeanThread GetSubBeanThread1=new GetSubBeanThread(entity,"ipGroup");
|
||||||
|
GetSubBeanThread GetSubBeanThread2=new GetSubBeanThread(entity,"subscribeIdGroup");
|
||||||
|
GetSubBeanThread GetSubBeanThread3=new GetSubBeanThread(entity,"domainGroup");
|
||||||
|
GetSubBeanThread GetSubBeanThread4=new GetSubBeanThread(entity,"urlGroup");
|
||||||
|
GetSubBeanThread1.setObjectGroupDao(objectGroupDao);
|
||||||
|
GetSubBeanThread2.setObjectGroupDao(objectGroupDao);
|
||||||
|
GetSubBeanThread3.setObjectGroupDao(objectGroupDao);
|
||||||
|
GetSubBeanThread4.setObjectGroupDao(objectGroupDao);
|
||||||
|
Thread t1= new Thread(GetSubBeanThread1);
|
||||||
|
t1.start();
|
||||||
|
Thread t2=new Thread(GetSubBeanThread2);
|
||||||
|
t2.start();
|
||||||
|
Thread t3=new Thread(GetSubBeanThread3);
|
||||||
|
t3.start();
|
||||||
|
Thread t4= new Thread(GetSubBeanThread4);
|
||||||
|
t4.start();
|
||||||
|
try {
|
||||||
|
t1.join();
|
||||||
|
t2.join();
|
||||||
|
t3.join();
|
||||||
|
t4.join();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
logger.error("多线程join异常",e);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
public void auditPolicy(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException {
|
public void auditPolicy(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException {
|
||||||
|
long start=System.currentTimeMillis(),end=System.currentTimeMillis();
|
||||||
//修改数据库审核状态信息
|
//修改数据库审核状态信息
|
||||||
entity.setTableName(CfgIndexInfo.getTablename());
|
entity.setTableName(CfgIndexInfo.getTablename());
|
||||||
entity.setIsAudit(isAudit);
|
entity.setIsAudit(isAudit);
|
||||||
@@ -303,17 +377,23 @@ public class ObjectGroupService extends BaseService {
|
|||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
MaatCfg maatCfg = new MaatCfg();
|
MaatCfg maatCfg = new MaatCfg();
|
||||||
Set<Integer> groupIdSet=new HashSet<>();
|
//确保线程安全
|
||||||
|
Set<Integer> groupIdSet=Collections.synchronizedSet(new HashSet<Integer>());
|
||||||
List<MaatCfg> configCompileList = new ArrayList();
|
List<MaatCfg> configCompileList = new ArrayList();
|
||||||
List<MaatCfg.GroupCfg> groupRelationList = new ArrayList();
|
//确保线程安全
|
||||||
List<MaatCfg.IpCfg> ipRegionList = new ArrayList();
|
List<MaatCfg.GroupCfg> groupRelationList = Collections.synchronizedList(new ArrayList<MaatCfg.GroupCfg>());
|
||||||
List<MaatCfg.StringCfg> strRegionList = new ArrayList();
|
List<MaatCfg.IpCfg> ipRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
List<MaatCfg.NumBoundaryCfg> numRegionList = new ArrayList();
|
List<MaatCfg.StringCfg> strRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
|
List<MaatCfg.NumBoundaryCfg> numRegionList = Collections.synchronizedList(new ArrayList());
|
||||||
List<MaatCfg.DigestCfg> digestRegionList = new ArrayList();
|
List<MaatCfg.DigestCfg> digestRegionList = new ArrayList();
|
||||||
List<MaatCfg.IpCfg> areaIpRegionList = new ArrayList();
|
List<MaatCfg.IpCfg> areaIpRegionList = new ArrayList();
|
||||||
|
|
||||||
//查询子配置并修改审核状态
|
//查询子配置
|
||||||
entity = this.getObjGroupPolicy(entity.getCfgId());
|
entity = this.getObjGroupPolicy(entity.getCfgId());
|
||||||
|
//多线程查询
|
||||||
|
// entity = this.getObjGroupPolicyMultyThread(entity.getCfgId());
|
||||||
|
end=System.currentTimeMillis();
|
||||||
|
logger.info("查询子配置完成,耗时"+(end-start)+"ms");
|
||||||
// if(StringUtils.isBlank(entity.getCommonGroupIds())){
|
// if(StringUtils.isBlank(entity.getCommonGroupIds())){
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
@@ -348,57 +428,98 @@ public class ObjectGroupService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//多线程转换配置
|
||||||
|
long start1=System.currentTimeMillis();
|
||||||
|
ObjGroupCfgConvert ipConvert=new ObjGroupCfgConvert("ipGroup",entity,isAudit,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
ipConvert.setGroupRelationList(groupRelationList);
|
||||||
|
ipConvert.setIpRegionList(ipRegionList);
|
||||||
|
ipConvert.setNumRegionList(numRegionList);
|
||||||
|
ipConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert subscribeIdConvert=new ObjGroupCfgConvert("subscribeIdGroup",entity,isAudit,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
subscribeIdConvert.setGroupRelationList(groupRelationList);
|
||||||
|
subscribeIdConvert.setIpRegionList(ipRegionList);
|
||||||
|
subscribeIdConvert.setNumRegionList(numRegionList);
|
||||||
|
subscribeIdConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert urlConvert=new ObjGroupCfgConvert("urlGroup",entity,isAudit,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
urlConvert.setGroupRelationList(groupRelationList);
|
||||||
|
urlConvert.setIpRegionList(ipRegionList);
|
||||||
|
urlConvert.setNumRegionList(numRegionList);
|
||||||
|
urlConvert.setStrRegionList(strRegionList);
|
||||||
|
ObjGroupCfgConvert domainConvert=new ObjGroupCfgConvert("domainGroup",entity,isAudit,serviceDictMap,maatTableMap,groupIdSet);
|
||||||
|
domainConvert.setGroupRelationList(groupRelationList);
|
||||||
|
domainConvert.setIpRegionList(ipRegionList);
|
||||||
|
domainConvert.setNumRegionList(numRegionList);
|
||||||
|
domainConvert.setStrRegionList(strRegionList);
|
||||||
|
Thread t1=new Thread(ipConvert);
|
||||||
|
Thread t2=new Thread(subscribeIdConvert);
|
||||||
|
Thread t3=new Thread(urlConvert);
|
||||||
|
Thread t4=new Thread(domainConvert);
|
||||||
|
t1.start();
|
||||||
|
t2.start();
|
||||||
|
t3.start();
|
||||||
|
t4.start();
|
||||||
|
try {
|
||||||
|
t1.join();
|
||||||
|
t2.join();
|
||||||
|
t3.join();
|
||||||
|
t4.join();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
logger.error("多线程join异常",e);
|
||||||
|
}
|
||||||
|
|
||||||
//IP公共分组
|
//IP公共分组
|
||||||
if(CollectionUtils.isNotEmpty(entity.getIpCommGroupCfgList())){
|
// if(CollectionUtils.isNotEmpty(entity.getIpCommGroupCfgList())){
|
||||||
IpPortCfg cfg = new IpPortCfg();
|
// IpPortCfg cfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
//cfg.setTableName("ip_comm_cfg");
|
// //cfg.setTableName("ip_comm_cfg");
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
// //commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
// if(isAudit==1){
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,entity.getIpCommGroupCfgList(),1,cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,entity.getIpCommGroupCfgList(),1,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
// ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
// if(map.get("numRegionList")!=null){
|
||||||
numRegionList.addAll(map.get("numRegionList"));
|
// numRegionList.addAll(map.get("numRegionList"));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//URL公共分组
|
//URL公共分组
|
||||||
if(CollectionUtils.isNotEmpty(entity.getUrlCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(entity.getUrlCommGroupList())){
|
||||||
CommonStringCfg cfg = new CommonStringCfg();
|
// CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
// //cfg.setTableName(CommonStringCfg.getTablename());
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
// //commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
// if(isAudit==1){
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getUrlCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getUrlCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//账号公共分组
|
//账号公共分组
|
||||||
if(CollectionUtils.isNotEmpty(entity.getScriberIdCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(entity.getScriberIdCommGroupList())){
|
||||||
CommonStringCfg cfg = new CommonStringCfg();
|
// CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
// //cfg.setTableName(CommonStringCfg.getTablename());
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
// //commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
// if(isAudit==1){
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getScriberIdCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getScriberIdCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//域名公共分组
|
//域名公共分组
|
||||||
if(CollectionUtils.isNotEmpty(entity.getDomainCommGroupList())){
|
// if(CollectionUtils.isNotEmpty(entity.getDomainCommGroupList())){
|
||||||
CommonStringCfg cfg = new CommonStringCfg();
|
// CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
// //cfg.setTableName(CommonStringCfg.getTablename());
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
// //commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
// if(isAudit==1){
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getDomainCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getDomainCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
// groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
// strRegionList=map.get("dstList");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
end=System.currentTimeMillis();
|
||||||
|
logger.info("配置转换完成,耗时"+(end-start1)+"ms");
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||||
@@ -412,7 +533,6 @@ public class ObjectGroupService extends BaseService {
|
|||||||
areaIpRegionList=map.get("dstList");
|
areaIpRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
maatCfg.initDefaultValue();
|
maatCfg.initDefaultValue();
|
||||||
@@ -453,16 +573,22 @@ public class ObjectGroupService extends BaseService {
|
|||||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(opAction);
|
maatBean.setOpAction(opAction);
|
||||||
|
start1=System.currentTimeMillis();
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
|
end=System.currentTimeMillis();
|
||||||
|
logger.info("json转换完成,耗时"+(end-start1)+"ms");
|
||||||
if(json.length()<Constants.JSON_PRINT_LENTH){
|
if(json.length()<Constants.JSON_PRINT_LENTH){
|
||||||
logger.info("策略对象组下发配置参数:"+json);
|
logger.info("策略对象组下发配置参数:"+json);
|
||||||
}else{
|
}else{
|
||||||
logger.info("策略对象组下发配置内容超过"+Constants.JSON_PRINT_LENTH+",不打印");
|
logger.info("策略对象组下发配置内容超过"+Constants.JSON_PRINT_LENTH+",不打印");
|
||||||
|
// FileUtils.writeToFile("D:\\send.json",json,false);
|
||||||
}
|
}
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
|
start1=System.currentTimeMillis();
|
||||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
logger.info("策略对象组下发响应信息:"+result.getMsg());
|
end=System.currentTimeMillis();
|
||||||
|
logger.info("策略对象组下发响应信息:"+result.getMsg()+",耗时"+(end-start1));
|
||||||
|
|
||||||
}else if(isAudit==3){
|
}else if(isAudit==3){
|
||||||
maatCfg.setCompileId(entity.getCompileId());
|
maatCfg.setCompileId(entity.getCompileId());
|
||||||
@@ -585,6 +711,7 @@ public class ObjectGroupService extends BaseService {
|
|||||||
StringBuffer groupIds=new StringBuffer();
|
StringBuffer groupIds=new StringBuffer();
|
||||||
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
||||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(functionId);
|
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(functionId);
|
||||||
|
Map<String,String> dicts=DictUtils.getDictMap("OBJ_GROUP_PROTOCOL");
|
||||||
for (ObjGroupCfg c : list) {
|
for (ObjGroupCfg c : list) {
|
||||||
if(!StringUtil.isBlank(c.getCommonGroupIds())) {
|
if(!StringUtil.isBlank(c.getCommonGroupIds())) {
|
||||||
Map<String,String> groupIdMap=ConfigConvertUtil.gsonFromJson(c.getCommonGroupIds(),Map.class);
|
Map<String,String> groupIdMap=ConfigConvertUtil.gsonFromJson(c.getCommonGroupIds(),Map.class);
|
||||||
@@ -600,12 +727,8 @@ public class ObjectGroupService extends BaseService {
|
|||||||
c.setActionCode(msgProp.getProperty("action_"+service.getActionCode(),"action_"+service.getActionCode()));
|
c.setActionCode(msgProp.getProperty("action_"+service.getActionCode(),"action_"+service.getActionCode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(c.getUserRegion1().equalsIgnoreCase("https")){
|
if(dicts.containsKey(c.getUserRegion1())){
|
||||||
c.setUserRegion1("HTTPS");
|
c.setUserRegion1(msgProp.getProperty(dicts.get(c.getUserRegion1()),dicts.get(c.getUserRegion1())));
|
||||||
}else if(c.getUserRegion1().equalsIgnoreCase("http")){
|
|
||||||
c.setUserRegion1("HTTP");
|
|
||||||
}else if(c.getUserRegion1().equalsIgnoreCase("intercept")){
|
|
||||||
c.setUserRegion1(msgProp.getProperty("intercept","intercept"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(groupIds.toString())){
|
if(StringUtils.isNotBlank(groupIds.toString())){
|
||||||
@@ -653,7 +776,7 @@ public class ObjectGroupService extends BaseService {
|
|||||||
List<ObjGroupCfg> list = commonPolicyDao.getObjGroupPagedList(entity);
|
List<ObjGroupCfg> list = commonPolicyDao.getObjGroupPagedList(entity);
|
||||||
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
||||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
||||||
|
Map<String,String> dicts=DictUtils.getDictMap("OBJ_GROUP_PROTOCOL");
|
||||||
for (ObjGroupCfg c : list) {
|
for (ObjGroupCfg c : list) {
|
||||||
if(StringUtils.isNotBlank(c.getCommonGroupIds())) {
|
if(StringUtils.isNotBlank(c.getCommonGroupIds())) {
|
||||||
Map<String,String> groupIdMap=ConfigConvertUtil.gsonFromJson(c.getCommonGroupIds(),Map.class);
|
Map<String,String> groupIdMap=ConfigConvertUtil.gsonFromJson(c.getCommonGroupIds(),Map.class);
|
||||||
@@ -669,12 +792,8 @@ public class ObjectGroupService extends BaseService {
|
|||||||
c.setActionCode(msgProp.getProperty("action_"+service.getActionCode(),"action_"+service.getActionCode()));
|
c.setActionCode(msgProp.getProperty("action_"+service.getActionCode(),"action_"+service.getActionCode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(c.getUserRegion1().equalsIgnoreCase("https")){
|
if(dicts.containsKey(c.getUserRegion1())){
|
||||||
c.setUserRegion1("HTTPS");
|
c.setUserRegion1(msgProp.getProperty(dicts.get(c.getUserRegion1()),dicts.get(c.getUserRegion1())));
|
||||||
}else if(c.getUserRegion1().equalsIgnoreCase("http")){
|
|
||||||
c.setUserRegion1("HTTP");
|
|
||||||
}else if(c.getUserRegion1().equalsIgnoreCase("intercept")){
|
|
||||||
c.setUserRegion1(msgProp.getProperty("intercept","intercept"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(groupIds.toString())){
|
if(StringUtils.isNotBlank(groupIds.toString())){
|
||||||
@@ -719,3 +838,56 @@ public class ObjectGroupService extends BaseService {
|
|||||||
public void saveAndSend(FunctionRegionDict regionDict, FunctionServiceDict serviceDict, List<BaseStringCfg<?>> stringCfgs) {
|
public void saveAndSend(FunctionRegionDict regionDict, FunctionServiceDict serviceDict, List<BaseStringCfg<?>> stringCfgs) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
class GetSubBeanThread implements Runnable{
|
||||||
|
private CfgIndexInfo cfgIndexInfo;
|
||||||
|
private ObjectGroupDao objectGroupDao;
|
||||||
|
private boolean isDone=false;
|
||||||
|
private boolean isCancelled=false;
|
||||||
|
private boolean mayInterruptIfRunning=false;
|
||||||
|
private String groupName;
|
||||||
|
public GetSubBeanThread(CfgIndexInfo cfgIndexInfo,String groupName){
|
||||||
|
this.cfgIndexInfo=cfgIndexInfo;
|
||||||
|
this.groupName=groupName;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
getObjGroupPolicy(groupName);
|
||||||
|
isDone=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getObjGroupPolicy(String groupName){
|
||||||
|
if(cfgIndexInfo.getUserRegion().containsKey(groupName)){
|
||||||
|
String ids=cfgIndexInfo.getUserRegion().get(groupName).toString().startsWith(",")?cfgIndexInfo.getUserRegion().get(groupName).toString().substring(1):cfgIndexInfo.getUserRegion().get(groupName).toString();
|
||||||
|
ids=ids.endsWith(",")?ids.substring(0,ids.length()-1):ids;
|
||||||
|
if("ipGroup".equalsIgnoreCase(groupName)){
|
||||||
|
List<IpCommCfg> ipList = objectGroupDao.getIpCommonList(ids,null);
|
||||||
|
// synchronized (cfgIndexInfo){
|
||||||
|
cfgIndexInfo.setIpCommGroupCfgList(ipList);
|
||||||
|
// }
|
||||||
|
}else if("subscribeIdGroup".equalsIgnoreCase(groupName)){
|
||||||
|
List<ScriberIdCommCfg> stringList=objectGroupDao.getScriberIdCommonList(ids,null);
|
||||||
|
//synchronized (cfgIndexInfo){
|
||||||
|
cfgIndexInfo.setScriberIdCommGroupList(stringList);
|
||||||
|
// }
|
||||||
|
}else if("domainGroup".equalsIgnoreCase(groupName)){
|
||||||
|
List<DomainCommCfg> stringList=objectGroupDao.getDomainCommonList(ids,null);
|
||||||
|
// synchronized (cfgIndexInfo){
|
||||||
|
cfgIndexInfo.setDomainCommGroupList(stringList);
|
||||||
|
//}
|
||||||
|
}else if("urlGroup".equalsIgnoreCase(groupName)){
|
||||||
|
List<UrlCommCfg> stringList = objectGroupDao.getUrlCommonList(ids,null);
|
||||||
|
// synchronized (cfgIndexInfo){
|
||||||
|
cfgIndexInfo.setUrlCommGroupList(stringList);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectGroupDao getObjectGroupDao() {
|
||||||
|
return objectGroupDao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setObjectGroupDao(ObjectGroupDao objectGroupDao) {
|
||||||
|
this.objectGroupDao = objectGroupDao;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1642,7 +1642,7 @@ obj_group_configuration=\u5BF9\u8C61\u7EC4\u7BA1\u7406
|
|||||||
domain_group=\u57DF\u540D\u7EC4
|
domain_group=\u57DF\u540D\u7EC4
|
||||||
url_group=URL\u7EC4
|
url_group=URL\u7EC4
|
||||||
subscribe_id_group=\u8D26\u53F7\u7EC4
|
subscribe_id_group=\u8D26\u53F7\u7EC4
|
||||||
at_least_one_group=\u8FB7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u7EC4
|
at_least_one_group=\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u7EC4
|
||||||
most_seven_group=\u81F3\u591A\u53EF\u9009\u62E9\u0037\u4E2A\u7EC4
|
most_seven_group=\u81F3\u591A\u53EF\u9009\u62E9\u0037\u4E2A\u7EC4
|
||||||
most_eight_group=\u81F3\u591A\u53EF\u9009\u62E9\u0038\u4E2A\u7EC4
|
most_eight_group=\u81F3\u591A\u53EF\u9009\u62E9\u0038\u4E2A\u7EC4
|
||||||
no_common_group=ID\u4E3A%s\u7684\u914D\u7F6E\u7F3A\u5C11\u7EC4
|
no_common_group=ID\u4E3A%s\u7684\u914D\u7F6E\u7F3A\u5C11\u7EC4
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- NTC或PROXY MAAT类配置开始 -->
|
<!-- NTC或PROXY MAAT类配置开始 -->
|
||||||
<!-- IP Whitelist -->
|
<!-- IP Whitelist -->
|
||||||
<service id="1" functionId="3" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP白名单">
|
<service id="1" functionId="3" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP白名单">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="WHITE_LIST_IP"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<!-- IP Address -->
|
<!-- IP Address -->
|
||||||
<service id="16" functionId="5" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP地址封堵">
|
<service id="16" functionId="5" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="IP地址封堵">
|
||||||
@@ -106,35 +106,35 @@
|
|||||||
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
|
<userRegion regionKey="config_id" regionColumn="compileId" userRegionPosition="1"></userRegion>
|
||||||
</service>
|
</service>
|
||||||
<service id="31" functionId="61" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="BGP封堵">
|
<service id="31" functionId="61" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="BGP封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_bgp_as_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_bgp_as_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="143" functionId="61" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="BGP监测">
|
<service id="143" functionId="61" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="BGP监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_bgp_as_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_bgp_as_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="18" functionId="7" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="DNS封堵">
|
<service id="18" functionId="7" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="DNS封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="dns_domain_cfg" ></serviceCfg>
|
<serviceCfg cfgType="3" tableName="dns_domain_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
<userRegion regionKey="DNS_STRATEGY" regionColumn="dnsStrategyId" userRegionPosition="1"></userRegion>
|
<userRegion regionKey="DNS_STRATEGY" regionColumn="dnsStrategyId" userRegionPosition="1"></userRegion>
|
||||||
</service>
|
</service>
|
||||||
<service id="130" functionId="7" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="DNS监测">
|
<service id="130" functionId="7" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="DNS监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="dns_domain_cfg" ></serviceCfg>
|
<serviceCfg cfgType="3" tableName="dns_domain_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="131" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="SSL监测">
|
<service id="131" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="SSL监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ssl_keyword_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ssl_keyword_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="19" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="SSL封堵">
|
<service id="19" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="SSL封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ssl_keyword_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ssl_keyword_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="67" functionId="6" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="URL白名单">
|
<service id="67" functionId="6" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="URL白名单">
|
||||||
<serviceCfg cfgType="2" tableName="http_url_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="http_url_cfg" ></serviceCfg>
|
||||||
@@ -180,61 +180,63 @@
|
|||||||
</service> -->
|
</service> -->
|
||||||
|
|
||||||
<service id="132" functionId="35" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件监测">
|
<service id="132" functionId="35" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="mail_keyword_cfg" ></serviceCfg>
|
<serviceCfg cfgType="3" tableName="mail_keyword_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID" ></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="20" functionId="35" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件封堵">
|
<service id="20" functionId="35" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="邮件封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="mail_keyword_cfg" ></serviceCfg>
|
<serviceCfg cfgType="3" tableName="mail_keyword_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service id="133" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP监测">
|
<service id="133" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ftp_keyword_cfg" ></serviceCfg>
|
<!--策略对象分组只用到NTC_FTP_URL,maatTable只有策略对象下发用到 -->
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ftp_keyword_cfg" maatTable="NTC_FTP_URL"></serviceCfg>
|
||||||
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="21" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP封堵">
|
<service id="21" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ftp_keyword_cfg" ></serviceCfg>
|
<!--策略对象分组只用到NTC_FTP_URL,maatTable只有策略对象下发用到 -->
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ftp_keyword_cfg" maatTable="NTC_FTP_URL"></serviceCfg>
|
||||||
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="34" functionId="510" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="P2P封堵">
|
<service id="34" functionId="510" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="P2P封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg"></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_P2P_IP"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="p2p_hash_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="p2p_hash_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="p2p_keyword_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="p2p_keyword_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
<userRegion regionKey="P2P_IP_TYPE" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
<userRegion regionKey="P2P_IP_TYPE" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||||
<userRegion regionKey="P2P_HASH_TYPE" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
|
<userRegion regionKey="P2P_HASH_TYPE" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
|
||||||
</service>
|
</service>
|
||||||
<service id="146" functionId="510" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="P2P监测">
|
<service id="146" functionId="510" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="P2P监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg"></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_P2P_IP"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="p2p_hash_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="p2p_hash_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="p2p_keyword_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="p2p_keyword_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
<userRegion regionKey="P2P_IP_TYPE" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
<userRegion regionKey="P2P_IP_TYPE" regionColumn="userRegion2" userRegionPosition="0"></userRegion>
|
||||||
<userRegion regionKey="P2P_HASH_TYPE" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
|
<userRegion regionKey="P2P_HASH_TYPE" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
|
||||||
</service>
|
</service>
|
||||||
<service id="39" functionId="22" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="流媒体封堵">
|
<service id="39" functionId="22" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="流媒体封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="av_cont_url_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="av_cont_url_cfg" maatTable="NTC_STREAMING_MEDIA_URL"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="151" functionId="22" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="流媒体监测">
|
<service id="151" functionId="22" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="流媒体监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="av_cont_url_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="av_cont_url_cfg" maatTable="NTC_STREAMING_MEDIA_URL"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="38" functionId="24" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="VOIP封堵">
|
<service id="38" functionId="24" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="VOIP封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="av_voip_account_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="av_voip_account_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="150" functionId="24" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="VOIP监测">
|
<service id="150" functionId="24" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="VOIP监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="av_voip_account_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="av_voip_account_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service id="399" functionId="52" serviceType="1" tableName="file_digest_cfg" className="FileDigestCfg" desc="文件摘要监测">
|
<service id="399" functionId="52" serviceType="1" tableName="file_digest_cfg" className="FileDigestCfg" desc="文件摘要监测">
|
||||||
@@ -435,6 +437,7 @@
|
|||||||
<serviceCfg cfgType="3" tableName="http_res_head_cfg" ></serviceCfg>
|
<serviceCfg cfgType="3" tableName="http_res_head_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="0" serviceIds="512,592,128,129" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组监测"></service>
|
<service id="0" serviceIds="512,592,128,129,130,131,132,133,143,146,150,151" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组监测"></service>
|
||||||
<service id="-1" serviceIds="576,16,17" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></service>
|
<service id="-1" serviceIds="576,16,17,18,19,20,21,31,34,38,39" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></service>
|
||||||
|
<service id="-2" serviceIds="1" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组白名单"></service>
|
||||||
</serviceList>
|
</serviceList>
|
||||||
13
src/main/resources/sql/20190701/obj_protocol.sql
Normal file
13
src/main/resources/sql/20190701/obj_protocol.sql
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#字典值
|
||||||
|
INSERT INTO `sys_data_dictionary_name`(`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`) VALUES ( '策略对象的几种协议', 'OBJ_GROUP_PROTOCOL', '', '', '2019-07-02 09:29:10', '2019-07-02 09:29:10', 1);
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'ftp', 'FTP', 'FTP协议', 6, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO`sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'dns', 'DNS', 'DNS协议', 5, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'mail', 'mail', '邮件协议', 4, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'intercept', 'intercept', 'HTTPS拦截', 3, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'https', 'HTTPS', 'HTTPS协议', 2, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'http', 'HTTP', 'HTTP协议', 1, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'bgp', 'BGP', 'BGP协议', 7, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'ssl', 'SSL', 'SSL协议', 8, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'p2p', 'P2P', 'P2P协议', 9, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'streaming_media', 'streaming_media', '流媒体协议', 10, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'voip', 'VoIP', 'VoIP协议', 11, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# HTTP(s)WhiteList 增加应答头域
|
||||||
|
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('211', 'set-cookie,Content-Type,others', '4', 'PXY_CTRL_HTTP_RES_HDR', 'HTTP应答头域替换配置', '1', '1', '3', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0,1,2', '1', '', '', '', '', '', '3', '1');
|
||||||
|
|
||||||
|
# HTTP(s)WhiteList 修改域配置排序
|
||||||
|
UPDATE function_region_dict SET config_region_sort = 4 WHERE function_id = 211 AND config_region_value = 'PXY_CTRL_IP';
|
||||||
|
UPDATE function_region_dict SET config_region_sort = 5 WHERE function_id = 211 AND config_region_value = 'PXY_CTRL_SUBSCRIBE_ID';
|
||||||
4
src/main/resources/sql/20191030/whitelist.sql
Normal file
4
src/main/resources/sql/20191030/whitelist.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# function_service_dict 加入whitelist
|
||||||
|
INSERT INTO `function_service_dict`(`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (888, 0, 128, 'whitelist', -2, 'obj_group_whitelist', NULL, 1, NULL, NULL, NULL, NULL, NULL, 0, 0, '1;0,2;0');
|
||||||
|
# OBJ_GROUP_PROTOCOL 加入whitelist
|
||||||
|
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'whitelist', 'White List', '白名单', 13, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL';
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
<example>${fns:unescapeHtml(html)}</example>
|
<example>${fns:unescapeHtml(html)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<!-- ProcessUtil -->
|
<!-- ProcessUtil wx:ProcessUtil 不存在
|
||||||
<function>
|
<function>
|
||||||
<description>根据案件状态获取标签颜色样式</description>
|
<description>根据案件状态获取标签颜色样式</description>
|
||||||
<name>getCaseStateColor</name>
|
<name>getCaseStateColor</name>
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
<function-class>com.nis.util.ProcessUtil</function-class>
|
<function-class>com.nis.util.ProcessUtil</function-class>
|
||||||
<function-signature>java.lang.String isAlarmDesc(int)</function-signature>
|
<function-signature>java.lang.String isAlarmDesc(int)</function-signature>
|
||||||
<example>${fns:isAlarmDesc(caseState)}</example>
|
<example>${fns:isAlarmDesc(caseState)}</example>
|
||||||
</function>
|
</function>-->
|
||||||
|
|
||||||
<!-- StringUtils -->
|
<!-- StringUtils -->
|
||||||
<function>
|
<function>
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
<description>获取字典Map列表</description>
|
<description>获取字典Map列表</description>
|
||||||
<name>getDictOption</name>
|
<name>getDictOption</name>
|
||||||
<function-class>com.nis.util.DictUtils</function-class>
|
<function-class>com.nis.util.DictUtils</function-class>
|
||||||
<function-signature>java.util.List getDictOption(java.lang.String)</function-signature>
|
<function-signature>java.util.Map getDictOption(java.lang.String)</function-signature>
|
||||||
<example>${fns:getDictOption(key)}</example>
|
<example>${fns:getDictOption(key)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@
|
|||||||
<description>获取特征域字典对象列表</description>
|
<description>获取特征域字典对象列表</description>
|
||||||
<name>getFeaturesDictData</name>
|
<name>getFeaturesDictData</name>
|
||||||
<function-class>com.nis.util.DictUtils</function-class>
|
<function-class>com.nis.util.DictUtils</function-class>
|
||||||
<function-signature>java.lang.String getFeaturesDictData(java.lang.String)</function-signature>
|
<function-signature>java.util.List getFeaturesDictData(java.lang.String)</function-signature>
|
||||||
<example>${fns:getFeaturesDictData(itemCode)}</example>
|
<example>${fns:getFeaturesDictData(itemCode)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
<description>根据id获取服务字典配置</description>
|
<description>根据id获取服务字典配置</description>
|
||||||
<name>getServiceDictInfoById</name>
|
<name>getServiceDictInfoById</name>
|
||||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
||||||
<function-signature>java.lang.String getServiceDictInfoById(java.lang.Integer)</function-signature>
|
<function-signature>com.nis.domain.basics.ServiceDictInfo getServiceDictInfoById(java.lang.Integer)</function-signature>
|
||||||
<example>${fns:getServiceDictInfoById(id)}</example>
|
<example>${fns:getServiceDictInfoById(id)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
@@ -341,7 +341,7 @@
|
|||||||
<description>根据id获取系统字典配置</description>
|
<description>根据id获取系统字典配置</description>
|
||||||
<name>getSysDictInfoById</name>
|
<name>getSysDictInfoById</name>
|
||||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
||||||
<function-signature>java.lang.String getSysDictInfoById(java.lang.Integer)</function-signature>
|
<function-signature>com.nis.domain.basics.SysDictInfo getSysDictInfoById(java.lang.Integer)</function-signature>
|
||||||
<example>${fns:getSysDictInfoById(id)}</example>
|
<example>${fns:getSysDictInfoById(id)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
<description>根据id获取特定服务配置</description>
|
<description>根据id获取特定服务配置</description>
|
||||||
<name>getBySpecServiceId</name>
|
<name>getBySpecServiceId</name>
|
||||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
||||||
<function-signature>java.lang.String getBySpecServiceId(java.lang.Integer)</function-signature>
|
<function-signature>com.nis.domain.specific.SpecificServiceCfg getBySpecServiceId(java.lang.Integer)</function-signature>
|
||||||
<example>${fns:getBySpecServiceId(id)}</example>
|
<example>${fns:getBySpecServiceId(id)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@
|
|||||||
<description>计算序号</description>
|
<description>计算序号</description>
|
||||||
<name>getNumberResult</name>
|
<name>getNumberResult</name>
|
||||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
||||||
<function-signature>java.lang.String getNumberResult(java.lang.Integer,java.lang.Integer,java.lang.Integer)</function-signature>
|
<function-signature>java.lang.Integer getNumberResult(java.lang.Integer,java.lang.Integer,java.lang.Integer)</function-signature>
|
||||||
<example>${fns:getNumberResult(integer1,integer2,integer3)}</example>
|
<example>${fns:getNumberResult(integer1,integer2,integer3)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@
|
|||||||
<description>取出数据类型</description>
|
<description>取出数据类型</description>
|
||||||
<name>getItemTypeByNo</name>
|
<name>getItemTypeByNo</name>
|
||||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
||||||
<function-signature>java.lang.String getItemTypeByNo(java.lang.String,java.util.List)</function-signature>
|
<function-signature>java.util.List getItemTypeByNo(java.lang.String,java.util.List)</function-signature>
|
||||||
<example>${fns:getItemTypeByNo(str1,list)}</example>
|
<example>${fns:getItemTypeByNo(str1,list)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@
|
|||||||
<description>根据compileId获取crl</description>
|
<description>根据compileId获取crl</description>
|
||||||
<name>getTrustedCrlByCerId</name>
|
<name>getTrustedCrlByCerId</name>
|
||||||
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
<function-class>com.nis.util.ConfigDictUtils</function-class>
|
||||||
<function-signature>java.util.List getTrustedCrlByCerId(java.lang.Integer)</function-signature>
|
<function-signature>java.lang.String getTrustedCrlByCerId(java.lang.Integer)</function-signature>
|
||||||
<example>${fns:getTrustedCrlByCerId(cerId)}</example>
|
<example>${fns:getTrustedCrlByCerId(cerId)}</example>
|
||||||
</function>
|
</function>
|
||||||
<!-- 根据表名取出运营商ISP标签集合 -->
|
<!-- 根据表名取出运营商ISP标签集合 -->
|
||||||
@@ -429,4 +429,12 @@
|
|||||||
<function-signature>java.util.List getASNIPNum(java.lang.Integer)</function-signature>
|
<function-signature>java.util.List getASNIPNum(java.lang.Integer)</function-signature>
|
||||||
<example>${fns:getASNIPNum(str)}</example>
|
<example>${fns:getASNIPNum(str)}</example>
|
||||||
</function>
|
</function>
|
||||||
|
<!--策略对象获取当前页面相关serviceDict-->
|
||||||
|
<function>
|
||||||
|
<description>获取字典对象列表</description>
|
||||||
|
<name>getObjGroupListServiceDicts</name>
|
||||||
|
<function-class>com.nis.util.DictUtils</function-class>
|
||||||
|
<function-signature>java.util.Map getObjGroupListServiceDicts(java.lang.Integer)</function-signature>
|
||||||
|
<example>${fns:getObjGroupListServiceDicts(key)}</example>
|
||||||
|
</function>
|
||||||
</taglib>
|
</taglib>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
data:{"grouIdAndCfgId":str,"groupType":8},
|
data:{"grouIdAndCfgId":str,"groupType":8},
|
||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -103,12 +103,15 @@
|
|||||||
|
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
|
loading('onloading');
|
||||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||||
}
|
}
|
||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{ // 未选中任何 批量
|
}else{ // 未选中任何 批量
|
||||||
|
loading('onloading');
|
||||||
|
|
||||||
var myData = {};
|
var myData = {};
|
||||||
var groupId = $("#groupId").val();
|
var groupId = $("#groupId").val();
|
||||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
@@ -118,13 +121,12 @@
|
|||||||
myData["groupId"] = groupId;
|
myData["groupId"] = groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
myAjax = $.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/domain/ajaxCheckIsLastOneCfgBatch',
|
url:'${ctx}/basics/domain/ajaxCheckIsLastOneCfgBatch',
|
||||||
data:myData,
|
data:myData,
|
||||||
async:false,
|
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -134,16 +136,23 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!canDel){
|
// myAjax异步请求完毕后执行
|
||||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
$.when(myAjax).done(function() {
|
||||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
if(!canDel){
|
||||||
}
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
if(v=="ok"){
|
}
|
||||||
$("#searchForm").attr("action",url);
|
|
||||||
page();
|
top.$.jBox.closeTip();
|
||||||
}
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
});
|
|
||||||
|
if(v=="ok"){
|
||||||
|
$("#searchForm").attr("action",url);
|
||||||
|
page();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
data:{"grouIdAndCfgId":str,"groupType":5},
|
data:{"grouIdAndCfgId":str,"groupType":5},
|
||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -104,12 +104,15 @@
|
|||||||
|
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
|
loading('onloading');
|
||||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||||
}
|
}
|
||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{ // 未选中任何 批量
|
}else{ // 未选中任何 批量
|
||||||
|
loading('onloading');
|
||||||
|
|
||||||
var myData = {};
|
var myData = {};
|
||||||
var groupId = $("#groupId").val();
|
var groupId = $("#groupId").val();
|
||||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
@@ -119,13 +122,12 @@
|
|||||||
myData["groupId"] = groupId;
|
myData["groupId"] = groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
myAjax = $.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/ip/ajaxCheckIsLastOneCfgBatch',
|
url:'${ctx}/basics/ip/ajaxCheckIsLastOneCfgBatch',
|
||||||
data:myData,
|
data:myData,
|
||||||
async:false,
|
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -135,16 +137,22 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!canDel){
|
// myAjax异步请求完毕后执行
|
||||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
$.when(myAjax).done(function() {
|
||||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
if(!canDel){
|
||||||
}
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
if(v=="ok"){
|
}
|
||||||
$("#searchForm").attr("action",url);
|
|
||||||
page();
|
top.$.jBox.closeTip();
|
||||||
}
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
});
|
if(v=="ok"){
|
||||||
|
$("#searchForm").attr("action",url);
|
||||||
|
page();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
data:{"grouIdAndCfgId":str,"groupType":9},
|
data:{"grouIdAndCfgId":str,"groupType":9},
|
||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -107,12 +107,15 @@
|
|||||||
|
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
|
loading('onloading');
|
||||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||||
}
|
}
|
||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{ // 未选中任何 批量
|
}else{ // 未选中任何 批量
|
||||||
|
loading('onloading');
|
||||||
|
|
||||||
var myData = {};
|
var myData = {};
|
||||||
var groupId = $("#groupId").val();
|
var groupId = $("#groupId").val();
|
||||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
@@ -122,13 +125,12 @@
|
|||||||
myData["groupId"] = groupId;
|
myData["groupId"] = groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
myAjax = $.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/scriberId/ajaxCheckIsLastOneCfgBatch',
|
url:'${ctx}/basics/scriberId/ajaxCheckIsLastOneCfgBatch',
|
||||||
data:myData,
|
data:myData,
|
||||||
async:false,
|
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -138,16 +140,22 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!canDel){
|
// myAjax异步请求完毕后执行
|
||||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
$.when(myAjax).done(function() {
|
||||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
if(!canDel){
|
||||||
}
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
if(v=="ok"){
|
}
|
||||||
$("#searchForm").attr("action",url);
|
|
||||||
page();
|
top.$.jBox.closeTip();
|
||||||
}
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
});
|
if(v=="ok"){
|
||||||
|
$("#searchForm").attr("action",url);
|
||||||
|
page();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
data:{"grouIdAndCfgId":str,"groupType":7},
|
data:{"grouIdAndCfgId":str,"groupType":7},
|
||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -102,12 +102,15 @@
|
|||||||
|
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
|
loading('onloading');
|
||||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||||
}
|
}
|
||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{ // 未选中任何 批量
|
}else{ // 未选中任何 批量
|
||||||
|
loading('onloading');
|
||||||
|
|
||||||
var myData = {};
|
var myData = {};
|
||||||
var groupId = $("#groupId").val();
|
var groupId = $("#groupId").val();
|
||||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
@@ -117,13 +120,12 @@
|
|||||||
myData["groupId"] = groupId;
|
myData["groupId"] = groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
myAjax = $.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/url/ajaxCheckIsLastOneCfgBatch',
|
url:'${ctx}/basics/url/ajaxCheckIsLastOneCfgBatch',
|
||||||
data:myData,
|
data:myData,
|
||||||
async:false,
|
|
||||||
success:function(data,textStatus){// 处理返回结果
|
success:function(data,textStatus){// 处理返回结果
|
||||||
if(data.length > 0){
|
if(data.length > 0 && typeof(data) == 'object'){
|
||||||
canDel = false;
|
canDel = false;
|
||||||
for(var index in data){
|
for(var index in data){
|
||||||
tipCompileIds += ","+data[index]
|
tipCompileIds += ","+data[index]
|
||||||
@@ -133,16 +135,22 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!canDel){
|
// myAjax异步请求完毕后执行
|
||||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
$.when(myAjax).done(function() {
|
||||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
if(!canDel){
|
||||||
}
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
if(v=="ok"){
|
}
|
||||||
$("#searchForm").attr("action",url);
|
|
||||||
page();
|
top.$.jBox.closeTip();
|
||||||
}
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
});
|
if(v=="ok"){
|
||||||
|
$("#searchForm").attr("action",url);
|
||||||
|
page();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<c:if test="${cfg.functionId eq 214}">
|
<c:if test="${cfg.functionId eq 214}">
|
||||||
<c:set var="interceptType" value="Ip"/>
|
<c:set var="interceptType" value="IpPayload"/>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${cfg.functionId eq 200}">
|
<c:if test="${cfg.functionId eq 200}">
|
||||||
<c:set var="interceptType" value="Ip"/>
|
<c:set var="interceptType" value="Ip"/>
|
||||||
|
|||||||
@@ -96,12 +96,12 @@ var switchKeyringType=function(){
|
|||||||
|
|
||||||
if(keyringType =='end-entity'){ //实体证书不允许输入,并且默认0
|
if(keyringType =='end-entity'){ //实体证书不允许输入,并且默认0
|
||||||
$("input[name=expireAfter]").val(0);
|
$("input[name=expireAfter]").val(0);
|
||||||
$(".expireAfter").addClass("hidden");
|
//$(".expireAfter").addClass("hidden");
|
||||||
}else{
|
}else{
|
||||||
if(expireAfter == ''){
|
if(expireAfter == ''){
|
||||||
$("input[name=expireAfter]").val(30);
|
$("input[name=expireAfter]").val(30);
|
||||||
}
|
}
|
||||||
$(".expireAfter").removeClass("hidden");
|
//$(".expireAfter").removeClass("hidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ function privateFileValidate(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row ">
|
<div class="row ">
|
||||||
<div class="col-md-6 expireAfter">
|
<div class="col-md-6 expireAfter hidden">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expire_after"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expire_after"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|||||||
@@ -313,7 +313,7 @@
|
|||||||
<th column="keyring_type" ><spring:message code="keyring_type"/></th>
|
<th column="keyring_type" ><spring:message code="keyring_type"/></th>
|
||||||
<th column="private_key_file" ><spring:message code="private_key_file"/></th>
|
<th column="private_key_file" ><spring:message code="private_key_file"/></th>
|
||||||
<th column="public_key_file" ><spring:message code="public_key_file"/></th>
|
<th column="public_key_file" ><spring:message code="public_key_file"/></th>
|
||||||
<th column="expire_after" ><spring:message code="expire_after"/></th>
|
<%--<th column="expire_after" ><spring:message code="expire_after"/></th>--%>
|
||||||
<th column="CRL" ><spring:message code="CRL"/></th>
|
<th column="CRL" ><spring:message code="CRL"/></th>
|
||||||
<th column="issuer" ><spring:message code="issuer"/></th>
|
<th column="issuer" ><spring:message code="issuer"/></th>
|
||||||
<th column="certificate_subject" ><spring:message code="certificate_subject"/></th>
|
<th column="certificate_subject" ><spring:message code="certificate_subject"/></th>
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
${fn:substring(cfg.publicKeyFile,0,20) }
|
${fn:substring(cfg.publicKeyFile,0,20) }
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>${cfg.expireAfter }</td>
|
<%--<td>${cfg.expireAfter }</td>--%>
|
||||||
<td>
|
<td>
|
||||||
<a href="${cfg.crl }" target="_blank" data-original-title="${cfg.crl }"
|
<a href="${cfg.crl }" target="_blank" data-original-title="${cfg.crl }"
|
||||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||||
|
|||||||
@@ -10,123 +10,113 @@
|
|||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
if('${_cfg.action}'!=1 && '${_cfg.action}'!=""){
|
if('${_cfg.action}'==16){
|
||||||
|
$("[name='userRegion1'] option:not([value=whitelist])").removeClass("hidden").removeClass("disabled");
|
||||||
$("[name='userRegion1'] option[value=intercept]").addClass("hidden").addClass("disabled");
|
$("[name='userRegion1'] option[value=intercept]").addClass("hidden").addClass("disabled");
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
//处理do_log
|
}else if('${_cfg.action}'==128){
|
||||||
$("[name='doLog']").each(function () {
|
$("[name='userRegion1'] option:not([value=whitelist])").addClass("hidden").addClass("disabled");
|
||||||
if($(this).val()==0){
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
$(this).parent(".radio-inline").removeClass("hidden");
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
}
|
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||||
})
|
if('${_cfg.isValid}'==1){
|
||||||
}else{
|
$("input[name=action]:not('[value=128]')").parent().addClass("hidden").addClass("disabled");
|
||||||
//处理do_log
|
}
|
||||||
$("[name='doLog']").each(function () {
|
|
||||||
if($(this).val()==0){
|
|
||||||
$(this).parent(".radio-inline").addClass("hidden");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if('${_cfg.userRegion1}'=='intercept'){
|
if('${_cfg.userRegion1}'=='intercept'){
|
||||||
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||||
//处理do_log
|
}else if('${_cfg.userRegion1}'=='https'||'${_cfg.userRegion1}'=='http'||'${_cfg.userRegion1}'=='ftp'||'${_cfg.userRegion1}'=='streaming_media'){
|
||||||
$(".doLog").addClass("hidden");
|
|
||||||
$("[name='doLog']").find("[value=2]").prop("checked",true);
|
|
||||||
}else if('${_cfg.userRegion1}'=='https'||'${_cfg.userRegion1}'=='http'){
|
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||||
}else if("${_cfg.userRegion1}"==""){
|
}else if("${_cfg.userRegion1}"==""||"${_cfg.userRegion1}"=="bgp"){
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
}else if($("[name=userRegion1]").val()!="intercept"){
|
}else if($("[name=userRegion1]").val()=="mail"||$("[name=userRegion1]").val()=="dns"||$("[name=userRegion1]").val()=="ssl"||$("[name=userRegion1]").val()=="p2p"||$("[name=userRegion1]").val()=="voip"){
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
}
|
}
|
||||||
|
changeServiceId();
|
||||||
|
var serviceId=$("[name='serviceId']").val();
|
||||||
|
var configDoLog=$("#serviceId_"+serviceId).attr("configDoLog");
|
||||||
|
processDoLog(configDoLog);
|
||||||
$(".action").on("change", function() {
|
$(".action").on("change", function() {
|
||||||
$("#serviceId").val($(this).attr("serviceId"));
|
//$("#serviceId").val($(this).attr("serviceId"));
|
||||||
$("#protocolId").val($(this).attr("protocolId"));
|
$("#protocolId").val($(this).attr("protocolId"));
|
||||||
|
|
||||||
var action=$("input[name='action']:checked").val();
|
var action=$("input[name='action']:checked").val();
|
||||||
switchAction(action);
|
switchAction(action);
|
||||||
processDoLog($(this).attr("configDoLog"));
|
|
||||||
//处理页面协议
|
//处理页面协议
|
||||||
if($(this).val()!="1"){
|
if($(this).val()=="16"){
|
||||||
if($("[name='userRegion1']").val()=="intercept"){
|
$("[name='userRegion1'] option:not([value=whitelist])").removeClass("hidden").removeClass("disabled");
|
||||||
$("[name='userRegion1']").selectpicker("val","https");
|
if($("[name='userRegion1']").val()=="intercept"||$("[name='userRegion1']").val()=="whitelist"){//拦截隐藏
|
||||||
|
$("[name='userRegion1']").selectpicker("val","");
|
||||||
$("[name='userRegion1']").change();
|
$("[name='userRegion1']").change();
|
||||||
}
|
}
|
||||||
$("[name='userRegion1'] option[value=intercept]").addClass("hidden").addClass("disabled");
|
$("[name='userRegion1'] option[value=intercept]").addClass("hidden").addClass("disabled");
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
}else{
|
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||||
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
|
|
||||||
|
}else if($(this).val()=="1"){
|
||||||
|
$("[name='userRegion1'] option:not([value=whitelist])").removeClass("hidden").removeClass("disabled");
|
||||||
$("[name='userRegion1'] option[value=intercept]").removeClass("hidden").removeClass("disabled");
|
$("[name='userRegion1'] option[value=intercept]").removeClass("hidden").removeClass("disabled");
|
||||||
|
if($("[name='userRegion1']").val()=="whitelist"){
|
||||||
|
$("[name='userRegion1']").selectpicker("val","");
|
||||||
|
$("[name='userRegion1']").change();
|
||||||
|
}
|
||||||
if($("[name='userRegion1']").val()=="intercept"){
|
if($("[name='userRegion1']").val()=="intercept"){
|
||||||
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
||||||
//处理do_log
|
|
||||||
$(".doLog").addClass("hidden");
|
|
||||||
$("[name='doLog']").each(function () {
|
|
||||||
if($(this).val()==2){
|
|
||||||
$(this).prop("checked",true);
|
|
||||||
}else{
|
|
||||||
$(this).removeAttr("checked");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
}else{
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
//处理do_log
|
|
||||||
$(".doLog").removeClass("hidden");
|
|
||||||
}
|
}
|
||||||
|
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||||
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
|
}else{// 128
|
||||||
|
$("[name='userRegion1'] option:not([value=whitelist])").addClass("hidden").addClass("disabled");
|
||||||
|
$("[name='userRegion1']").selectpicker('val','whitelist');
|
||||||
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
|
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||||
}
|
}
|
||||||
$("[name='userRegion1']").selectpicker("refresh");
|
$("[name='userRegion1']").selectpicker("refresh");
|
||||||
|
changeServiceId();
|
||||||
|
var serviceId=$("[name='serviceId']").val();
|
||||||
|
var configDoLog=$("#serviceId_"+serviceId).attr("configDoLog");
|
||||||
|
processDoLog(configDoLog);
|
||||||
});
|
});
|
||||||
$("[name='userRegion1']").on("change",function () {
|
$("[name='userRegion1']").on("change",function () {
|
||||||
if("intercept"==$(this).val()){
|
if("intercept"==$(this).val()){
|
||||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
||||||
//处理do_log
|
}else if("https"==$(this).val()||"http"==$(this).val()||"ftp"==$(this).val()||"streaming_media"==$(this).val()){
|
||||||
$(".doLog").addClass("hidden");
|
|
||||||
$("[name='doLog']").each(function () {
|
|
||||||
if($(this).val()==2){
|
|
||||||
$(this).prop("checked",true);
|
|
||||||
}else{
|
|
||||||
$(this).removeAttr("checked");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else if("https"==$(this).val()){
|
|
||||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
//处理do_log
|
}else if(""==$(this).val()||"bgp"==$(this).val()||'whitelist'==$(this).val()){
|
||||||
$(".doLog").removeClass("hidden");
|
|
||||||
}else if("http"==$(this).val()){
|
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
|
||||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
|
||||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
|
||||||
//处理do_log
|
|
||||||
$(".doLog").removeClass("hidden");
|
|
||||||
}else if(""==$(this).val()){
|
|
||||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
//处理do_log
|
}else if("mail"==$(this).val()||"dns"==$(this).val()||"ssl"==$(this).val()||"p2p"==$(this).val()||"voip"==$(this).val()){
|
||||||
$(".doLog").removeClass("hidden");
|
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||||
}else{
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
|
}else {
|
||||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
||||||
//处理do_log
|
|
||||||
$(".doLog").removeClass("hidden");
|
|
||||||
}
|
}
|
||||||
|
changeServiceId();
|
||||||
|
var serviceId=$("[name='serviceId']").val();
|
||||||
|
var configDoLog=$("#serviceId_"+serviceId).attr("configDoLog");
|
||||||
|
processDoLog(configDoLog);
|
||||||
})
|
})
|
||||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
|
||||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
|
||||||
|
|
||||||
$("#cfgFrom").validate({
|
$("#cfgFrom").validate({
|
||||||
errorPlacement: function(error,element){
|
errorPlacement: function(error,element){
|
||||||
@@ -162,7 +152,10 @@ $(function(){
|
|||||||
top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}else{
|
}else{
|
||||||
if($("[name='userRegion1']").val()=="http"&&ipGroupLen>0){
|
if(($("[name='userRegion1']").val()=="http"||$("[name='userRegion1']").val()=="mail"||
|
||||||
|
$("[name='userRegion1']").val()=="dns"||$("[name='userRegion1']").val()=="ftp"||
|
||||||
|
$("[name='userRegion1']").val()=="bgp"||$("[name='userRegion1']").val()=="ssl"||
|
||||||
|
$("[name='userRegion1']").val()=="streaming_media"||$("[name='userRegion1']").val()=="voip")&&ipGroupLen>0){
|
||||||
if(grouplen>7){
|
if(grouplen>7){
|
||||||
top.$.jBox.tip("<spring:message code='most_seven_group'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='most_seven_group'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
@@ -177,6 +170,23 @@ $(function(){
|
|||||||
flag=flag1;
|
flag=flag1;
|
||||||
}
|
}
|
||||||
if(flag){
|
if(flag){
|
||||||
|
if($("[name='userRegion1']").val()=="dns"&&$("[name='action']:checked").val()==16){
|
||||||
|
var flag2 = true;
|
||||||
|
var url = "${ctx}/cfg/dnsIp/dnsNoStrategyCheck";
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
async:false,
|
||||||
|
url: url,
|
||||||
|
data:{"dnsStrategyId":0},
|
||||||
|
success:function(data){
|
||||||
|
flag2 = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if(!flag2){
|
||||||
|
top.$.jBox.tip($.validator.messages.noStrategyCheck, "<spring:message code='info'/>");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
//将disable属性的元素删除
|
//将disable属性的元素删除
|
||||||
$(".disabled").each(function(){
|
$(".disabled").each(function(){
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
@@ -206,7 +216,66 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||||
$("." + addBtnClassName).removeClass("hidden");
|
$("." + addBtnClassName).removeClass("hidden");
|
||||||
}
|
}
|
||||||
|
var changeServiceId=function () {
|
||||||
|
var action=$("[name='action']:checked").val();
|
||||||
|
var protocolType=$("[name='userRegion1']").val();
|
||||||
|
if(1==action){
|
||||||
|
//512,592,128,129,130,131,132,133,143,146,150,151
|
||||||
|
if(""==protocolType){
|
||||||
|
|
||||||
|
$("#serviceId").val(128);
|
||||||
|
}else if("https"==protocolType){
|
||||||
|
$("#serviceId").val(592);
|
||||||
|
}else if("http"==protocolType){
|
||||||
|
$("#serviceId").val(129);
|
||||||
|
}else if("mail"==protocolType){
|
||||||
|
$("#serviceId").val(132);
|
||||||
|
}else if("dns"==protocolType){
|
||||||
|
$("#serviceId").val(130);
|
||||||
|
}else if("ftp"==protocolType){
|
||||||
|
$("#serviceId").val(133);
|
||||||
|
}else if("bgp"==protocolType){
|
||||||
|
$("#serviceId").val(143);
|
||||||
|
}else if("ssl"==protocolType){
|
||||||
|
$("#serviceId").val(131);
|
||||||
|
}else if("p2p"==protocolType){
|
||||||
|
$("#serviceId").val(146);
|
||||||
|
}else if("streaming_media"==protocolType){
|
||||||
|
$("#serviceId").val(151);
|
||||||
|
}else if("voip"==protocolType){
|
||||||
|
$("#serviceId").val(150);
|
||||||
|
}else if("intercept"==protocolType){
|
||||||
|
$("#serviceId").val(512);
|
||||||
|
}
|
||||||
|
}else if(16==action){
|
||||||
|
//576,16,17,18,19,20,21,31,34,38,39
|
||||||
|
if(""==protocolType){
|
||||||
|
$("#serviceId").val(16);
|
||||||
|
}else if("https"==protocolType){
|
||||||
|
$("#serviceId").val(576);
|
||||||
|
}else if("http"==protocolType){
|
||||||
|
$("#serviceId").val(17);
|
||||||
|
}else if("mail"==protocolType){
|
||||||
|
$("#serviceId").val(20);
|
||||||
|
}else if("dns"==protocolType){
|
||||||
|
$("#serviceId").val(18);
|
||||||
|
}else if("ftp"==protocolType){
|
||||||
|
$("#serviceId").val(21);
|
||||||
|
}else if("bgp"==protocolType){
|
||||||
|
$("#serviceId").val(31);
|
||||||
|
}else if("ssl"==protocolType){
|
||||||
|
$("#serviceId").val(19);
|
||||||
|
}else if("p2p"==protocolType){
|
||||||
|
$("#serviceId").val(34);
|
||||||
|
}else if("streaming_media"==protocolType){
|
||||||
|
$("#serviceId").val(39);
|
||||||
|
}else if("voip"==protocolType){
|
||||||
|
$("#serviceId").val(38);
|
||||||
|
}
|
||||||
|
}else if(128==action){
|
||||||
|
$("#serviceId").val(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -235,7 +304,10 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||||
<input type="hidden" id="commonGroupIds" name="commonGroupIds" value='${_cfg.commonGroupIds}'>
|
<input type="hidden" id="commonGroupIds" name="commonGroupIds" value='${_cfg.commonGroupIds}'>
|
||||||
|
<c:forEach items="${fns:getObjGroupListServiceDicts(_cfg.functionId)}" var="entry" varStatus="status">
|
||||||
|
<input type="hidden" id="${'serviceId_'.concat(entry.key)}" value="${entry.key}" configDoLog="${entry.value['configDoLog']}">
|
||||||
|
</c:forEach>
|
||||||
<%--<input type="hidden" id="exprType" name="exprType" value="0">
|
<%--<input type="hidden" id="exprType" name="exprType" value="0">
|
||||||
<input type="hidden" id="matchMethod" name="matchMethod" value="0">
|
<input type="hidden" id="matchMethod" name="matchMethod" value="0">
|
||||||
<input type="hidden" id="isHexbin" name="isHexbin" value="0">--%>
|
<input type="hidden" id="isHexbin" name="isHexbin" value="0">--%>
|
||||||
@@ -342,9 +414,18 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="userRegion1" data-live-search="true" class="selectpicker form-control">
|
<select name="userRegion1" data-live-search="true" class="selectpicker form-control">
|
||||||
<option value="" <c:if test="${_cfg.userRegion1 eq ''}">selected</c:if>> <spring:message code="select"/></option>
|
<option value="" <c:if test="${_cfg.userRegion1 eq ''}">selected</c:if>> <spring:message code="select"/></option>
|
||||||
<%-- <option value="https" <c:if test="${_cfg.userRegion1 eq 'https'}">selected</c:if>><spring:message code="HTTPS"/></option>
|
<c:forEach items="${fns:getDictList('OBJ_GROUP_PROTOCOL')}" var="protocol">
|
||||||
<option value="intercept" <c:if test="${_cfg.userRegion1 eq 'intercept'}">selected</c:if>> <spring:message code="intercept"/></option>--%>
|
<c:choose>
|
||||||
<option value="http" <c:if test="${_cfg.userRegion1 eq 'http'}">selected</c:if>> <spring:message code="HTTP"/></option>
|
<c:when test="${protocol.itemCode eq 'https'}"></c:when>
|
||||||
|
<c:when test="${protocol.itemCode eq 'intercept'}"></c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<option value="${protocol.itemCode}" <c:if test="${_cfg.userRegion1 eq protocol.itemCode}">selected</c:if>> <spring:message code="${protocol.itemValue}"/></option>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</c:forEach>
|
||||||
|
<%--<option value="https" <c:if test="${_cfg.userRegion1 eq 'https'}">selected</c:if>><spring:message code="HTTPS"/></option>
|
||||||
|
<option value="intercept" <c:if test="${_cfg.userRegion1 eq 'intercept'}">selected</c:if>> <spring:message code="intercept"/></option>
|
||||||
|
<option value="http" <c:if test="${_cfg.userRegion1 eq 'http'}">selected</c:if>> <spring:message code="HTTP"/></option>--%>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -428,7 +428,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<sys:message content="${message}" type="${messageType }"/>
|
<sys:message content="${message}" type="${messageType }"/>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap commonGroup">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||||
@@ -482,9 +482,9 @@
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:if test="${cfg.userRegion1 eq 'http'}">HTTP</c:if>
|
<c:forEach items="${fns:getDictList('OBJ_GROUP_PROTOCOL')}" var="protocol">
|
||||||
<c:if test="${cfg.userRegion1 eq 'https'}">HTTPS</c:if>
|
<c:if test="${cfg.userRegion1 eq protocol.itemCode}"><spring:message code="${protocol.itemValue}"/></c:if>
|
||||||
<c:if test="${cfg.userRegion1 eq 'intercept'}"><spring:message code="intercept"/></c:if>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td commonGroupIds='${cfg.commonGroupIds}'>${fn:substring(cfg.userRegion.ipGroup,1,fn:length(cfg.userRegion.ipGroup)-1)}</td>
|
<td commonGroupIds='${cfg.commonGroupIds}'>${fn:substring(cfg.userRegion.ipGroup,1,fn:length(cfg.userRegion.ipGroup)-1)}</td>
|
||||||
<td subscribeIdGroup>${fn:substring(cfg.userRegion.subscribeIdGroup,1,fn:length(cfg.userRegion.subscribeIdGroup)-1)}</td>
|
<td subscribeIdGroup>${fn:substring(cfg.userRegion.subscribeIdGroup,1,fn:length(cfg.userRegion.subscribeIdGroup)-1)}</td>
|
||||||
|
|||||||
@@ -120,17 +120,13 @@
|
|||||||
$("select[name='httpResHdrList[0].district']").selectpicker("refresh");
|
$("select[name='httpResHdrList[0].district']").selectpicker("refresh");
|
||||||
|
|
||||||
// 域配置隐藏/显示
|
// 域配置隐藏/显示
|
||||||
if(selValue == 48){ // Redirect 隐藏响应体
|
if(selValue == 80){ // Replace 隐藏请求响应体
|
||||||
$(".resBodyCfg").addClass("hidden");
|
|
||||||
addContent(this,'httpUrlTab');
|
|
||||||
}else if(selValue == 80){ // Replace 隐藏请求响应体
|
|
||||||
$(".reqBodyCfg").addClass("hidden");
|
$(".reqBodyCfg").addClass("hidden");
|
||||||
$(".resBodyCfg").addClass("hidden");
|
$(".resBodyCfg").addClass("hidden");
|
||||||
}else if(selValue == 85 || selValue == 90){ // Hijack/Insert 隐藏请求头、请求体和响应体
|
}else if(selValue == 85 || selValue == 90){ // Hijack/Insert 隐藏请求头、请求体和响应体
|
||||||
$(".reqHdrCfg").addClass("hidden");
|
$(".reqHdrCfg").addClass("hidden");
|
||||||
$(".resBodyCfg").addClass("hidden");
|
$(".resBodyCfg").addClass("hidden");
|
||||||
$(".reqBodyCfg").addClass("hidden");
|
$(".reqBodyCfg").addClass("hidden");
|
||||||
$(".ntcSubscribeIdCfgCfg").addClass("hidden");
|
|
||||||
// 且响应头匹配区域只能为Content-Type
|
// 且响应头匹配区域只能为Content-Type
|
||||||
$("select[name='httpResHdrList[0].district']").find("option").each(function(){
|
$("select[name='httpResHdrList[0].district']").find("option").each(function(){
|
||||||
if($(this).val() != "Content-Type"){
|
if($(this).val() != "Content-Type"){
|
||||||
@@ -197,6 +193,9 @@
|
|||||||
getFileInfo("profileSelId",$(".profileSelDiv").attr("source"));
|
getFileInfo("profileSelId",$(".profileSelDiv").attr("source"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// URL域必选(打开URL域并隐藏关闭按钮)
|
||||||
|
addContent(document.getElementById("httpUrlAddButton"),'httpUrlTab');
|
||||||
|
$(".httpUrlTab0").find("span[title='remove']").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
var getFileInfo = function(selectId,source){
|
var getFileInfo = function(selectId,source){
|
||||||
@@ -255,9 +254,6 @@
|
|||||||
var delContent = function(contentClassName, addBtnClassName) {
|
var delContent = function(contentClassName, addBtnClassName) {
|
||||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||||
$("." + addBtnClassName).removeClass("hidden");
|
$("." + addBtnClassName).removeClass("hidden");
|
||||||
if($(".userRegion5:checked").val()==48){
|
|
||||||
addContent(this,"httpUrlTab");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
@@ -433,7 +429,7 @@
|
|||||||
<spring:message code="http_url_title" />
|
<spring:message code="http_url_title" />
|
||||||
<small> <span
|
<small> <span
|
||||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
onClick="addContent(this,'${tabName}')" title="add" id="httpUrlAddButton"></span></small>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<%-- <c:set var="regionValue" value="${_cfg.httpUrl.cfgType}"></c:set> --%>
|
<%-- <c:set var="regionValue" value="${_cfg.httpUrl.cfgType}"></c:set> --%>
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-12" style="padding-top: 3px;">
|
<div class="col-md-12" style="padding-top: 3px;">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="control-label col-md-3 form-control" style="width: max-content;">
|
<div class="control-label col-md-3 form-control" style="width: auto;">
|
||||||
<spring:message code="time_granularity" />
|
<spring:message code="time_granularity" />
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left" style="margin-left: 5px;">
|
<div class="pull-left" style="margin-left: 5px;">
|
||||||
|
|||||||
@@ -317,11 +317,10 @@ $(document).ready(function(){
|
|||||||
<spring:message code="block_drop"/>
|
<spring:message code="block_drop"/>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
|
<c:set var="actions">${dict.itemValue}</c:set>
|
||||||
<spring:message code="${actions}"/>
|
<spring:message code="${actions}"/>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
|
|
||||||
<c:set var="actions">${dict.itemValue}</c:set>
|
|
||||||
</c:if>
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ $(function(){
|
|||||||
}
|
}
|
||||||
$(".action").on("change",function(){
|
$(".action").on("change",function(){
|
||||||
var _doLog=$(this).attr("configDoLog");
|
var _doLog=$(this).attr("configDoLog");
|
||||||
if(_doLog&&_doLog!=""){
|
var functionId=$("[name='functionId']").val();
|
||||||
|
//888为策略对象策略,比较特殊
|
||||||
|
if(_doLog&&_doLog!=""&&888!=functionId){
|
||||||
processDoLog(_doLog);
|
processDoLog(_doLog);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -229,12 +229,7 @@ function profileChange(val){
|
|||||||
|
|
||||||
// 根据动作隐藏配置域,若该域隐藏前已被选中则默认选中首个
|
// 根据动作隐藏配置域,若该域隐藏前已被选中则默认选中首个
|
||||||
var resetFlag = false;
|
var resetFlag = false;
|
||||||
if(val == 48){
|
if(val == 80){
|
||||||
if($(resBodyInput).prop("checked") == true){
|
|
||||||
resetFlag = true;
|
|
||||||
}
|
|
||||||
$(resBodyInput).parents("label:first").hide();
|
|
||||||
}else if(val == 80){
|
|
||||||
if($(reqBodyInput).prop("checked") == true || $(resBodyInput).prop("checked") == true){
|
if($(reqBodyInput).prop("checked") == true || $(resBodyInput).prop("checked") == true){
|
||||||
resetFlag = true;
|
resetFlag = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user