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 |
@@ -1,7 +1 @@
|
||||
630上线内容版本:
|
||||
|
||||
1、统计整合为一个模块儿
|
||||
|
||||
2、object-list-group HTTP和代理
|
||||
|
||||
3、代理新功能;
|
||||
在公共分组功能逻辑完善之前,此分支为ntc界面系统的全集上线升级分支合并版。
|
||||
@@ -26,7 +26,7 @@ public class ProxyObjKeyring {
|
||||
private String privateKeyFile;
|
||||
@Expose
|
||||
private String publicKeyFile;
|
||||
@Expose
|
||||
//@Expose
|
||||
private Integer expireAfter;
|
||||
@Expose
|
||||
private String publicKeyAlgo;
|
||||
|
||||
@@ -833,6 +833,8 @@ public class ConfigConvertUtil {
|
||||
return gsonToJson(userRegionMap);
|
||||
}else if(serviceId.equals(592)){
|
||||
return "{}";
|
||||
}else if(serviceId.equals(18)){
|
||||
return "DNS_STRATEGY=0";
|
||||
}else{
|
||||
return "0";
|
||||
}
|
||||
@@ -927,6 +929,13 @@ public class ConfigConvertUtil {
|
||||
}
|
||||
return dictMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 策略对象Obj list group估算ip range需要获取的region id数量
|
||||
* @param srcList
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T>List<Integer> calRangeIps(List<T> srcList ){
|
||||
List<Integer> regionIdsList=new ArrayList<>();
|
||||
int total=0;
|
||||
@@ -976,7 +985,8 @@ public class ConfigConvertUtil {
|
||||
return regionIdsList;
|
||||
}
|
||||
}
|
||||
if(total>0){
|
||||
//拆分IP数量大于1获取ID
|
||||
if(total>1){
|
||||
regionIdsList=ConfigServiceUtil.getId(3,total);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,5 +437,24 @@ public class DictUtils {
|
||||
}
|
||||
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.basics.*;
|
||||
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.lang3.StringEscapeUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -141,7 +143,7 @@ public class SchedulerTaskUtil {
|
||||
//查询子域配置详情
|
||||
if(cfgList!=null){
|
||||
if(isCommonGroup){
|
||||
groupIdSet=new HashSet<>();
|
||||
groupIdSet=Collections.synchronizedSet(new HashSet<Integer>());
|
||||
commGroupMap=ConfigConvertUtil.gsonFromJson(list.get(0).getCommonGroupIds(),Map.class);
|
||||
//将组中的域设置到cfg_index_info中
|
||||
covertCommongroupIdsMap(commGroupMap,"ipGroup",list.get(0),configSynchronizationDao,IpCommCfg.class);
|
||||
@@ -195,10 +197,10 @@ public class SchedulerTaskUtil {
|
||||
entity.setIsValid(isValid);//将最新的配置状态赋给配置对象
|
||||
entity.setAuditTime(updateTime);
|
||||
for(CfgIndexInfo cfg:list){
|
||||
groupRelationList = new ArrayList();
|
||||
ipRegionList = new ArrayList();
|
||||
strRegionList = new ArrayList();
|
||||
numRegionList = new ArrayList();
|
||||
groupRelationList = Collections.synchronizedList(new ArrayList());
|
||||
ipRegionList = Collections.synchronizedList(new ArrayList());
|
||||
strRegionList = Collections.synchronizedList(new ArrayList());
|
||||
numRegionList =Collections.synchronizedList(new ArrayList());
|
||||
digestRegionList = new ArrayList();
|
||||
areaIpRegionList = new ArrayList();
|
||||
if(StringUtils.isNotBlank(cfg.getCommonGroupIds())){//公共分组
|
||||
@@ -207,45 +209,82 @@ public class SchedulerTaskUtil {
|
||||
userRegion.append(ConfigConvertUtil.generateCommonGroupDefaultUserRegion(null,cfg.getServiceId()));
|
||||
//子配置
|
||||
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公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
||||
IpPortCfg _cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.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(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
||||
// IpPortCfg _cfg = new IpPortCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// ipRegionList=map.get("dstList");
|
||||
// if(map.get("numRegionList")!=null){
|
||||
// numRegionList.addAll(map.get("numRegionList"));
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//URL公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
||||
CommonStringCfg _cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
||||
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
//账号公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
||||
CommonStringCfg _cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
||||
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
//
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
//
|
||||
// }
|
||||
//域名公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
||||
CommonStringCfg _cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
||||
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||
//
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
BeanUtils.copyProperties(cfg, maatCfg);
|
||||
if(cfg.getServiceId().equals(512)){
|
||||
maatCfg.setAction(2);
|
||||
@@ -1034,7 +1073,7 @@ public class SchedulerTaskUtil {
|
||||
logger.info("定时器修改配置状态:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("定时器修改配置状态响应时间:"+result.getMsg());
|
||||
logger.info("定时器修改配置状态响应:"+result.getMsg());
|
||||
}
|
||||
|
||||
}else if("2".equals(serviceType)){//回调类配置
|
||||
|
||||
@@ -302,7 +302,7 @@ public class ExportExcel {
|
||||
}
|
||||
}
|
||||
/*** 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="";
|
||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("CONTROL_REPLACE_ZONE");
|
||||
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.SysDataDictionaryItem;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ObjGroupCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.CallExternalProceduresException;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.*;
|
||||
|
||||
@@ -492,23 +492,24 @@ public class HttpRedirectPolicyController extends BaseController {
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
titleList.add("NTC_HTTP_REQ_HDR");
|
||||
titleList.add("NTC_HTTP_RES_HDR");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
|
||||
if (entity.getFunctionId() != 211) {
|
||||
titleList.add("NTC_HTTP_RES_HDR");
|
||||
titleList.add("NTC_HTTP_REQ_BODY");
|
||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
if (entity.getFunctionId() != 208) {
|
||||
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_REQ_BODY");
|
||||
titleList.add("NTC_HTTP_RES_BODY");
|
||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.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_REQ_BODY", httpReqBodyCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_SUBSCRIBE_ID");
|
||||
|
||||
@@ -231,7 +231,6 @@ public class PxyObjKeyringController extends BaseController {
|
||||
ResponseData data = result.getData();
|
||||
publicKeyFileAccessUrl = data.getAccessUrl();
|
||||
cfg.setPublicKeyFile(publicKeyFileAccessUrl);
|
||||
;
|
||||
}
|
||||
}
|
||||
if (privateKeyFileI != null) {
|
||||
@@ -510,7 +509,7 @@ public class PxyObjKeyringController extends BaseController {
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
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) {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class P2pLogController extends BaseController {
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_P2P_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
logger.error("查询结果:" + recv);
|
||||
// logger.error("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcP2pLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcP2pLog>>() {
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
AND r.group_id in(${commonGroupIds})
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
<!--${sqlMap.dsf}-->
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
@@ -642,87 +642,87 @@
|
||||
AND r.group_id in(${commonGroupIds})
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="getGroupIds" parameterType="com.nis.domain.basics.IpCommCfg" resultMap="IpCommGroupCfgMap">
|
||||
SELECT
|
||||
<include refid="columns"></include>
|
||||
FROM
|
||||
ip_comm_cfg r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="ipType != null">
|
||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpPattern != null">
|
||||
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="destIpPattern != null">
|
||||
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''">
|
||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="srcPortPattern != null">
|
||||
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="destPortPattern != null">
|
||||
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort !=''">
|
||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destPort != null and destPort !=''">
|
||||
AND r.DEST_PORT=#{destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="direction != null">
|
||||
AND r.DIRECTION=#{direction,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null and createTime !=''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editTime != null and editTime !='' ">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<delete id="deleteCfgByGroupIds" parameterType="java.lang.String" >
|
||||
delete from ip_comm_cfg where group_id in (${groupIds})
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
<!-- ${sqlMap.dsf} -->
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="getGroupIds" parameterType="com.nis.domain.basics.IpCommCfg" resultMap="IpCommGroupCfgMap">
|
||||
SELECT
|
||||
<include refid="columns"></include>
|
||||
FROM
|
||||
ip_comm_cfg r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="ipType != null">
|
||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpPattern != null">
|
||||
AND r.src_ip_pattern=#{srcIpPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="destIpPattern != null">
|
||||
AND r.dest_ip_pattern=#{destIpPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''">
|
||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="srcPortPattern != null">
|
||||
AND r.src_port_pattern=#{srcPortPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="destPortPattern != null">
|
||||
AND r.dest_port_pattern=#{destPortPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort !=''">
|
||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destPort != null and destPort !=''">
|
||||
AND r.DEST_PORT=#{destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="direction != null">
|
||||
AND r.DIRECTION=#{direction,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null and createTime !=''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editTime != null and editTime !='' ">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<delete id="deleteCfgByGroupIds" parameterType="java.lang.String" >
|
||||
delete from ip_comm_cfg where group_id in (${groupIds})
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -454,72 +454,72 @@
|
||||
AND r.group_id in(${commonGroupIds})
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<!-- ${sqlMap.dsf}-->
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getGroupIds" parameterType="com.nis.domain.basics.ScriberIdCommCfg" resultMap="commGroupCfgMap">
|
||||
SELECT
|
||||
<include refid="columns"></include>
|
||||
FROM
|
||||
scriberid_comm_cfg r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
AND r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null and createTime !=''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editTime != null and editTime !='' ">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify !=''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute !=''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable !=''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="commonGroupIds != null">
|
||||
AND r.group_id in(${commonGroupIds})
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</select>
|
||||
|
||||
<select id="getGroupIds" parameterType="com.nis.domain.basics.ScriberIdCommCfg" resultMap="commGroupCfgMap">
|
||||
SELECT
|
||||
<include refid="columns"></include>
|
||||
FROM
|
||||
scriberid_comm_cfg r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
AND r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="createTime != null and createTime !=''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editTime != null and editTime !='' ">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify !=''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute !=''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable !=''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
AND r.group_id = #{groupId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="commonGroupIds != null">
|
||||
AND r.group_id in(${commonGroupIds})
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
AND r.group_id in(${commonGroupIds})
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
<!--${sqlMap.dsf}-->
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
@@ -226,12 +226,6 @@
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<choose>
|
||||
<!-- 判断是否批量操作 -->
|
||||
<when test="batchValidValue != null and batchValidValue != ''">
|
||||
|
||||
@@ -8,22 +8,17 @@ import java.math.BigDecimal;
|
||||
import java.nio.charset.Charset;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
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.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
import com.nis.domain.basics.*;
|
||||
import com.nis.domain.configuration.*;
|
||||
import com.nis.util.*;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.basics.*;
|
||||
import com.nis.web.dao.configuration.*;
|
||||
import com.nis.web.service.configuration.ObjGroupCfgConvert;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
@@ -1716,9 +1711,7 @@ public abstract class BaseService {
|
||||
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_req_head_cfg",send);
|
||||
}else
|
||||
// HTTP(s)响应头域
|
||||
if(regionDict.getDictId().intValue()==102 || regionDict.getDictId().intValue()==81 ||
|
||||
regionDict.getDictId().intValue()==87 || regionDict.getDictId().intValue()==93 ||
|
||||
regionDict.getDictId().intValue()==702) {
|
||||
if(regionDict.getConfigRegionValue().equals(Constants.HTTP_REDIRECT_RES_HEAD_REGION)) {
|
||||
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_res_head_cfg",send);
|
||||
}
|
||||
}else if("DnsResStrategy".equals(type)) {
|
||||
@@ -3325,6 +3318,7 @@ public abstract class BaseService {
|
||||
ScriberIdCommGroupDao scriberIdCommGroupDao=SpringContextHolder.getBean(ScriberIdCommGroupDao.class);
|
||||
DomainCommGroupDao domainCommGroupDao=SpringContextHolder.getBean(DomainCommGroupDao.class);
|
||||
CommonPolicyDao commonPolicyDao=SpringContextHolder.getBean(CommonPolicyDao.class);
|
||||
//SchedulerDao schedulerDao=SpringContextHolder.getBean(SchedulerDao.class);
|
||||
AreaIpCfgDao areaIpCfgDao=SpringContextHolder.getBean(AreaIpCfgDao.class);
|
||||
Set<String> ipDeletedGroups=new HashSet<>();
|
||||
Set<String> urlDeletedGroups=new HashSet<>();
|
||||
@@ -3362,6 +3356,7 @@ public abstract class BaseService {
|
||||
realGroupIds.deleteCharAt(realGroupIds.toString().length()-1);
|
||||
}
|
||||
List<CfgIndexInfo> toUpdateCfgIndexInfos=new ArrayList<>();
|
||||
List<CfgIndexInfo> toDelSchedualCfgIndexInfos=new ArrayList<>();
|
||||
List<CfgIndexInfo> toCancelCfgIndexInfos=new ArrayList<>();
|
||||
//没有
|
||||
if(StringUtils.isBlank(realGroupIds.toString())){
|
||||
@@ -3381,13 +3376,13 @@ public abstract class BaseService {
|
||||
Integer serviceId=cfgIndexInfo.getServiceId();
|
||||
if(serviceId!=null&&StringUtils.isNotBlank(cfgIndexInfo.getCommonGroupIds())){
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
Set<Integer> groupIdSet=new HashSet<>();
|
||||
Set<Integer> groupIdSet=Collections.synchronizedSet(new HashSet<Integer>());
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<MaatCfg> cancelConfigCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = Collections.synchronizedList(new ArrayList());
|
||||
List<IpCfg> ipRegionList = Collections.synchronizedList(new ArrayList());
|
||||
List<StringCfg> strRegionList = Collections.synchronizedList(new ArrayList());
|
||||
List<NumBoundaryCfg> numRegionList = Collections.synchronizedList(new ArrayList());
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
Map<String,Object> userRgionMap=gsonFromJson(cfgIndexInfo.getCommonGroupIds(),Map.class);
|
||||
@@ -3405,6 +3400,7 @@ public abstract class BaseService {
|
||||
cfgIndexInfo.setCommonGroupIds("");
|
||||
if(cfgIndexInfo.getIsValid()==Constants.VALID_NO){//未生效,直接更新配置,不用下发
|
||||
toUpdateCfgIndexInfos.add(cfgIndexInfo);
|
||||
toDelSchedualCfgIndexInfos.add(cfgIndexInfo);
|
||||
}else{//生效,需要取消配置
|
||||
cfgIndexInfo.setIsValid(Constants.VALID_NO);
|
||||
cfgIndexInfo.setIsAudit(Constants.AUDIT_NOT_YES);
|
||||
@@ -3459,47 +3455,84 @@ public abstract class BaseService {
|
||||
}
|
||||
}
|
||||
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公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getIpCommGroupCfgList())){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfgIndexInfo.getIpCommGroupCfgList(),1,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
ipRegionList=map.get("dstList");
|
||||
if(map.get("numRegionList")!=null){
|
||||
numRegionList.addAll(map.get("numRegionList"));
|
||||
}
|
||||
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getIpCommGroupCfgList())){
|
||||
// IpPortCfg cfg = new IpPortCfg();
|
||||
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfgIndexInfo.getIpCommGroupCfgList(),1,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// ipRegionList=map.get("dstList");
|
||||
// if(map.get("numRegionList")!=null){
|
||||
// numRegionList.addAll(map.get("numRegionList"));
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//URL公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getUrlCommGroupList())){
|
||||
CommonStringCfg cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getUrlCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getUrlCommGroupList())){
|
||||
// CommonStringCfg cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getUrlCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
//账号公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getScriberIdCommGroupList())){
|
||||
CommonStringCfg cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getScriberIdCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getScriberIdCommGroupList())){
|
||||
// CommonStringCfg cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
//
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getScriberIdCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
//
|
||||
// }
|
||||
//域名公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getDomainCommGroupList())){
|
||||
CommonStringCfg cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getDomainCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfgIndexInfo.getDomainCommGroupList())){
|
||||
// CommonStringCfg cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||
//
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getDomainCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
//
|
||||
// }
|
||||
//构造提交综合服务参数格式
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(cfgIndexInfo, maatCfg);
|
||||
@@ -3564,15 +3597,23 @@ public abstract class BaseService {
|
||||
}
|
||||
}
|
||||
//查询定时任务,失效定时任务
|
||||
// if(ids.toString().length()>0){
|
||||
// ids.deleteCharAt(ids.toString().length()-1);
|
||||
// commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename());
|
||||
// }
|
||||
if(ids.toString().length()>0){
|
||||
ids.deleteCharAt(ids.toString().length()-1);
|
||||
commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename());
|
||||
}
|
||||
}
|
||||
if(toUpdateCfgIndexInfos.size()>0){
|
||||
StringBuffer ids=new StringBuffer();
|
||||
for(CfgIndexInfo info:toUpdateCfgIndexInfos){
|
||||
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())){
|
||||
ids.append(info.getCompileId()+",");
|
||||
}
|
||||
@@ -3596,7 +3637,12 @@ public abstract class BaseService {
|
||||
if(CollectionUtils.isNotEmpty(maatBean.getConfigCompileList())){
|
||||
//调用服务接口下发配置数据
|
||||
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);
|
||||
logger.info("策略对象组下发响应信息:"+result.getMsg());
|
||||
@@ -3619,36 +3665,38 @@ public abstract class BaseService {
|
||||
contains=false;
|
||||
}
|
||||
if(contains&&cfgIndexInfo.getIsValid()==Constants.VALID_YES){
|
||||
if("IpCommCfg".equals(clazz.getSimpleName())){
|
||||
IpCommCfg searchCfg=new IpCommCfg();
|
||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setIpCommGroupCfgList(commCfgs);
|
||||
}
|
||||
}else if("ScriberIdCommCfg".equals(clazz.getSimpleName()) ){
|
||||
ScriberIdCommCfg searchCfg=new ScriberIdCommCfg();
|
||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setScriberIdCommGroupList(commCfgs);
|
||||
}
|
||||
}else if("UrlCommCfg".equals(clazz.getSimpleName())){
|
||||
UrlCommCfg searchCfg=new UrlCommCfg();
|
||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setUrlCommGroupList(commCfgs);
|
||||
}
|
||||
}else if("DomainCommCfg".equals(clazz.getSimpleName())){
|
||||
DomainCommCfg searchCfg=new DomainCommCfg();
|
||||
searchCfg.setCommonGroupIds(userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1));
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setDomainCommGroupList(commCfgs);
|
||||
String commonGroupIds=userRgionMap.get(key).toString().substring(1,userRgionMap.get(key).toString().length()-1);
|
||||
if(StringUtils.isNotBlank(commonGroupIds)){
|
||||
if("IpCommCfg".equals(clazz.getSimpleName())){
|
||||
IpCommCfg searchCfg=new IpCommCfg();
|
||||
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setIpCommGroupCfgList(commCfgs);
|
||||
}
|
||||
}else if("ScriberIdCommCfg".equals(clazz.getSimpleName()) ){
|
||||
ScriberIdCommCfg searchCfg=new ScriberIdCommCfg();
|
||||
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setScriberIdCommGroupList(commCfgs);
|
||||
}
|
||||
}else if("UrlCommCfg".equals(clazz.getSimpleName())){
|
||||
UrlCommCfg searchCfg=new UrlCommCfg();
|
||||
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setUrlCommGroupList(commCfgs);
|
||||
}
|
||||
}else if("DomainCommCfg".equals(clazz.getSimpleName())){
|
||||
DomainCommCfg searchCfg=new DomainCommCfg();
|
||||
searchCfg.setCommonGroupIds(commonGroupIds);
|
||||
List commCfgs=dao.findAllList(searchCfg);
|
||||
if(CollectionUtils.isNotEmpty(commCfgs)){
|
||||
cfgIndexInfo.setDomainCommGroupList(commCfgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,11 +191,11 @@ public class DomainCommGroupService extends CrudService<CrudDao<DomainCommCfg>,
|
||||
serviceGroupIds = "";
|
||||
for (String groupId : strings) {
|
||||
Integer size = domainCommGroupDao.getCfgInfoByGroupIds(groupId);
|
||||
if(size == 0) { // 需配置取消
|
||||
if(size == 0) {
|
||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.DOMAIN_OBJ_GROUP_TYPE);
|
||||
if(flag) { // 需配置更新
|
||||
if(flag) { // 需配置取消
|
||||
serviceGroupIds += ","+groupId;
|
||||
}else {
|
||||
}else { // 需配置更新
|
||||
groupIds += ","+groupId;
|
||||
}
|
||||
}else { // 需配置更新
|
||||
|
||||
@@ -184,11 +184,11 @@ public class IpCommGroupCfgService extends BaseService {
|
||||
serviceGroupIds = "";
|
||||
for (String groupId : strings) {
|
||||
Integer size = ipCommGroupCfgDao.getCfgInfoByGroupIds(groupId);
|
||||
if(size == 0) { // 需配置取消
|
||||
if(size == 0) {
|
||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.IP_OBJ_GROUP_TYPE);
|
||||
if(flag) { // 需配置更新
|
||||
if(flag) { // 需配置取消
|
||||
serviceGroupIds += ","+groupId;
|
||||
}else {
|
||||
}else { // 需配置更新
|
||||
groupIds += ","+groupId;
|
||||
}
|
||||
}else { // 需配置更新
|
||||
|
||||
@@ -191,11 +191,11 @@ public class ScriberIdCommGroupService extends CrudService<CrudDao<ScriberIdComm
|
||||
serviceGroupIds = "";
|
||||
for (String groupId : strings) {
|
||||
Integer size = scriberIdCommGroupDao.getCfgInfoByGroupIds(groupId);
|
||||
if(size == 0) { // 需配置取消
|
||||
if(size == 0) {
|
||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.SUBID_OBJ_GROUP_TYPE);
|
||||
if(flag) { // 需配置更新
|
||||
if(flag) { // 需配置取消
|
||||
serviceGroupIds += ","+groupId;
|
||||
}else {
|
||||
}else { // 需配置更新
|
||||
groupIds += ","+groupId;
|
||||
}
|
||||
}else { // 需配置更新
|
||||
|
||||
@@ -191,11 +191,11 @@ public class UrlCommGroupService extends CrudService<CrudDao<UrlCommCfg>, UrlCom
|
||||
serviceGroupIds = "";
|
||||
for (String groupId : strings) {
|
||||
Integer size = urlCommGroupDao.getCfgInfoByGroupIds(groupId);
|
||||
if(size == 0) { // 需配置取消
|
||||
if(size == 0) {
|
||||
boolean flag = groupManageService.checkCancelCfg(groupId, Constants.URL_OBJ_GROUP_TYPE);
|
||||
if(flag) { // 需配置更新
|
||||
if(flag) { // 需配置取消
|
||||
serviceGroupIds += ","+groupId;
|
||||
}else {
|
||||
}else { // 需配置更新
|
||||
groupIds += ","+groupId;
|
||||
}
|
||||
}else { // 需配置更新
|
||||
|
||||
@@ -2430,55 +2430,100 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
List<Map<String,Object>> cfgList=(List<Map<String,Object>>)cfgMap.get(cfg.getServiceId());
|
||||
Map<String,Object> maatTableMap=ConfigConvertUtil.convertCommonGroupMaatTable(cfg,cfgList);
|
||||
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公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
||||
IpPortCfg _cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||
_cfg.setIsValid(entity.getIsValid());
|
||||
_cfg.setIsAudit(entity.getIsAudit());
|
||||
_cfg.setAuditTime(entity.getAuditTime());
|
||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.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(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
||||
// IpPortCfg _cfg = new IpPortCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||
// _cfg.setIsValid(entity.getIsValid());
|
||||
// _cfg.setIsAudit(entity.getIsAudit());
|
||||
// _cfg.setAuditTime(entity.getAuditTime());
|
||||
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// ipRegionList=map.get("dstList");
|
||||
// if(map.get("numRegionList")!=null){
|
||||
// numRegionList.addAll(map.get("numRegionList"));
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//URL公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
||||
CommonStringCfg _cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||
_cfg.setIsValid(entity.getIsValid());
|
||||
_cfg.setIsAudit(entity.getIsAudit());
|
||||
_cfg.setAuditTime(entity.getAuditTime());
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
||||
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||
// _cfg.setIsValid(entity.getIsValid());
|
||||
// _cfg.setIsAudit(entity.getIsAudit());
|
||||
// _cfg.setAuditTime(entity.getAuditTime());
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
//账号公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
||||
CommonStringCfg _cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||
_cfg.setIsValid(entity.getIsValid());
|
||||
_cfg.setIsAudit(entity.getIsAudit());
|
||||
_cfg.setAuditTime(entity.getAuditTime());
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfg.getScriberIdCommGroupList())){
|
||||
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId"});
|
||||
// _cfg.setIsValid(entity.getIsValid());
|
||||
// _cfg.setIsAudit(entity.getIsAudit());
|
||||
// _cfg.setAuditTime(entity.getAuditTime());
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
//
|
||||
// }
|
||||
//域名公共分组
|
||||
if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
||||
CommonStringCfg _cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId",});
|
||||
_cfg.setIsValid(entity.getIsValid());
|
||||
_cfg.setIsAudit(entity.getIsAudit());
|
||||
_cfg.setAuditTime(entity.getAuditTime());
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(cfg.getDomainCommGroupList())){
|
||||
// CommonStringCfg _cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId",});
|
||||
// _cfg.setIsValid(entity.getIsValid());
|
||||
// _cfg.setIsAudit(entity.getIsAudit());
|
||||
// _cfg.setAuditTime(entity.getAuditTime());
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
BeanUtils.copyProperties(cfg, maatCfg);
|
||||
if(cfg.getServiceId().equals(512)){
|
||||
maatCfg.setAction(2);
|
||||
@@ -2514,6 +2559,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
//调用服务接口下发配置数据
|
||||
if(isUpdateCfg) {
|
||||
//logger.info("配置批量下发:"+json);
|
||||
// FileUtils.writeToFile("D:\\send.json",json,false);
|
||||
//调用服务接口同步回调类配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
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.security.UserUtils;
|
||||
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.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -92,30 +90,78 @@ public class ObjectGroupService extends BaseService {
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//设置service_id
|
||||
if("HTTPS".equalsIgnoreCase(protocolType)){
|
||||
if(entity.getAction().equals(1)){
|
||||
entity.setServiceId(592);
|
||||
}else if(entity.getAction().equals(16)){
|
||||
entity.setServiceId(576);
|
||||
}
|
||||
}else if("INTERCEPT".equalsIgnoreCase(protocolType)){
|
||||
entity.setServiceId(512);
|
||||
}else if("HTTP".equalsIgnoreCase(protocolType)){
|
||||
if(entity.getAction().equals(1)){
|
||||
entity.setServiceId(129);
|
||||
}else if(entity.getAction().equals(16)){
|
||||
entity.setServiceId(17);
|
||||
}
|
||||
}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);
|
||||
}
|
||||
}
|
||||
}
|
||||
//设置service_id 改为从jsp页面获取
|
||||
// if("HTTPS".equalsIgnoreCase(protocolType)){
|
||||
// if(entity.getAction().equals(1)){
|
||||
// entity.setServiceId(592);
|
||||
// }else if(entity.getAction().equals(16)){
|
||||
// entity.setServiceId(576);
|
||||
// }
|
||||
// }else if("INTERCEPT".equalsIgnoreCase(protocolType)){
|
||||
// entity.setServiceId(512);
|
||||
// }else if("HTTP".equalsIgnoreCase(protocolType)){
|
||||
// if(entity.getAction().equals(1)){
|
||||
// entity.setServiceId(129);
|
||||
// }else if(entity.getAction().equals(16)){
|
||||
// entity.setServiceId(17);
|
||||
// }
|
||||
// }else if("MAIL".equalsIgnoreCase(protocolType)){
|
||||
// if(entity.getAction().equals(1)){
|
||||
// entity.setServiceId(132);
|
||||
// }else if(entity.getAction().equals(16)){
|
||||
// entity.setServiceId(20);
|
||||
// }
|
||||
// }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){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
@@ -144,13 +190,6 @@ public class ObjectGroupService extends BaseService {
|
||||
logger.info("数据保存出错");
|
||||
throw e;
|
||||
}
|
||||
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditPolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
|
||||
}
|
||||
|
||||
}else{
|
||||
//处理公共分组
|
||||
if(MapUtils.isNotEmpty(entity.getUserRegion())){
|
||||
@@ -180,12 +219,6 @@ public class ObjectGroupService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditPolicy(entity, entity.getIsAudit(), Constants.UPDATE_ACTION);
|
||||
}
|
||||
}
|
||||
//更新UD_FLAG
|
||||
if(StringUtils.isNotBlank(oldCommonGroupIds)){
|
||||
@@ -255,6 +288,17 @@ public class ObjectGroupService extends BaseService {
|
||||
}
|
||||
//处理定时任务
|
||||
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){
|
||||
CfgIndexInfo entity = commonPolicyDao.getPolicyById(cfgId);
|
||||
@@ -291,8 +335,38 @@ public class ObjectGroupService extends BaseService {
|
||||
|
||||
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 {
|
||||
long start=System.currentTimeMillis(),end=System.currentTimeMillis();
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setIsAudit(isAudit);
|
||||
@@ -303,17 +377,23 @@ public class ObjectGroupService extends BaseService {
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
Set<Integer> groupIdSet=new HashSet<>();
|
||||
//确保线程安全
|
||||
Set<Integer> groupIdSet=Collections.synchronizedSet(new HashSet<Integer>());
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<MaatCfg.GroupCfg> groupRelationList = new ArrayList();
|
||||
List<MaatCfg.IpCfg> ipRegionList = new ArrayList();
|
||||
List<MaatCfg.StringCfg> strRegionList = new ArrayList();
|
||||
List<MaatCfg.NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
//确保线程安全
|
||||
List<MaatCfg.GroupCfg> groupRelationList = Collections.synchronizedList(new ArrayList<MaatCfg.GroupCfg>());
|
||||
List<MaatCfg.IpCfg> ipRegionList = Collections.synchronizedList(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.IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
//查询子配置并修改审核状态
|
||||
//查询子配置
|
||||
entity = this.getObjGroupPolicy(entity.getCfgId());
|
||||
//多线程查询
|
||||
// entity = this.getObjGroupPolicyMultyThread(entity.getCfgId());
|
||||
end=System.currentTimeMillis();
|
||||
logger.info("查询子配置完成,耗时"+(end-start)+"ms");
|
||||
// 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公共分组
|
||||
if(CollectionUtils.isNotEmpty(entity.getIpCommGroupCfgList())){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
//cfg.setTableName("ip_comm_cfg");
|
||||
//commonPolicyDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,entity.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(CollectionUtils.isNotEmpty(entity.getIpCommGroupCfgList())){
|
||||
// IpPortCfg cfg = new IpPortCfg();
|
||||
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
// //cfg.setTableName("ip_comm_cfg");
|
||||
// //commonPolicyDao.auditCfg(cfg);
|
||||
// if(isAudit==1){
|
||||
// Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,entity.getIpCommGroupCfgList(),1,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// ipRegionList=map.get("dstList");
|
||||
// if(map.get("numRegionList")!=null){
|
||||
// numRegionList.addAll(map.get("numRegionList"));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//URL公共分组
|
||||
if(CollectionUtils.isNotEmpty(entity.getUrlCommGroupList())){
|
||||
CommonStringCfg cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
||||
//commonPolicyDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getUrlCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(entity.getUrlCommGroupList())){
|
||||
// CommonStringCfg cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
// //cfg.setTableName(CommonStringCfg.getTablename());
|
||||
// //commonPolicyDao.auditCfg(cfg);
|
||||
// if(isAudit==1){
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getUrlCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
// }
|
||||
//账号公共分组
|
||||
if(CollectionUtils.isNotEmpty(entity.getScriberIdCommGroupList())){
|
||||
CommonStringCfg cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
||||
//commonPolicyDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getScriberIdCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(entity.getScriberIdCommGroupList())){
|
||||
// CommonStringCfg cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
// //cfg.setTableName(CommonStringCfg.getTablename());
|
||||
// //commonPolicyDao.auditCfg(cfg);
|
||||
// if(isAudit==1){
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getScriberIdCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
// }
|
||||
//域名公共分组
|
||||
if(CollectionUtils.isNotEmpty(entity.getDomainCommGroupList())){
|
||||
CommonStringCfg cfg = new CommonStringCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
||||
//commonPolicyDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getDomainCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
// if(CollectionUtils.isNotEmpty(entity.getDomainCommGroupList())){
|
||||
// CommonStringCfg cfg = new CommonStringCfg();
|
||||
// BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
// //cfg.setTableName(CommonStringCfg.getTablename());
|
||||
// //commonPolicyDao.auditCfg(cfg);
|
||||
// if(isAudit==1){
|
||||
// Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getDomainCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||
// groupRelationList=map.get("groupList");
|
||||
// strRegionList=map.get("dstList");
|
||||
// }
|
||||
// }
|
||||
end=System.currentTimeMillis();
|
||||
logger.info("配置转换完成,耗时"+(end-start1)+"ms");
|
||||
//保存区域IP信息
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
@@ -412,7 +533,6 @@ public class ObjectGroupService extends BaseService {
|
||||
areaIpRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -453,16 +573,22 @@ public class ObjectGroupService extends BaseService {
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(opAction);
|
||||
start1=System.currentTimeMillis();
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
end=System.currentTimeMillis();
|
||||
logger.info("json转换完成,耗时"+(end-start1)+"ms");
|
||||
if(json.length()<Constants.JSON_PRINT_LENTH){
|
||||
logger.info("策略对象组下发配置参数:"+json);
|
||||
}else{
|
||||
logger.info("策略对象组下发配置内容超过"+Constants.JSON_PRINT_LENTH+",不打印");
|
||||
// FileUtils.writeToFile("D:\\send.json",json,false);
|
||||
}
|
||||
//调用服务接口下发配置
|
||||
start1=System.currentTimeMillis();
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("策略对象组下发响应信息:"+result.getMsg());
|
||||
end=System.currentTimeMillis();
|
||||
logger.info("策略对象组下发响应信息:"+result.getMsg()+",耗时"+(end-start1));
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
@@ -585,6 +711,7 @@ public class ObjectGroupService extends BaseService {
|
||||
StringBuffer groupIds=new StringBuffer();
|
||||
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(functionId);
|
||||
Map<String,String> dicts=DictUtils.getDictMap("OBJ_GROUP_PROTOCOL");
|
||||
for (ObjGroupCfg c : list) {
|
||||
if(!StringUtil.isBlank(c.getCommonGroupIds())) {
|
||||
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()));
|
||||
}
|
||||
}
|
||||
if(c.getUserRegion1().equalsIgnoreCase("https")){
|
||||
c.setUserRegion1("HTTPS");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("http")){
|
||||
c.setUserRegion1("HTTP");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("intercept")){
|
||||
c.setUserRegion1(msgProp.getProperty("intercept","intercept"));
|
||||
if(dicts.containsKey(c.getUserRegion1())){
|
||||
c.setUserRegion1(msgProp.getProperty(dicts.get(c.getUserRegion1()),dicts.get(c.getUserRegion1())));
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(groupIds.toString())){
|
||||
@@ -653,7 +776,7 @@ public class ObjectGroupService extends BaseService {
|
||||
List<ObjGroupCfg> list = commonPolicyDao.getObjGroupPagedList(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
||||
|
||||
Map<String,String> dicts=DictUtils.getDictMap("OBJ_GROUP_PROTOCOL");
|
||||
for (ObjGroupCfg c : list) {
|
||||
if(StringUtils.isNotBlank(c.getCommonGroupIds())) {
|
||||
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()));
|
||||
}
|
||||
}
|
||||
if(c.getUserRegion1().equalsIgnoreCase("https")){
|
||||
c.setUserRegion1("HTTPS");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("http")){
|
||||
c.setUserRegion1("HTTP");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("intercept")){
|
||||
c.setUserRegion1(msgProp.getProperty("intercept","intercept"));
|
||||
if(dicts.containsKey(c.getUserRegion1())){
|
||||
c.setUserRegion1(msgProp.getProperty(dicts.get(c.getUserRegion1()),dicts.get(c.getUserRegion1())));
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(groupIds.toString())){
|
||||
@@ -718,4 +837,57 @@ public class ObjectGroupService extends BaseService {
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- NTC或PROXY MAAT类配置开始 -->
|
||||
<!-- IP Whitelist -->
|
||||
<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>
|
||||
<!-- IP Address -->
|
||||
<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>
|
||||
</service>
|
||||
<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_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<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_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<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="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>
|
||||
</service>
|
||||
<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="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<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="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<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="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<service id="67" functionId="6" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="URL白名单">
|
||||
<serviceCfg cfgType="2" tableName="http_url_cfg" ></serviceCfg>
|
||||
@@ -180,61 +180,63 @@
|
||||
</service> -->
|
||||
|
||||
<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="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID" ></serviceCfg>
|
||||
</service>
|
||||
<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="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
|
||||
<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="2" tableName="ftp_keyword_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||
<!--策略对象分组只用到NTC_FTP_URL,maatTable只有策略对象下发用到 -->
|
||||
<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 id="21" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP封堵">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ftp_keyword_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE" ></serviceCfg>
|
||||
<!--策略对象分组只用到NTC_FTP_URL,maatTable只有策略对象下发用到 -->
|
||||
<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 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_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_HASH_TYPE" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
|
||||
</service>
|
||||
<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_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_HASH_TYPE" regionColumn="userRegion1" userRegionPosition="0"></userRegion>
|
||||
</service>
|
||||
<service id="39" functionId="22" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="流媒体封堵">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="av_cont_url_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_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" maatTable="NTC_STREAMING_MEDIA_URL"></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<service id="151" functionId="22" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="流媒体监测">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="av_cont_url_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_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" maatTable="NTC_STREAMING_MEDIA_URL"></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<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="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<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="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
|
||||
<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="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
</service>
|
||||
<service id="0" serviceIds="512,592,128,129" 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="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,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>
|
||||
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';
|
||||
@@ -1,612 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for help_document
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `help_document`;
|
||||
CREATE TABLE `help_document` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`file_name` varchar(100) DEFAULT '',
|
||||
`file_comment` text DEFAULT NULL,
|
||||
`back_file_comment` text DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `INDEX_FILE_NAME` (`file_name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of help_document
|
||||
-- ----------------------------
|
||||
INSERT INTO `help_document` VALUES ('1', 'cache_policy.md', 'Cache Policy
|
||||
|
||||
On National Proxy System, Individual Cache policy rules determine
|
||||
whether to cache or not based on traffic attributes, such as URL and
|
||||
Cookies. For cache action, the optimization parameters are:
|
||||
|
||||
*A Cache key* - is a unique string that lets the National Proxy System
|
||||
look for web content when requests hit them. It<49><74>s made up of a hostname,
|
||||
path, and cookie parts. By default, the Proxy use the entire URL as the
|
||||
cache key. Selecting the correct cache key will ensure maximum cache
|
||||
footprint and increase cache hits.
|
||||
|
||||
*Ignore Query String in URL* - in case the query strings doesn<73><6E>t
|
||||
actually indicate that the object need to be different then you could
|
||||
EXCLUDE them from the cache key. For example, after ignoring <20><>sqp<71><70> and
|
||||
<EFBFBD><EFBFBD>rs<EFBFBD><EFBFBD> of URL: <20><>https://example.com/pic.jpg?~~sqp=UAAI&rs=AOn4~~<7E><>.
|
||||
|
||||
*Include Cookie Values* - in case the server send different content for
|
||||
the same URL based on the cookie value, you can include that cookie
|
||||
value as a part of cache key. For example, the server may set a cookie
|
||||
at the client called "prefLang=ru" to record user preferred language,
|
||||
you could add "prefLang" to distinguish different web content.
|
||||
|
||||
*Disable Revalidate* - is an ON-OFF switch. The pragma-no-cache header
|
||||
in a client<6E><74>s request causes the proxy to re-fetch the entire object
|
||||
from the original server, even if the cached copy of the object is
|
||||
fresh. By default this option is switch OFF, which means a client<6E><74>s
|
||||
non-conditional request results in a conditional GET request sent to the
|
||||
original server if the object is already in cache. The conditional
|
||||
request allows the original server to return the 304 Not Modified
|
||||
response, if the content in cache is still fresh. Thereby, the
|
||||
server-side bandwidth and latency consumed are lesser as the full
|
||||
content is not retrieved again from the original server.
|
||||
|
||||
*Cache Dynamic Content* - is an ON-OFF switch. A URL is considered
|
||||
dynamic if it ends in <20><>.asp(x)<29><> or contains a question mark (?), a
|
||||
semicolon (;), or <20><>cgi<67><69>. *Ignore Query String* overrides this option
|
||||
(switch on).
|
||||
|
||||
*Cache Cookied Content* - is an ON-OFF switch. By default, the Proxy
|
||||
does NOT cache cookied content of any type. If this option is switch on,
|
||||
the system cache all cookied content except HTML.
|
||||
|
||||
*Ignore Request no-cache Headers* - is an ON-OFF switch. By default, the
|
||||
proxy strictly observes client Cache-Control: no-cache directives. As
|
||||
known as:
|
||||
|
||||
i. Authorization
|
||||
|
||||
ii. WWW-Authenticate
|
||||
|
||||
iii. Cache-Control: no-store
|
||||
|
||||
iv. Cache-Control: no-cache
|
||||
|
||||
If a requested object contains a no-cache header, then proxy forwards
|
||||
the request to the origin server even if it has a fresh copy in cache.
|
||||
You can configure proxy to ignore client no-cache directives such that
|
||||
it ignores no-cache headers from client requests and serves the object
|
||||
from its cache.
|
||||
|
||||
*Ignore Response no-cache Headers* - is an ON-OFF switch. By default, a
|
||||
response from an origin server with a no-cache header is not stored in
|
||||
the cache. As known as:
|
||||
|
||||
i. Cache-Control: no-store
|
||||
|
||||
ii. Cache-Control: private
|
||||
|
||||
iii. Set-Cookie
|
||||
|
||||
iv. Cache-Control: no-cache
|
||||
|
||||
v. WWW-Authenticate
|
||||
|
||||
vi. Expires header with a value of 0 (zero) or a past date.
|
||||
|
||||
If you configure proxy to ignore no-cache headers, then proxy also
|
||||
ignores no-store headers. The default behavior of observing no-cache
|
||||
directives is appropriate in most cases.
|
||||
|
||||
*Forcing Object Caching* - is an ON-OFF switch. You can force Proxy to
|
||||
cache specific URLs (including dynamic URLs) for a specified duration,
|
||||
regardless of Cache-Control response headers.
|
||||
|
||||
*Minimum Use* - sets the number of times an item must be requested by
|
||||
clients before Proxy caches it. This is useful if the cache is
|
||||
constantly filling up, as it ensures that only the most frequently
|
||||
accessed items are added to the cache. By default, Proxy cache object at
|
||||
its first appearance. The counter resets in every 30 minutes. Note that
|
||||
the requests is counted independently on each processing unit.
|
||||
|
||||
*Max Cache Object Size* - sets the upper limit of an object size, larger
|
||||
object will not be cached. By default, Proxy does not cache object
|
||||
larger than 1 GB.
|
||||
|
||||
*Cache Pinning Time* - configures Proxy to keep certain objects in the
|
||||
cache for a specified time. You can use this option to ensure that the
|
||||
most popular objects are in cache when needed and to prevent cache
|
||||
manager from deleting important objects. Proxy observes Cache-Control
|
||||
headers and pins an object in the cache only if it is indeed cacheable.
|
||||
|
||||
*Max Cache Size* - sets the upper limit of the size of storage for a
|
||||
policy. By default, Proxy uses all available disk space. When the cache
|
||||
size reaches the limit, the cache manager removes the files that were
|
||||
least recently used to bring the cache size back under the limit.
|
||||
|
||||
*Inactive Time* - specifies how long an item can remain in the cache
|
||||
without being accessed. A file that has not been requested for this time
|
||||
is automatically deleted from the cache by the cache manager, regardless
|
||||
of whether or not it has expired.
|
||||
|
||||
', null);
|
||||
INSERT INTO `help_document` VALUES ('2', 'control_policy.md', 'Control Policy
|
||||
|
||||
On National Proxy System, Individual Control policy rules determine
|
||||
whether to allow, block, redirect or replace a session based on traffic
|
||||
attributes, such as URL, request header fields, request body keywords,
|
||||
response header fields, response body keywords, IP address, Subscribe ID
|
||||
and their combination. You could specify these attributes in the submenu
|
||||
of *Control Policy*.
|
||||
|
||||
The attributes are detailed in following context:
|
||||
|
||||
*URL* - From proxy<78><79>s perspective, a HTTP URL consists of a hierarchical
|
||||
sequence of three components: URL = hostname/path[?query] . The URL path
|
||||
name can also be specified by the user in the local writing system. If
|
||||
not already encoded, it is converted to UTF-8, and any characters not
|
||||
part of the basic URL character set are escaped as hexadecimal using
|
||||
percent-encoding; for example, search keywords <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܧڧۡ<DAA7> in Google
|
||||
produces URL<52><4C>
|
||||
|
||||
https://www.google.com/search?q=%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9
|
||||
|
||||
To perform policy action on above URL, you could input the whole URL in
|
||||
the input box. Or, you could input original keywords and let the Proxy
|
||||
do the decoding, e.g. <20><>google.com/search<63><68> & <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܧڧۡ<DAA7>. Note that the
|
||||
scheme string MUST be excluded from the URL, it<69><74>s <20><>https://<2F><> in this
|
||||
case.
|
||||
|
||||
NOTE Maximum HTTP/HTTPS URL length is 1023 characters
|
||||
|
||||
*Request Header* - is used to set conditions on request header fields.
|
||||
Header fields are colon-separated key-value pairs in clear-text string
|
||||
format, terminated by a carriage return (CR) and line feed (LF)
|
||||
character sequence. For example, <20><>user-agent: Mozilla/5.0 (Windows NT
|
||||
10.0; Win64; x64)<29><> is a header filed in request header. The *Matching
|
||||
District* is used to configure the field<6C><64>s key, if the key was
|
||||
presented, the Proxy will search in the value for *Keywords*.
|
||||
|
||||
*Response Header* - is used to set conditions on response header fields.
|
||||
Its configuration is similar to *Request Header*.
|
||||
|
||||
*Request Body* - is used to set conditions on request<73><74>s body message.
|
||||
The Proxy searches the pre-configured *Keywords* in it. You can
|
||||
configure non-ASCII or non-utf8 keywords by turn on HEX.
|
||||
|
||||
*Response Body* - is used to set conditions on response<73><65>s body message.
|
||||
Its configuration is similar to *Request Body*.
|
||||
|
||||
You could select one of the five actions for above attributes, as known
|
||||
as:
|
||||
|
||||
*Monitor* - the Proxy produce a log to record matched HTTP session
|
||||
information.
|
||||
|
||||
*Block* - the Proxy terminate matched HTTP session with an error page
|
||||
and produce a log. You MUST specify a *Response Code* and a *Response
|
||||
Content* to generate an error page.
|
||||
|
||||
*Redirect*<2A><>the Proxy redirect matched HTTP session to a predefined URL.
|
||||
Since redirection need to be performed before delivering response to
|
||||
client, condition of response body is not applicable in this action. You
|
||||
MUST configure the redirect response via *Response Code* and *Response
|
||||
URL*. The Response URL MUST start with a scheme (http:// or https://).
|
||||
You SHOULD NOT select **301** as *Response Code* unless you exactly know
|
||||
what you are doing. This action produces a log.
|
||||
|
||||
*Replace*<2A><>the Proxy *Searches in* a given HTTP part to *Find* a given
|
||||
string, and *Replace* any matches *with* another given string. If no
|
||||
match was found, the session remained untouched. For performance
|
||||
concerns, condition of request body and response body is not available
|
||||
in this action. For example, you can configure the Proxy to search in
|
||||
the response body of URL <20><>www.example.com/index.html<6D><6C>, find every
|
||||
<EFBFBD><EFBFBD>string1<EFBFBD><EFBFBD> and replace with <20><>string2<67><32>. This action produces a log.
|
||||
|
||||
*Whitelist*<2A><>the Proxy pass-through the matched sessions and produce no
|
||||
log.
|
||||
|
||||
National Proxy will enforce policy check on traffic attributes, policies
|
||||
have been created that there will be some that overlap or are subsets of
|
||||
the parameters that the policies use to determine which policy should be
|
||||
matched against the traffic. The execute order of policy is <20><>first
|
||||
match, first served<65><64>. In case of an incoming traffic attribute matches
|
||||
one more policy, the priority order is *Whitelist \> Block \>
|
||||
Redirect \> Replace \> Monitor*, action with higher priority overrides
|
||||
others. If multiple policies of same action are matched, policy with
|
||||
bigger ID number is precedence.
|
||||
', null);
|
||||
INSERT INTO `help_document` VALUES ('3', 'intercept_policy.md', 'Intercept Policy
|
||||
|
||||
An Intercept policy rule allows you to define traffic that you want the
|
||||
National Proxy to decrypt and to define traffic that you choose to
|
||||
exclude from decryption because the traffic is personal or because of
|
||||
local regulations. A connection is intercepted/optimized based on
|
||||
traffic attributes, such as IP address, domain name (via SNI matching)
|
||||
and Subscribe ID. You could specify these attributes in *IP Intercept*
|
||||
and *Domain Intercept*.
|
||||
|
||||
Both *IP intercept* and *Domain Intercept* are subject two actions:
|
||||
|
||||
*Intercept*<2A><>the National Proxy System intercepts network traffic for
|
||||
further control policy and cache policy checking. Interception requires
|
||||
certificates to establish the National Proxy as a trusted third party.
|
||||
National Proxy deployed in transparent mode, which means the users don`t
|
||||
have any proxy settings in their browser. When a connection is set to
|
||||
intercept, the proxy terminates the connection and initiates a new
|
||||
connection between client and server. If the connection is SSL
|
||||
encrypted, the original certificate is replaced with a substitute one.
|
||||
|
||||
*Bypass*<2A><>the Proxy passes through the network connection without apply
|
||||
an optimization or policy checking. You can also use bypass action when
|
||||
excluding servers from SSL decryption for technical reasons (the site
|
||||
breaks decryption for reasons such as certificate pinning, unsupported
|
||||
ciphers, or mutual authentication). Apple Store, WhatsApp, Telegram,
|
||||
Microsoft Windows Update are common SSL pinning application. In case of
|
||||
traffic matches one more policy, bypass overrides intercept.
|
||||
|
||||
When *Intercept Related Domains* is enabled, domains that share one
|
||||
certificates with the specified domain are considered as the same. For
|
||||
example, if the intercept facebook.com with I*ntercept Related Domain*
|
||||
option, then \*.xx.fbcdn.net, fb.com, .messenger.com and etc. are also
|
||||
intercepted. There may be side effects that intercept undesired websites
|
||||
that share one certificate. For example, two websites hosted in a same
|
||||
CDN provider (Content Delivery Network) or different products of one
|
||||
company.
|
||||
|
||||
*Key ring* determines which certificate will be used to generate
|
||||
substitute certificate. You could configure key ring through *Proxy
|
||||
Policy Object* page. If no key ring is specified, proxy will use the
|
||||
default one.
|
||||
|
||||
Intercept policy produces no log. You can find out if the interception
|
||||
is successful by checking if the certificate is issued by your
|
||||
pre-configured Root CA. You need a PC which traffic has already directed
|
||||
to the Proxy, and a web browser to test the policy. For Chrome and
|
||||
Microsoft Internet Explorer, you could click the lock icon on the
|
||||
address bar to view certificate. For Firefox, after you clicking the
|
||||
lock icon, click <20><>\><3E><> button to show connection details, click <20><>more
|
||||
information<EFBFBD><EFBFBD>, and then click <20><>view certificate<74><65>. If the browser warning
|
||||
that the connection is not secure, one possible reason is you haven<65><6E>t
|
||||
install/trust the root certificate yet.
|
||||
|
||||
**Note:** You should exercise caution because web applications may not
|
||||
cooperate with SSL interception. Reasons that sites break decryption
|
||||
technically include pinned certificates, mutual authentication,
|
||||
incomplete certificate chains, unsupported ciphers, and non-standard SSL
|
||||
implementation. If a site uses an incomplete certificate chain, the
|
||||
National Proxy doesn<73><6E>t automatically fix the chain as a browser would.
|
||||
You need to manually download the missing sub-CA certificates and load
|
||||
and deploy them onto the proxy.', null);
|
||||
INSERT INTO `help_document` VALUES ('4', 'proxy_policy_object.md', 'Proxy Policy Object
|
||||
|
||||
A policy object is a single object or a collective unit that groups
|
||||
discrete identities such as IP addresses, URLs, applications, or users.
|
||||
With policy objects that are a collective unit, you can reference the
|
||||
object in policy instead of manually selecting multiple objects one at a
|
||||
time. Typically, when creating a policy object, you group objects that
|
||||
require similar permissions in policy.
|
||||
|
||||
1. Key Ring
|
||||
|
||||
On National Proxy System, Key Ring is a pair of private key and public
|
||||
certificate. You can also import a certificate chain containing multiple
|
||||
certificates. Key Ring is a policy object, you can reference it in
|
||||
*Intercept Policy*.
|
||||
|
||||
There are three *Certificate Type:*
|
||||
|
||||
*End-entity Certificate*<2A><> is used for web servers to identify
|
||||
themselves. The *Public Key File* MUST be .p12 format that contains
|
||||
entire certificate chain. The Private Key File could be .pem, .key or
|
||||
.p12 format. This certificate type is not applicable to *Domain
|
||||
Intercept* for it cannot be used to sign other certificates. *Expire
|
||||
After* parameter is also not applicable to end-entity certificate for
|
||||
the same reason.
|
||||
|
||||
*Intermedia Certificate* - is used to sign other certificates. An
|
||||
intermediate certificate must be signed by another intermediate
|
||||
certificate, or a root certificate. The *Public Key File* MUST be .p12
|
||||
format that contains entire certificate chain. The *Expire After*
|
||||
parameter indicates the expiration of the substitute certificate that
|
||||
was issued by this intermedia certificate.
|
||||
|
||||
*Root Certificate* - is used to sign other certificates. The *Public Key
|
||||
File* could be .der, .cer, .crt or .pem format. The *Expire After*
|
||||
parameter has the same meaning as Intermedia Certificate.
|
||||
|
||||
*CRL* - or Certificate Revocation List, is a list of digital
|
||||
certificates that have been revoked by the issuing certificate authority
|
||||
(CA) before their scheduled expiration date and should no longer be
|
||||
trusted. On Key Ring settings, CRL is an HTTP URL that point to a valid
|
||||
.crl file. Invalid URL or .crl file may produce certificate warnings on
|
||||
some browser, i.e. Internet Explorer 11.
|
||||
|
||||
Specification of certificate formats:
|
||||
|
||||
*.pem* <20>C (Privacy-enhanced Electronic Mail) Base64 encoded DER
|
||||
certificate, enclosed between "-----BEGIN CERTIFICATE-----" and
|
||||
"-----END CERTIFICATE-----"
|
||||
|
||||
*.cer, .crt, .der* <20>C usually in binary DER form, but Base64-encoded
|
||||
certificates are common too (see .pem above)
|
||||
|
||||
*.p12* <20>C PKCS\#12, may contain certificate(s) (public) and private keys
|
||||
(without password protected)
|
||||
|
||||
1. Trusted Certificate
|
||||
|
||||
National Proxy System has a build-in trusted certificate authorities
|
||||
list. When the original certificate is issued by a certificate authority
|
||||
that not in the list, the proxy will issued the substitute certificate
|
||||
with an untrusted root certificate, and so consequently, the browser
|
||||
could identify unsecure connections.
|
||||
|
||||
You can add a custom certificate authority to the trusted certificate
|
||||
authorities of the system.
|
||||
|
||||
The certificate MUST be PEM format.
|
||||
|
||||
Following are the National Proxy System<65><6D>s default trusted certificate
|
||||
authorities:
|
||||
|
||||
ACCVRAIZ1
|
||||
|
||||
Actalis Authentication Root CA
|
||||
|
||||
AddTrust External CA Root
|
||||
|
||||
AffirmTrust Commercial
|
||||
|
||||
AffirmTrust Networking
|
||||
|
||||
AffirmTrust Premium
|
||||
|
||||
AffirmTrust Premium ECC
|
||||
|
||||
Amazon Root CA 1
|
||||
|
||||
Amazon Root CA 2
|
||||
|
||||
Amazon Root CA 3
|
||||
|
||||
Amazon Root CA 4
|
||||
|
||||
Atos TrustedRoot 2011
|
||||
|
||||
Autoridad de Certificacion Firmaprofesional CIF A62634068
|
||||
|
||||
Baltimore CyberTrust Root
|
||||
|
||||
Buypass Class 2 Root CA
|
||||
|
||||
Buypass Class 3 Root CA
|
||||
|
||||
CA Disig Root R2
|
||||
|
||||
CFCA EV ROOT
|
||||
|
||||
COMODO Certification Authority
|
||||
|
||||
COMODO ECC Certification Authority
|
||||
|
||||
COMODO RSA Certification Authority
|
||||
|
||||
Certigna
|
||||
|
||||
Certinomis - Root CA
|
||||
|
||||
Class 2 Primary CA
|
||||
|
||||
Certplus Root CA G1
|
||||
|
||||
Certplus Root CA G2
|
||||
|
||||
Certum Trusted Network CA
|
||||
|
||||
Certum Trusted Network CA 2
|
||||
|
||||
Chambers of Commerce Root - 2008
|
||||
|
||||
AAA Certificate Services
|
||||
|
||||
Cybertrust Global Root
|
||||
|
||||
D-TRUST Root Class 3 CA 2 2009
|
||||
|
||||
D-TRUST Root Class 3 CA 2 EV 2009
|
||||
|
||||
DST Root CA X3
|
||||
|
||||
Deutsche Telekom Root CA 2
|
||||
|
||||
DigiCert Assured ID Root CA
|
||||
|
||||
DigiCert Assured ID Root G2
|
||||
|
||||
DigiCert Assured ID Root G3
|
||||
|
||||
DigiCert Global Root CA
|
||||
|
||||
DigiCert Global Root G2
|
||||
|
||||
DigiCert Global Root G3
|
||||
|
||||
DigiCert High Assurance EV Root CA
|
||||
|
||||
DigiCert Trusted Root G4
|
||||
|
||||
E-Tugra Certification Authority
|
||||
|
||||
EC-ACC
|
||||
|
||||
EE Certification Centre Root CA
|
||||
|
||||
Entrust.net Certification Authority (2048)
|
||||
|
||||
Entrust Root Certification Authority
|
||||
|
||||
Entrust Root Certification Authority - EC1
|
||||
|
||||
Entrust Root Certification Authority - G2
|
||||
|
||||
GDCA TrustAUTH R5 ROOT
|
||||
|
||||
GeoTrust Global CA
|
||||
|
||||
GeoTrust Primary Certification Authority
|
||||
|
||||
GeoTrust Primary Certification Authority - G2
|
||||
|
||||
GeoTrust Primary Certification Authority - G3
|
||||
|
||||
GeoTrust Universal CA
|
||||
|
||||
GeoTrust Universal CA 2
|
||||
|
||||
GlobalSign
|
||||
|
||||
GlobalSign
|
||||
|
||||
GlobalSign Root CA
|
||||
|
||||
GlobalSign
|
||||
|
||||
GlobalSign
|
||||
|
||||
Global Chambersign Root - 2008
|
||||
|
||||
Go Daddy Root Certificate Authority - G2
|
||||
|
||||
Hellenic Academic and Research Institutions ECC RootCA 2015
|
||||
|
||||
Hellenic Academic and Research Institutions RootCA 2011
|
||||
|
||||
Hellenic Academic and Research Institutions RootCA 2015
|
||||
|
||||
Hongkong Post Root CA 1
|
||||
|
||||
ISRG Root X1
|
||||
|
||||
IdenTrust Commercial Root CA 1
|
||||
|
||||
IdenTrust Public Sector Root CA 1
|
||||
|
||||
Izenpe.com
|
||||
|
||||
LuxTrust Global Root 2
|
||||
|
||||
Microsec e-Szigno Root CA 2009
|
||||
|
||||
NetLock Arany (Class Gold) F?tan<61><6E>s<EFBFBD><73>tv<74><76>ny
|
||||
|
||||
Network Solutions Certificate Authority
|
||||
|
||||
OISTE WISeKey Global Root GA CA
|
||||
|
||||
OISTE WISeKey Global Root GB CA
|
||||
|
||||
OpenTrust Root CA G1
|
||||
|
||||
OpenTrust Root CA G2
|
||||
|
||||
OpenTrust Root CA G3
|
||||
|
||||
QuoVadis Root Certification Authority
|
||||
|
||||
QuoVadis Root CA 1 G3
|
||||
|
||||
QuoVadis Root CA 2
|
||||
|
||||
QuoVadis Root CA 2 G3
|
||||
|
||||
QuoVadis Root CA 3
|
||||
|
||||
QuoVadis Root CA 3 G3
|
||||
|
||||
SSL.com EV Root Certification Authority ECC
|
||||
|
||||
SSL.com EV Root Certification Authority RSA R2
|
||||
|
||||
SSL.com Root Certification Authority ECC
|
||||
|
||||
SSL.com Root Certification Authority RSA
|
||||
|
||||
SZAFIR ROOT CA2
|
||||
|
||||
SecureSign RootCA11
|
||||
|
||||
SecureTrust CA
|
||||
|
||||
Secure Global CA
|
||||
|
||||
Sonera Class2 CA
|
||||
|
||||
Staat der Nederlanden EV Root CA
|
||||
|
||||
Staat der Nederlanden Root CA - G2
|
||||
|
||||
Staat der Nederlanden Root CA - G3
|
||||
|
||||
Starfield Root Certificate Authority - G2
|
||||
|
||||
Starfield Services Root Certificate Authority - G2
|
||||
|
||||
SwissSign Gold CA - G2
|
||||
|
||||
SwissSign Silver CA - G2
|
||||
|
||||
T-TeleSec GlobalRoot Class 2
|
||||
|
||||
T-TeleSec GlobalRoot Class 3
|
||||
|
||||
TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1
|
||||
|
||||
TWCA Global Root CA
|
||||
|
||||
TWCA Root Certification Authority
|
||||
|
||||
TeliaSonera Root CA v1
|
||||
|
||||
TrustCor ECA-1
|
||||
|
||||
TrustCor RootCert CA-1
|
||||
|
||||
TrustCor RootCert CA-2
|
||||
|
||||
T<EFBFBD><EFBFBD>RKTRUST Elektronik Sertifika Hizmet Sa?lay?c?s? H5
|
||||
|
||||
USERTrust ECC Certification Authority
|
||||
|
||||
USERTrust RSA Certification Authority
|
||||
|
||||
VeriSign Class 3 Public Primary Certification Authority - G4
|
||||
|
||||
VeriSign Class 3 Public Primary Certification Authority - G5
|
||||
|
||||
VeriSign Universal Root Certification Authority
|
||||
|
||||
VeriSign Class 3 Public Primary Certification Authority - G3
|
||||
|
||||
Visa eCommerce Root
|
||||
|
||||
XRamp Global Certification Authority
|
||||
|
||||
thawte Primary Root CA
|
||||
|
||||
thawte Primary Root CA - G2
|
||||
|
||||
thawte Primary Root CA - G3
|
||||
|
||||
Microsoft Root Authority
|
||||
|
||||
Microsoft Root Certificate Authority
|
||||
|
||||
Microsoft Root Certificate Authority 2010
|
||||
|
||||
Microsoft Root Certificate Authority 2011
|
||||
|
||||
Baltimore CyberTrust Root
|
||||
|
||||
', null);
|
||||
|
||||
commit;
|
||||
|
||||
|
||||
@@ -1,191 +0,0 @@
|
||||
CREATE TABLE `inner_protection_list` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`keyword` varchar(500) NOT NULL COMMENT '<EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD>',
|
||||
`target_type` varchar(128) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`description` varchar(200) DEFAULT '',
|
||||
`is_valid` int(2) NOT NULL DEFAULT 0 COMMENT '-1ɾ<31><C9BE> 1<><31>Ч',
|
||||
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`editor_id` int(11) DEFAULT NULL,
|
||||
`creator_id` int(11) NOT NULL,
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8mb4;
|
||||
INSERT INTO `inner_protection_list` VALUES ('104', '.com', 'domainCheck', 'protection domain', '1', '2019-03-26 13:54:28', '1', '1', '2019-04-02 11:16:36');
|
||||
INSERT INTO `inner_protection_list` VALUES ('106', '.com', 'urlCheck', 'protection url', '1', '2019-03-27 11:08:24', '1', '1', '2019-04-02 11:21:52');
|
||||
commit;
|
||||
|
||||
|
||||
DROP PROCEDURE IF EXISTS `proc_statistics_config`;
|
||||
delimiter ;;
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `proc_statistics_config`()
|
||||
BEGIN
|
||||
|
||||
DECLARE ntime VARCHAR(40);/*<EFBFBD><EFBFBD>ǰʱ<EFBFBD><EFBFBD>*/
|
||||
|
||||
DECLARE otime VARCHAR(40);/*<EFBFBD>ϴ<EFBFBD>ͳ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>*/
|
||||
|
||||
DECLARE nRow VARCHAR(40);/*<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
|
||||
DECLARE tabName VARCHAR(500);
|
||||
|
||||
DECLARE description VARCHAR(500);
|
||||
|
||||
DECLARE deleteSql VARCHAR(500);
|
||||
|
||||
DECLARE done INT;/*<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD>ʶ*/
|
||||
|
||||
DECLARE flag INT;/*ѭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ*/
|
||||
|
||||
DECLARE t_error INT;/*<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ*/
|
||||
|
||||
DECLARE proc_log_table VARCHAR(100);/*<EFBFBD>洢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>*/
|
||||
|
||||
DECLARE proc_name VARCHAR(100);/*<EFBFBD>洢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
|
||||
DECLARE icursor CURSOR FOR SELECT tab_name FROM statistics_tables where is_valid=1;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT found SET done=1;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION set t_error=1;
|
||||
|
||||
select max(statistic_time) into otime from cfg_num_statistics;
|
||||
|
||||
SET done=0;
|
||||
|
||||
SET t_error=0;
|
||||
|
||||
SET proc_log_table='proc_exec_log';
|
||||
|
||||
SET proc_name='proc_statistics_config';
|
||||
|
||||
SET ntime=DATE_FORMAT(SYSDATE(),'%Y-%m-%d %H:%i:%S');
|
||||
|
||||
OPEN icursor;
|
||||
|
||||
loop_iloop:LOOP
|
||||
|
||||
FETCH icursor INTO tabName;
|
||||
|
||||
SET description=tabName;
|
||||
|
||||
set @descriptionStart=concat(description,'<EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>start');
|
||||
|
||||
/*ͳ<EFBFBD>Ƶ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD>start*/
|
||||
|
||||
set @v_log_sql1 := concat('insert into ',proc_log_table,'(proc_name,table_name,log_time,description) values(?,?,?,?)');
|
||||
|
||||
PREPARE execs FROM @v_log_sql1;
|
||||
|
||||
EXECUTE execs using proc_name,proc_log_table,ntime,@descriptionStart;
|
||||
|
||||
DEALLOCATE PREPARE execs;
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
||||
#20190328 <20><><EFBFBD>Ӷ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>is_audit=1 && (is_valid=1 || is_valid=0) <20><>Ϊapproved <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>cfg_state=4[is_valid=0 && is_audit=1],<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>cfg_state=1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>չʾ<D5B9><CABE>approvedֵʵ<D6B5>ʰ<EFBFBD><CAB0><EFBFBD>cfg_state=4<><34>cfg_state=1
|
||||
set @insert_statistics_sql := concat('insert into cfg_num_statistics(statistic_time,audit_time,function_id,service_id,action,compile_id,cfg_state) select ','''',ntime,'''',',','audit_time,function_id,service_id,action,compile_id,if(is_valid=-1,-1,if(is_valid=1,1,if(is_audit=0,0,if(is_audit=1,4,if(is_audit=2,2,if(is_audit=3,3,0)))))) cfg_state from ',tabName);
|
||||
|
||||
|
||||
PREPARE execs FROM @insert_statistics_sql;
|
||||
|
||||
EXECUTE execs;
|
||||
|
||||
DEALLOCATE PREPARE execs;
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
||||
|
||||
set @descriptionEnd=concat(description,'<EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>end');
|
||||
|
||||
set @v_log_sql2 := concat('insert into ',proc_log_table,'(proc_name,table_name,log_time,description) values(?,?,?,?)');
|
||||
|
||||
PREPARE execs FROM @v_log_sql2;
|
||||
|
||||
EXECUTE execs using proc_name,proc_log_table,ntime,@descriptionEnd;
|
||||
|
||||
DEALLOCATE PREPARE execs;
|
||||
|
||||
COMMIT;
|
||||
|
||||
/*<EFBFBD>쳣<EFBFBD>˳<EFBFBD>loop*/
|
||||
IF t_error=1 THEN
|
||||
LEAVE loop_iloop;
|
||||
END IF;
|
||||
|
||||
/*ѭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>loop*/
|
||||
IF done=1 THEN
|
||||
|
||||
LEAVE loop_iloop;
|
||||
|
||||
ELSE
|
||||
|
||||
SET flag=0;
|
||||
|
||||
END IF;
|
||||
|
||||
IF flag=0 THEN
|
||||
|
||||
SET done=0;
|
||||
|
||||
END IF;
|
||||
|
||||
END LOOP loop_iloop;
|
||||
|
||||
CLOSE icursor;
|
||||
/*ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
SELECT count(statistic_time) INTO nRow from cfg_num_statistics where statistic_time=ntime;
|
||||
|
||||
|
||||
IF t_error=1 THEN /*<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쳣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
delete from cfg_num_statistics where statistic_time=ntime;
|
||||
COMMIT;
|
||||
ELSEIF nRow > 0 THEN /*<EFBFBD>жϱ<EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>룬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>ͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
|
||||
delete from cfg_num_statistics where statistic_time=otime;
|
||||
COMMIT;
|
||||
END IF;
|
||||
COMMIT;
|
||||
END
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
#ִ<>д洢<D0B4><E6B4A2><EFBFBD><EFBFBD>
|
||||
call exec_procs();
|
||||
|
||||
-- ------------
|
||||
-- <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>type<70><65><EFBFBD>ԣ<EFBFBD><D4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>ȫ<EFBFBD><C8AB>ͬ<EFBFBD><CDAC>״̬Ϊ3(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
-- ------------
|
||||
ALTER TABLE schedule_cfg ADD type int(1) DEFAULT 1 COMMENT '1:<3A><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32>ȫ<EFBFBD><C8AB>ͬ<EFBFBD><CDAC>ʱδִ<CEB4>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>';
|
||||
update schedule_cfg set type=1;
|
||||
update sys_data_dictionary_item t set t.item_value=3 where t.dictionary_id=142;
|
||||
|
||||
-- ------------
|
||||
-- ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>-><3E><><EFBFBD><EFBFBD>Ա<EFBFBD>û<EFBFBD>Ԥ<EFBFBD><D4A4>
|
||||
-- ------------
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('2', '0,1,2,', 'admin_user_warn', 'admin user warn', '5060', '/sys/warn/userWarnList', '', '', '1', 'sys:warnList:view', '1', '2019-03-28 10:06:26', '1', '2019-03-28 11:36:42', '', '1', NULL, '0', '0', NULL);
|
||||
|
||||
CREATE TABLE `sys_user_warn` (
|
||||
`service_id` int(11) NOT NULL COMMENT 'ҵ<EFBFBD><EFBFBD>ID',
|
||||
`service_desc` varchar(255) DEFAULT '' COMMENT 'ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`interface_cfg_total` int(11) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`system_cfg_total` int(11) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||
`remark` varchar(255) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ע',
|
||||
PRIMARY KEY (`service_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>û<EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
||||
-- <20><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('109', '0,1,109,', 'protection_list_manage', 'protection list manage', '5060', '/basics/innerProtectionList/list', '', 'fa fa-sticky-note-o', '1', 'basic:inner_protection_list:list', '1', '2019-03-25 15:28:34', '1', '2019-03-26 15:04:47', '', '1', NULL, '0', '0', NULL);
|
||||
|
||||
-- ------------
|
||||
-- <20><><EFBFBD>˲<EFBFBD><CBB2>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ܣ<EFBFBD>ֻ<EFBFBD>н<EFBFBD><D0BD>˲˵<CBB2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>沢<EFBFBD>·<EFBFBD><C2B7>û<EFBFBD><C3BB>Ľ<EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD>˽<EFBFBD>ɫ<EFBFBD>µ<EFBFBD><C2B5>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>˰汾ע<E6B1BE><D7A2><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD>䣩
|
||||
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2>·<EFBFBD><C2B7>˵<EFBFBD>
|
||||
-- ------------
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (86, '0,1,86,', 'save_and_audit', 'save and audit', 5060, '', '', '', 0, 'save:audit:permission', '1', '2019-04-08 11:30:31', '1', '2019-04-08 11:47:16', 'save_and_audit', 1, NULL, 0, 0, NULL);
|
||||
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2>·<EFBFBD><C2B7><EFBFBD>ɫ
|
||||
INSERT INTO `sys_role`(`NAME`, `DATA_SCOPE`, `REMARK`, `STATUS`, `CREATE_TIME`, `ROLE_TYPE`) VALUES ('saveAndAudit', 1, '', 1, '2019-04-09 11:33:40', 'user');
|
||||
-- <20><><EFBFBD><EFBFBD>ΪsaveAndAudit<69><74>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>save_and_audit<69>˵<EFBFBD><CBB5><EFBFBD>
|
||||
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='saveAndAudit' and m.code='save_and_audit'
|
||||
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
#function_region_dict 对应ip_pattern,port_pattern的字段长度拓展一倍,使用分号分隔源/目的
|
||||
ALTER TABLE function_region_dict MODIFY config_ip_pattern VARCHAR(20) COMMENT "ip的格式 1:ip掩码;2:IP范围;3:IP;使用逗号分隔,源ip与目的IP使用;分隔";
|
||||
ALTER TABLE function_region_dict MODIFY config_port_pattern VARCHAR(20) COMMENT "端口的格式,1:port;2:port_mask;使用逗号分隔,源端口与目的端口使用;分隔";
|
||||
#各表修改ip_pattern,port_pattern
|
||||
#app_ip_cfg
|
||||
ALTER TABLE app_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE app_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE app_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE app_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#app_ip_range_cfg
|
||||
ALTER TABLE app_ip_range_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE app_ip_range_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE app_ip_range_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE app_ip_range_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#area_ip_cfg
|
||||
ALTER TABLE area_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE area_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE area_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE area_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#asn_ip_cfg
|
||||
ALTER TABLE asn_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE asn_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE asn_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE asn_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#av_cont_ip_cfg
|
||||
ALTER TABLE av_cont_ip_cfg change ip_pattern src_ip_pattern int COMMENT '源ip格式';
|
||||
ALTER TABLE av_cont_ip_cfg add dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE av_cont_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE av_cont_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#av_pic_ip_cfg
|
||||
ALTER TABLE av_pic_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE av_pic_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE av_pic_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE av_pic_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#av_voip_ip_cfg
|
||||
ALTER TABLE av_voip_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE av_voip_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE av_voip_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE av_voip_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#ddos_ip_cfg
|
||||
ALTER TABLE ddos_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE ddos_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE ddos_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE ddos_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#dns_ip_cfg
|
||||
ALTER TABLE dns_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE dns_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE dns_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE dns_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#ip_port_cfg
|
||||
ALTER TABLE ip_port_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE ip_port_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE ip_port_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE ip_port_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#ip_reuse_ip_cfg
|
||||
ALTER TABLE ip_reuse_ip_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE ip_reuse_ip_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
ALTER TABLE ip_reuse_ip_cfg CHANGE port_pattern src_port_pattern INT COMMENT '源端口格式';
|
||||
ALTER TABLE ip_reuse_ip_cfg ADD dest_port_pattern INT COMMENT '目的端口格式';
|
||||
#ip_reuse_policy_cfg
|
||||
ALTER TABLE ip_reuse_policy_cfg CHANGE ip_pattern src_ip_pattern INT COMMENT '源ip格式';
|
||||
ALTER TABLE ip_reuse_policy_cfg ADD dest_ip_pattern INT COMMENT '目的ip格式';
|
||||
#修改字典的值
|
||||
UPDATE function_region_dict SET config_ip_pattern ="1,2,3;1,2,3" WHERE config_ip_pattern="1,2,3";
|
||||
UPDATE function_region_dict SET config_ip_pattern ="1;1" WHERE config_ip_pattern="1";
|
||||
UPDATE function_region_dict SET config_ip_pattern ="3;3" WHERE config_ip_pattern="3";
|
||||
UPDATE function_region_dict SET config_ip_pattern ="1,3;1,3" WHERE config_ip_pattern="1,3";
|
||||
|
||||
UPDATE function_region_dict SET config_port_pattern ="1;1" WHERE config_port_pattern="1";
|
||||
UPDATE function_region_dict SET config_port_pattern ="1,2;1,2" WHERE config_port_pattern="1,2";
|
||||
#Spoofing IP修改只显示目的IP
|
||||
UPDATE function_region_dict SET config_ip_port_show=3 WHERE function_id=401;
|
||||
#ASN IP修改只显示目的IP
|
||||
UPDATE function_region_dict SET config_ip_port_show=3 WHERE function_id=600;
|
||||
#sql 更新字段语句
|
||||
UPDATE app_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM app_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE app_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM app_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE app_ip_range_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM app_ip_range_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE app_ip_range_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM app_ip_range_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE area_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM area_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE area_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM area_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE asn_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM asn_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE asn_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM asn_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE av_cont_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_cont_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE av_cont_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_cont_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE av_pic_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_pic_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE av_pic_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_pic_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE av_voip_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM av_voip_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE av_voip_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM av_voip_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE ddos_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ddos_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE ddos_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM ddos_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE dns_ip_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM dns_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE dns_ip_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM dns_ip_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
|
||||
UPDATE ip_port_cfg c SET c.dest_ip_pattern =(SELECT b.src_ip_pattern FROM ( SELECT a.src_ip_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
UPDATE ip_port_cfg c SET c.dest_port_pattern =(SELECT b.src_port_pattern FROM ( SELECT a.src_port_pattern,a.`cfg_id` FROM ip_port_cfg a) b WHERE b.cfg_id=c.`cfg_id`);
|
||||
@@ -1,4 +0,0 @@
|
||||
#ʵʱ<CAB5><CAB1><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʋ˵<C6B2>
|
||||
INSERT INTO `sys_menu` ( `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ( '875', '0,1,780,875,', 'statistics', 'Statistics', '39', '/dashboard/traffic/commonNewList', '', '', '1', '', '1', '2019-05-06 14:07:08', '1', '2019-05-27 15:24:41', '', '1', NULL, '0', '0', NULL);
|
||||
#Ϊ<><CEAA>admin<69><6E>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>
|
||||
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.href='/dashboard/traffic/commonNewList';
|
||||
@@ -1,347 +0,0 @@
|
||||
update function_service_dict set action=2,action_code='forward' where service_id=512 and is_valid=1;
|
||||
#fail method字典
|
||||
INSERT INTO `sys_data_dictionary_name`(`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`) VALUES ('fail_method', 'FAIL_METHOD', '用于代理拦截策略', NULL, '2019-05-09 11:01:16', '2019-05-09 11:01:21', 1);
|
||||
#INSERT INTO `sys_data_dictionary_item`(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES (4096, 'pass-through', 'Pass-Through', '默认', 1, 1, 1, 154);
|
||||
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'pass-through', 'Pass-Through', '默认', 1, 1, 1, id from sys_data_dictionary_name where mark='FAIL_METHOD';
|
||||
#INSERT INTO `sys_data_dictionary_item`(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES (4097, 'fail-close', 'Fail-Close', NULL, 2, 1, 1, 154);
|
||||
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'fail-close', 'Fail-Close', NULL, 2, 1, 1, id from sys_data_dictionary_name where mark='FAIL_METHOD';
|
||||
#SSL version字典
|
||||
INSERT INTO `sys_data_dictionary_name`(`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`) VALUES ('SSL_VERSION', 'SSL_VERSION', '用于代理拦截策略,SSL版本', NULL, '2019-05-09 11:50:43', '2019-05-09 11:50:46', 1);
|
||||
#INSERT INTO `sys_data_dictionary_item`(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES (4099, 'ssl3', 'SSLv3', 'min default', 1, 1, 1, 155);
|
||||
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'ssl3', 'SSLv3', 'min default', 1, 1, 1, id from sys_data_dictionary_name where mark='SSL_VERSION';
|
||||
#INSERT INTO `sys_data_dictionary_item`(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES (4100, 'tls10', 'TLSv1.0', NULL, 2, 1, 1, 155);
|
||||
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'tls10', 'TLSv1.0', NULL, 2, 1, 1, id from sys_data_dictionary_name where mark='SSL_VERSION';
|
||||
#INSERT INTO `sys_data_dictionary_item`(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES (4101, 'tls11', 'TLSv1.1', NULL, 3, 1, 1, 155);
|
||||
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'tls11', 'TLSv1.1', NULL, 3, 1, 1, id from sys_data_dictionary_name where mark='SSL_VERSION';
|
||||
#INSERT INTO `sys_data_dictionary_item`(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES (4102, 'tls12', 'TLSv1.2', NULL, 4, 1, 1, 155);
|
||||
INSERT INTO `sys_data_dictionary_item` (`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select'tls12', 'TLSv1.2', NULL, 4, 1, 1, id from sys_data_dictionary_name where mark='SSL_VERSION';
|
||||
#INSERT INTO `sys_data_dictionary_item`(`id`, `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES (4103, 'tls13', 'TLSv1.3', 'max default', 5, 1, 1, 155);
|
||||
INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'tls13', 'TLSv1.3', 'max default', 5, 1, 1, id from sys_data_dictionary_name where mark='SSL_VERSION';
|
||||
|
||||
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1121, '0,1,86,717,1121,', 'hijack_file_strategy', '劫持文件', 4, '/proxy/fileHijack/list', '', '', 1, 'proxy:fileHijack:config', '1', '2019-05-09 11:16:20', '1', '2019-05-09 11:16:20', '', 1, NULL, 0, 0, 513);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1122, '0,1,150,750,1122,', 'hijack_file_strategy', '劫持文件', 422, '/proxy/fileHijack/list', '', '', 1, 'proxy:fileHijack:confirm', '1', '2019-05-09 14:58:10', '1', '2019-05-09 14:58:10', '', 1, NULL, 0, 0, 513);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1123, '0,1,151,865,1123,', 'hijack_file_strategy', '劫持文件', 35, '/proxy/fileHijack/list', '', '', 1, 'proxy:fileHijack:audit', '1', '2019-05-09 14:59:54', '1', '2019-05-09 14:59:54', '', 1, NULL, 0, 0, 513);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1121, '0,1,86,717,1121,', 'file_insert_script', '注入脚本文件', 4, '/proxy/fileInsertScript/list', '', '', 1, 'proxy:fileInsertScript:config', '1', '2019-05-09 16:03:58', '1', '2019-05-09 16:03:58', '', 1, NULL, 0, 0, 514);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1122, '0,1,150,750,1122,', 'file_insert_script', '注入脚本文件', 424, '/proxy/fileInsertScript/list', '', '', 1, 'proxy:fileInsertScript:confirm', '1', '2019-05-09 16:06:17', '1', '2019-05-09 16:06:17', '', 1, NULL, 0, 0, 514);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1123, '0,1,151,865,1123,', 'file_insert_script', '注入脚本文件', 37, '/proxy/fileInsertScript/list', '', '', 1, 'proxy:fileInsertScript:audit', '1', '2019-05-09 16:07:13', '1', '2019-05-09 16:07:13', '', 1, NULL, 0, 0, 514);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1121, '0,1,86,717,1121,', 'traffic_mirror_address', '流量转发目的地址', 8, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:config', '1', '2019-05-09 16:03:58', '1', '2019-05-09 16:03:58', '', 1, NULL, 0, 0, 515);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1122, '0,1,150,750,1122,', 'traffic_mirror_address', '流量转发目的地址', 426, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:confirm', '1', '2019-05-09 16:06:17', '1', '2019-05-09 16:06:17', '', 1, NULL, 0, 0, 515);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1123, '0,1,151,865,1123,', 'traffic_mirror_address', '流量转发目的地址', 39, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:audit', '1', '2019-05-09 16:07:13', '1', '2019-05-09 16:07:13', '', 1, NULL, 0, 0, 515);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1121, '0,1,86,717,1121,', 'visit_response_page', '访问阻断页面', 10, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:config', '1', '2019-05-09 11:16:20', '1', '2019-05-09 11:16:20', '', 1, NULL, 0, 0, 516);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1122, '0,1,150,750,1122,', 'visit_response_page', '访问阻断页面', 428, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:confirm', '1', '2019-05-09 14:58:10', '1', '2019-05-09 14:58:10', '', 1, NULL, 0, 0, 516);
|
||||
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1123, '0,1,151,865,1123,', 'visit_response_page', '访问阻断页面', 41, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:audit', '1', '2019-05-09 14:59:54', '1', '2019-05-09 14:59:54', '', 1, NULL, 0, 0, 516);
|
||||
|
||||
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 (513, 0, 1, 'monit', 643, 'hijack_file_strategy', '', 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', 0, 1, '');
|
||||
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 (514, 0, 1, 'monit', 644, 'file_insert_script', '', 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', 0, 1, '');
|
||||
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 (515, 0, 1, 'monit', 645, 'file_traffic_mirror', NULL, 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', NULL, 0, 1, NULL);
|
||||
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 (512, 0, 1, 'monit', 608, 'file_strategy', NULL, 0, NULL, '2019-05-17 11:46:48', NULL, '2019-05-17 11:46:51', NULL, 0, 1, NULL);
|
||||
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 (516, 0, 1, 'monit', 646, 'visit_response_page', NULL, 1, NULL, '2019-05-17 11:46:48', NULL, '2019-05-17 11:46:51', NULL, 0, 1, NULL);
|
||||
|
||||
#注入脚本文件
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
CREATE TABLE `pxy_profile_insert_scripts` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
|
||||
`cfg_desc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'profile_name',
|
||||
`cfg_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`action` int(11) NULL DEFAULT NULL,
|
||||
`is_valid` int(11) NOT NULL COMMENT '0无效,1有效,-1删除;1) 未审核时配置可删除;2) 审核通过,此字段置1;3) 取消审核通过,此字段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0未审核,1审核通过,2审核未通过,3取消审核通过;1) 审核未通过,配置可修改;2) 审核通过,配置不可删除,只能取消审核通过',
|
||||
`creator_id` int(11) NOT NULL COMMENT '取自sys_user.id',
|
||||
`create_time` datetime(0) NULL DEFAULT NULL,
|
||||
`editor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`edit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`auditor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`audit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表',
|
||||
`request_id` int(11) NOT NULL COMMENT '取自request_info.id',
|
||||
`compile_id` int(11) NULL DEFAULT NULL COMMENT 'profile_id、取自服务接口返回的maat配置的编译id,配置初始入库时获取。',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0否,1是',
|
||||
`classify` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类id,多个用英文逗号分隔',
|
||||
`attribute` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质id,多个用英文逗号分隔',
|
||||
`lable` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔',
|
||||
`area_effective_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '多个英文逗号分隔',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_region_code` int(11) NULL DEFAULT NULL,
|
||||
`format` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型,“video/mp4” (exe、apk)',
|
||||
`path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '储存路径',
|
||||
`cancel_request_id` int(11) NULL DEFAULT NULL COMMENT '取消审核来函',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
#内容劫持文件
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
CREATE TABLE `pxy_profile_hijack_files` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
|
||||
`cfg_desc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'profile_name',
|
||||
`cfg_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`action` int(11) NULL DEFAULT NULL,
|
||||
`is_valid` int(11) NOT NULL COMMENT '0无效,1有效,-1删除;1) 未审核时配置可删除;2) 审核通过,此字段置1;3) 取消审核通过,此字段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0未审核,1审核通过,2审核未通过,3取消审核通过;1) 审核未通过,配置可修改;2) 审核通过,配置不可删除,只能取消审核通过',
|
||||
`creator_id` int(11) NOT NULL COMMENT '取自sys_user.id',
|
||||
`create_time` datetime(0) NULL DEFAULT NULL,
|
||||
`editor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`edit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`auditor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`audit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表',
|
||||
`request_id` int(11) NOT NULL COMMENT '取自request_info.id',
|
||||
`compile_id` int(11) NULL DEFAULT NULL COMMENT 'profile_id、取自服务接口返回的maat配置的编译id,配置初始入库时获取。',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0否,1是',
|
||||
`classify` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类id,多个用英文逗号分隔',
|
||||
`attribute` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质id,多个用英文逗号分隔',
|
||||
`lable` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔',
|
||||
`area_effective_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '多个英文逗号分隔',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_region_code` int(11) NULL DEFAULT NULL,
|
||||
`content_type` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型,“video/mp4” (exe、apk)',
|
||||
`path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '储存路径',
|
||||
`cancel_request_id` int(11) NULL DEFAULT NULL COMMENT '取消审核来函',
|
||||
`content_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 58 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
#流量转发目的地址
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
CREATE TABLE `pxy_profile_traffic_mirror` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
|
||||
`cfg_desc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'profile_name',
|
||||
`cfg_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`action` int(11) NULL DEFAULT NULL,
|
||||
`is_valid` int(11) NOT NULL COMMENT '0无效,1有效,-1删除;1) 未审核时配置可删除;2) 审核通过,此字段置1;3) 取消审核通过,此字段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0未审核,1审核通过,2审核未通过,3取消审核通过;1) 审核未通过,配置可修改;2) 审核通过,配置不可删除,只能取消审核通过',
|
||||
`creator_id` int(11) NOT NULL COMMENT '取自sys_user.id',
|
||||
`create_time` datetime(0) NULL DEFAULT NULL,
|
||||
`editor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`edit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`auditor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`audit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表',
|
||||
`request_id` int(11) NOT NULL COMMENT '取自request_info.id',
|
||||
`compile_id` int(11) NULL DEFAULT NULL COMMENT 'profile_id、取自服务接口返回的maat配置的编译id,配置初始入库时获取。',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0否,1是',
|
||||
`classify` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类id,多个用英文逗号分隔',
|
||||
`attribute` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质id,多个用英文逗号分隔',
|
||||
`lable` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔',
|
||||
`area_effective_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '多个英文逗号分隔',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_region_code` int(11) NULL DEFAULT NULL,
|
||||
`addr_list` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '地址列表,JSON格式,vlan和mac互斥',
|
||||
`addr_type` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'vlan,mac',
|
||||
`cancel_request_id` int(11) NULL DEFAULT NULL COMMENT '取消审核来函',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
|
||||
#访问阻断界面
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pxy_profile_response_pages
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `pxy_profile_response_pages`;
|
||||
CREATE TABLE `pxy_profile_response_pages` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
|
||||
`cfg_desc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`cfg_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`action` int(11) NULL DEFAULT NULL,
|
||||
`is_valid` int(11) NOT NULL COMMENT '0无效,1有效,-1删除;1) 未审核时配置可删除;2) 审核通过,此字段置1;3) 取消审核通过,此字段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0未审核,1审核通过,2审核未通过,3取消审核通过;1) 审核未通过,配置可修改;2) 审核通过,配置不可删除,只能取消审核通过',
|
||||
`creator_id` int(11) NOT NULL COMMENT '取自sys_user.id',
|
||||
`create_time` datetime(0) NULL DEFAULT NULL,
|
||||
`editor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`edit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`auditor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`audit_time` datetime(0) NULL DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表',
|
||||
`request_id` int(11) NOT NULL COMMENT '取自request_info.id',
|
||||
`compile_id` int(11) NULL DEFAULT NULL COMMENT '取自服务接口返回的maat配置的编译id,配置初始入库时获取。',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0否,1是',
|
||||
`classify` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类id,多个用英文逗号分隔',
|
||||
`attribute` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质id,多个用英文逗号分隔',
|
||||
`lable` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔',
|
||||
`area_effective_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '多个英文逗号分隔',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_region_code` int(11) NULL DEFAULT NULL,
|
||||
`file_desc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件名称',
|
||||
`url` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件保存的url',
|
||||
`content_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型,如text/html,取字典表contentType',
|
||||
`content_length` int(11) NOT NULL DEFAULT 0 COMMENT '文件长度',
|
||||
`md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件md5值',
|
||||
`cancel_request_id` int(11) NULL DEFAULT NULL COMMENT '取消审核来函',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
#为admin角色分配新的菜单权限
|
||||
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('hijack_file_strategy','file_insert_script','traffic_mirror_address','visit_response_page');
|
||||
|
||||
|
||||
# 菜单
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('724', '0,1,86,719,724,', 'http_manipulation', 'HTTP操控', '330', '/proxy/control/manipulatPolicy/list', '', '', '1', 'http_manipulation:config', '1', '2019-05-07 15:04:51', '1', '2019-05-07 15:53:45', '', '1', NULL, '0', '0', '215');
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('757', '0,1,150,748,757,', 'http_manipulation', 'HTTP操控', '180', '/proxy/control/manipulatPolicy/list', '', '', '1', 'http_manipulation:confirm', '1', '2019-05-10 15:05:33', '1', '2019-05-10 15:05:33', '', '1', NULL, '0', '0', '215');
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('852', '0,1,151,850,852,', 'http_manipulation', 'HTTP操控', '180', '/proxy/control/manipulatPolicy/list', '', '', '1', 'http_manipulation:audit', '1', '2019-05-10 15:06:30', '1', '2019-05-10 15:06:30', '', '1', NULL, '0', '0', '215');
|
||||
|
||||
# 配置表
|
||||
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 ('215', '0', '48', 'redirect', '656', 'http_manipulation', NULL, '1', '1', '2019-05-07 15:46:17', NULL, NULL, '1,2,3,4,5,6', '1', '0', '1;0,1,2;2');
|
||||
|
||||
ALTER TABLE function_region_dict AUTO_INCREMENT = 700;
|
||||
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 ('215', '', '2', 'PXY_CTRL_HTTP_URL', 'HTTP URL管控配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', 'https_url', '0,1', '0,1,2,3', '', '0', '1', '', '', '', '', '', '1', '1');
|
||||
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 ('215', 'User-Agent,Cookie,others', '3', 'PXY_CTRL_HTTP_REQ_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', '', '', '', '', '', '2', '1');
|
||||
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 ('215', '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');
|
||||
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 ('215', '', '5', 'PXY_CTRL_HTTP_REQ_BODY', 'HTTP请求内容管控配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0,1,2', '1', '', '', '', '', '', '4', '1');
|
||||
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 ('215', '', '6', 'PXY_CTRL_HTTP_RES_BODY', 'HTTP应答内容管控配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0,1,2', '1', '', '', '', '', '', '5', '1');
|
||||
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 ('215', '', '1', 'PXY_CTRL_IP', 'HTTP IP管控配置', '1', '1', '1', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '', '', '4,6', '', '', '1,2,3;1,2,3', '1,2;1,2', '0', '0,6,17', '1,2,3,4', '6', '1');
|
||||
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 ('215', '', '3', 'PXY_CTRL_SUBSCRIBE_ID', 'proxy SUBSCRIBE字符串配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', 'subscribe_id', '0', '3', '', '0', '0', '', '', '', '', '', '7', '0');
|
||||
|
||||
#代理相关的应答头的district的值set-cookie修改为Set-Cookie
|
||||
update function_region_dict set config_district='Set-Cookie,Content-Type,others' where function_id in(210,207,215) and config_region_value='PXY_CTRL_HTTP_RES_HDR';
|
||||
|
||||
#为admin角色分配操控菜单权限
|
||||
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('http_manipulation');
|
||||
#删除拦截限速业务
|
||||
update function_service_dict set is_valid=0 where action_code='ratelimit' and service_id=514 and function_id=200;
|
||||
#删除service、region字典*****************确认是否删除server_conf.xml
|
||||
update function_region_dict set is_Valid=0 where function_id in(208,209) and is_valid=1;
|
||||
update function_service_dict set is_Valid=0 where function_id in(208,209) and is_valid=1;
|
||||
#删除旧配置
|
||||
#200:拦截/210:监测/207:阻断/208:重定向/209:替换/211:白名单
|
||||
#旧的IP配置删除
|
||||
update ip_port_cfg set is_valid=-1,is_audit=0 where compile_id in (select compile_id from cfg_index_info where function_id in(210,200,207,208,209,211) and is_valid != -1);
|
||||
#旧的URL配置删除
|
||||
update http_url_cfg set is_valid=-1,is_audit=0 where compile_id in (select compile_id from cfg_index_info where function_id in(210,200,207,208,209,211) and is_valid != -1);
|
||||
#旧的REQ_HEADER配置删除
|
||||
update http_req_head_cfg set is_valid=-1,is_audit=0 where compile_id in (select compile_id from cfg_index_info where function_id in(210,200,207,208,209,211) and is_valid != -1);
|
||||
#旧的RES_HEADER配置删除
|
||||
update http_res_head_cfg set is_valid=-1,is_audit=0 where compile_id in (select compile_id from cfg_index_info where function_id in(210,200,207,208,209,211) and is_valid != -1);
|
||||
#旧的HTTP BODY配置删除
|
||||
update http_body_cfg set is_valid=-1,is_audit=0 where compile_id in (select compile_id from cfg_index_info where function_id in(210,200,207,208,209,211) and is_valid != -1);
|
||||
#旧的HTTP BODY配置删除
|
||||
update ntc_subscribe_id_cfg set is_valid=-1,is_audit=0 where compile_id in (select compile_id from cfg_index_info where function_id in(210,200,207,208,209,211) and is_valid != -1);
|
||||
#旧的配置删除
|
||||
update cfg_index_info set is_valid=-1,is_audit=0 where function_id in(210,200,207,208,209,211) and is_valid != -1;
|
||||
#旧的keyring配置删除
|
||||
update pxy_obj_keyring set is_valid=-1,is_audit=0 where is_valid != -1;
|
||||
#旧的可信证书配置删除
|
||||
update pxy_obj_trusted_ca_cert set is_valid=-1,is_audit=0 where is_valid != -1;
|
||||
#旧的可信证书CRL配置删除
|
||||
update pxy_obj_trusted_ca_crl set is_valid=-1,is_audit=0 where is_valid != -1;
|
||||
|
||||
#劫持相关字典表
|
||||
INSERT INTO `sys_data_dictionary_name`(`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`)
|
||||
VALUES ('劫持文件内容格式', 'CONTENT_TYPE_HIJACK', 'hijack content-type', '', '2019-05-21 00:00:00', '2019-05-21 00:00:00', 1);
|
||||
|
||||
|
||||
#添加字典信息
|
||||
INSERT into sys_data_dictionary_item(item_code,item_value,item_desc,item_sort,`status`,type,dictionary_id)
|
||||
VALUES('image/gif','image/gif','gif',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('image/jpeg','image/jpeg','jpg',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('image/png','image/png','png',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('image/svg+xml','image/svg+xml','svg',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('application/x-msdos-program','application/x-msdos-program','exe',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('application/x-msdownload','application/x-msdownload','exe',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('application/octet-stream','application/octet-stream','exe',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('application/vnd.android.package-archive','application/vnd.android.package-archive','apk',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK')),
|
||||
('text/html','text/html','html',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_HIJACK'));
|
||||
|
||||
#文件策略相关字典表
|
||||
INSERT INTO `sys_data_dictionary_name`(`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`)
|
||||
VALUES('文件策略内容格式', 'CONTENT_TYPE_FILESTRATEGY', 'fileStrategy content-type', '', '2019-05-21 00:00:00', '2019-05-21 00:00:00', 1);
|
||||
|
||||
INSERT into sys_data_dictionary_item(item_code,item_value,item_sort,`status`,type,dictionary_id)
|
||||
VALUES('template','template',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_FILESTRATEGY')),
|
||||
('html','html',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_FILESTRATEGY'));
|
||||
|
||||
#注入脚本相关字典表
|
||||
INSERT INTO `sys_data_dictionary_name`(`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`)
|
||||
VALUES('注入脚本文件内容格式', 'CONTENT_TYPE_INSERTSCRIPT', 'insertScript content-type', '', '2019-05-21 00:00:00', '2019-05-21 00:00:00', 1);
|
||||
|
||||
INSERT into sys_data_dictionary_item(item_code,item_value,item_sort,`status`,type,dictionary_id)
|
||||
VALUES('css','css',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_INSERTSCRIPT')),
|
||||
('js','js',0,1,1,(SELECT id FROM sys_data_dictionary_name WHERE mark='CONTENT_TYPE_INSERTSCRIPT'));
|
||||
|
||||
|
||||
#可信证书列表增加是否内置证书属性
|
||||
alter table pxy_obj_trusted_ca_cert add built_in int(1) default 0 comment 'is built-in';
|
||||
#修改已有证书为非内置证书
|
||||
update pxy_obj_trusted_ca_cert set built_in=0 where built_in is null;
|
||||
|
||||
#拦截策略内置0和1号配置
|
||||
INSERT INTO `cfg_index_info`
|
||||
(`cfg_desc`, `action`, `is_valid`, `is_audit`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `service_id`, `request_id`, `compile_id`, `is_area_effective`, `classify`, `attribute`, `lable`, `area_effective_ids`, `function_id`, `dns_strategy_id`, `do_log`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`, `office_id`, `cancel_request_id`, `source_compile_id`, `do_blacklist`, `common_group_ids`)
|
||||
VALUES ('default intercept policy', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, 521, 0, 0, 0, '0', '0', '0', '', 200, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '');
|
||||
INSERT INTO `http_url_cfg`
|
||||
(`cfg_desc`, `cfg_keywords`, `action`, `is_valid`, `is_audit`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `service_id`, `request_id`, `compile_id`, `is_area_effective`, `classify`, `attribute`, `lable`, `expr_type`, `match_method`, `is_hexbin`, `area_effective_ids`, `function_id`, `cfg_region_code`, `cfg_type`, `ratelimit`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`)
|
||||
VALUES ('default intercept policy', '20190946.com', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, 521, 0, 0, 0, '0', '0', '0', 0, 1, 2, '', 200, 2, 'PXY_INTERCEPT_DOMAIN', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `cfg_index_info`
|
||||
(`cfg_desc`, `action`, `is_valid`, `is_audit`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `service_id`, `request_id`, `compile_id`, `is_area_effective`, `classify`, `attribute`, `lable`, `area_effective_ids`, `function_id`, `dns_strategy_id`, `do_log`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`, `office_id`, `cancel_request_id`, `source_compile_id`, `do_blacklist`, `common_group_ids`)
|
||||
VALUES ('built-in fe3.delivery.mp.microsoft.com', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, 521, 0, 1, 0, '0', '0', '0', '', 200, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '');
|
||||
INSERT INTO `http_url_cfg`
|
||||
(`cfg_desc`, `cfg_keywords`, `action`, `is_valid`, `is_audit`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `service_id`, `request_id`, `compile_id`, `is_area_effective`, `classify`, `attribute`, `lable`, `expr_type`, `match_method`, `is_hexbin`, `area_effective_ids`, `function_id`, `cfg_region_code`, `cfg_type`, `ratelimit`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`)
|
||||
VALUES ('built-in fe3.delivery.mp.microsoft.com', 'fe3.delivery.mp.microsoft.com', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, 521, 0, 1, 0, '0', '0', '0', 0, 3, 2, '', 200, 2, 'PXY_INTERCEPT_DOMAIN', NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
|
||||
|
||||
|
||||
#日志检索-国家代理下新增HTTP(S)操控菜单
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('951', '0,1,152,951,', 'http_manipulation', 'HTTP操控', '5', '/log/pxy/httpManipulList?searchAction=48', '', '', '1', '', '1', '2019-05-29 09:59:03', '1', '2019-05-29 09:59:03', '', '1', NULL, '0', '0', '215');
|
||||
#修改日志检索->国家代理->HTTP(S)阻断 url
|
||||
UPDATE `sys_menu` SET `href`='/log/pxy/httpBlockLists?searchAction=16' WHERE code='http_block' and href='/log/pxy/httpBlocklogs' and permission= '';
|
||||
#修改日志检索->国家代理->HTTP(S)监测 url
|
||||
UPDATE `sys_menu` SET `href`='/log/pxy/httpMonitLists?searchAction=1' WHERE code='http_monit' and href='/log/pxy/httpMonitogs' and permission= '';
|
||||
|
||||
|
||||
#为admin角色分配新的菜单权限
|
||||
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('http_manipulation') and href='/log/pxy/httpManipulList?searchAction=48';
|
||||
|
||||
|
||||
#添加HTTP(s)操控日志 pinningst字段的字典内容
|
||||
INSERT INTO `sys_data_dictionary_name` ( `module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`) VALUES ( 'HTTP(S)操控日志', 'PINNING', 'pinning状态', 'user:ceiec,2019-05-31 10:02:51edit', '2019-05-31 10:02:13', '2019-05-31 10:02:51', '1');
|
||||
#sys_data_dictionary_item 表中的dictionary_id 为 sys_data_dictionary_name 表生成的主键ID的值
|
||||
INSERT into sys_data_dictionary_item(item_code,item_value,item_desc,item_sort,`status`,type,dictionary_id)
|
||||
VALUES('0', 'not pinning', '', 1, 1, 1,(SELECT id FROM sys_data_dictionary_name WHERE mark='PINNING')),
|
||||
('1', 'pinning', '', 2, 1, 1,(SELECT id FROM sys_data_dictionary_name WHERE mark='PINNING')),
|
||||
('2', 'maybe pinning', '', 3, 1, 1,(SELECT id FROM sys_data_dictionary_name WHERE mark='PINNING'));
|
||||
|
||||
#添加HTTP(s)操控日志 INTERCEPT_STATE字段的字典内容
|
||||
INSERT INTO `sys_data_dictionary_name` (`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`) VALUES ('拦截状态', 'INTERCEPT_STATE', '', '', '2019-06-03 15:20:00', '2019-06-03 15:20:00', '1');
|
||||
#sys_data_dictionary_item 表中的dictionary_id 为 sys_data_dictionary_name 表生成的主键ID的值
|
||||
INSERT INTO sys_data_dictionary_item(item_code,item_value,item_desc,item_sort,`status`,type,dictionary_id)
|
||||
VALUES ( '0', 'passthrough', '', 1, 1, 1, (SELECT id FROM sys_data_dictionary_name WHERE mark='INTERCEPT_STATE')),
|
||||
('1', 'intercept', '', 2, 1, 1, (SELECT id FROM sys_data_dictionary_name WHERE mark='INTERCEPT_STATE')),
|
||||
('2', 'shutdown', '', 3, 1, 1, (SELECT id FROM sys_data_dictionary_name WHERE mark='INTERCEPT_STATE'));
|
||||
|
||||
|
||||
#添加HTTP(s)操控日志 SSL_CERT_VERIFY字段的字典内容
|
||||
INSERT INTO `sys_data_dictionary_name` (`module_name`, `mark`, `remark`, `revision`, `create_time`, `modify_time`, `status`) VALUES ('证书校验结果', 'SSL_CERT_VERIFY', '', '', '2019-06-03 15:42:08', '2019-06-03 15:42:08', '1');
|
||||
#sys_data_dictionary_item 表中的dictionary_id 为 sys_data_dictionary_name 表生成的主键ID的值
|
||||
INSERT INTO `sys_data_dictionary_item` (item_code,item_value,item_desc,item_sort,`status`,type,dictionary_id)
|
||||
VALUES ('0', 'verify unapproved', '校验未通过', 1, 1, 1, (SELECT id FROM sys_data_dictionary_name WHERE mark='SSL_CERT_VERIFY')),
|
||||
('1', 'verify approved', '校验通过', 2, 1, 1, (SELECT id FROM sys_data_dictionary_name WHERE mark='SSL_CERT_VERIFY'));
|
||||
|
||||
|
||||
#删除重定向、替换配置、审核、审计、日志菜单
|
||||
UPDATE `sys_menu` SET `del_flag`='0' WHERE code ='http_redirect';
|
||||
UPDATE `sys_menu` SET `del_flag`='0' WHERE code ='http_replace';
|
||||
#####*************
|
||||
#实时报表->国家代理菜单和它下面的子菜单都置为失效
|
||||
UPDATE `sys_menu` SET `del_flag`='0' WHERE href ='/report/list?cfgName=http_block';
|
||||
UPDATE `sys_menu` SET `del_flag`='0' WHERE href ='/report/list?cfgName=http_redirect';
|
||||
UPDATE `sys_menu` SET `del_flag`='0' WHERE href ='/report/list?cfgName=http_replace';
|
||||
UPDATE `sys_menu` SET `del_flag`='0' WHERE href ='/report/list?cfgName=http_monit';
|
||||
UPDATE `sys_menu` SET `del_flag`='0' WHERE `code`='Proxy' and parent_id='780';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,268 +0,0 @@
|
||||
CREATE TABLE `ip_comm_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`cfg_desc` varchar(128) DEFAULT NULL,
|
||||
`cfg_type` varchar(64) DEFAULT '',
|
||||
`cfg_region_code` int(11) DEFAULT NULL,
|
||||
`ip_type` int(11) NOT NULL COMMENT 'IPV4=4,IPV6=6',
|
||||
`src_ip_pattern` int(11) DEFAULT NULL COMMENT 'Դip<EFBFBD><EFBFBD>ʽ',
|
||||
`dest_ip_pattern` int(11) DEFAULT NULL COMMENT 'Ŀ<EFBFBD><EFBFBD>ip<EFBFBD><EFBFBD>ʽ',
|
||||
`src_ip_address` varchar(128) NOT NULL,
|
||||
`dest_ip_address` varchar(128) NOT NULL,
|
||||
`src_port_pattern` int(11) DEFAULT NULL COMMENT 'Դ<EFBFBD>˿ڸ<EFBFBD>ʽ',
|
||||
`dest_port_pattern` int(11) DEFAULT NULL COMMENT 'Ŀ<EFBFBD>Ķ˿ڸ<EFBFBD>ʽ',
|
||||
`src_port` varchar(16) NOT NULL,
|
||||
`dest_port` varchar(16) NOT NULL,
|
||||
`direction` int(11) NOT NULL COMMENT '0˫<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD>ȱʡΪ˫<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`protocol` int(11) NOT NULL COMMENT '6<EFBFBD><EFBFBD>ʾtcp,17<31><37>ʾudp<64><70>0<EFBFBD><30>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>',
|
||||
`protocol_id` int(11) NOT NULL COMMENT '<EFBFBD><EFBFBD>0ʱ<EFBFBD><EFBFBD>maat<EFBFBD>淶<EFBFBD><EFBFBD>д<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>IP<EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD> <20>˱<EFBFBD><CBB1>̶<EFBFBD>д0',
|
||||
`action` int(11) NOT NULL COMMENT '1:<3A><><EFBFBD>ϣ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>⣬ 5<><35> FD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>6<EFBFBD><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7: FD <20><><EFBFBD>ⶼ<EFBFBD><E2B6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>ҵ<EFBFBD><D2B5>ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DFBC><EFBFBD>ƥ<EFBFBD>䣬8-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>-1ɾ<31><C9BE>\r\n1<6E><31> δ<><CEB4><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ÿ<EFBFBD>ɾ<EFBFBD><C9BE>\r\n2<6E><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>1\r\n3<6E><33> ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0δ<EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>3ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>\r\n1<6E><31> <09><><EFBFBD><EFBFBD>δͨ<CEB4><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>\r\n2<6E><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',
|
||||
`creator_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '<EFBFBD>ο<EFBFBD>ϵͳҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`request_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>request_info.id',
|
||||
`compile_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڷ<EFBFBD><EFBFBD>ص<EFBFBD>maat<EFBFBD><EFBFBD><EFBFBD>õı<EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>',
|
||||
`classify` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`attribute` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`lable` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ǩid,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><C4B6>ŷָ<C5B7>',
|
||||
`area_effective_ids` varchar(1024) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`ratelimit` varchar(10) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>ٱ<EFBFBD><EFBFBD><EFBFBD>,0<><30>1֮<31><D6AE>',
|
||||
`region_id` int(11) DEFAULT NULL,
|
||||
`group_id` int(11) DEFAULT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5',
|
||||
`cancel_request_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
|
||||
CREATE TABLE `url_comm_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`cfg_desc` varchar(128) DEFAULT NULL,
|
||||
`cfg_keywords` varchar(2048) NOT NULL,
|
||||
`action` int(11) NOT NULL COMMENT '1:<3A><><EFBFBD>ϣ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>⣬ 5<><35> FD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>6<EFBFBD><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7: FD <20><><EFBFBD>ⶼ<EFBFBD><E2B6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>ҵ<EFBFBD><D2B5>ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DFBC><EFBFBD>ƥ<EFBFBD>䣬8-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>-1ɾ<31><C9BE>;1<><31> δ<><CEB4><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ÿ<EFBFBD>ɾ<EFBFBD><C9BE>;2<><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>1;3<><33> ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0δ<EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>3ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>;1<><31> <09><><EFBFBD><EFBFBD>δͨ<CEB4><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>;2<><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',
|
||||
`creator_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '<EFBFBD>ο<EFBFBD>ϵͳҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`request_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>request_info.id',
|
||||
`compile_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڷ<EFBFBD><EFBFBD>ص<EFBFBD>maat<EFBFBD><EFBFBD><EFBFBD>õı<EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>',
|
||||
`classify` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`attribute` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`lable` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ǩid,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><C4B6>ŷָ<C5B7>',
|
||||
`expr_type` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD><EFBFBD>ޱ<EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',
|
||||
`match_method` int(11) NOT NULL COMMENT 'expr_type:0ʱ<30><CAB1><EFBFBD><EFBFBD><EFBFBD>壬<EFBFBD><E5A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>0<EFBFBD><30><EFBFBD>Ӵ<EFBFBD>ƥ<EFBFBD>䣻1<E4A3BB><31><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻2<E4A3BB><32><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻3<E4A3BB><33><EFBFBD><EFBFBD>ȫƥ<C8AB><C6A5>',
|
||||
`is_hexbin` int(11) NOT NULL COMMENT 'Ĭ<EFBFBD><EFBFBD>Ϊ0:<3A><>Сд<D0A1><D0B4><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX;1:HEX<45><58>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;2:<3A><>Сд<D0A1><D0B4><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX',
|
||||
`area_effective_ids` varchar(1024) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_region_code` int(11) DEFAULT NULL,
|
||||
`cfg_type` varchar(64) DEFAULT NULL,
|
||||
`ratelimit` varchar(10) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>ٱ<EFBFBD><EFBFBD><EFBFBD>,0<><30>1֮<31><D6AE>',
|
||||
`region_id` int(11) NOT NULL,
|
||||
`group_id` int(11) NOT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE,
|
||||
KEY `http_url_cfg_compileId` (`compile_id`),
|
||||
KEY `http_url_cfg_functionId` (`function_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
CREATE TABLE `domain_comm_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`cfg_desc` varchar(128) DEFAULT NULL,
|
||||
`cfg_keywords` varchar(2048) NOT NULL,
|
||||
`action` int(11) NOT NULL COMMENT '1:<3A><><EFBFBD>ϣ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>⣬ 5<><35> FD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>6<EFBFBD><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7: FD <20><><EFBFBD>ⶼ<EFBFBD><E2B6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>ҵ<EFBFBD><D2B5>ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DFBC><EFBFBD>ƥ<EFBFBD>䣬8-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>-1ɾ<31><C9BE>;1<><31> δ<><CEB4><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ÿ<EFBFBD>ɾ<EFBFBD><C9BE>;2<><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>1;3<><33> ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0δ<EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>3ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>;1<><31> <09><><EFBFBD><EFBFBD>δͨ<CEB4><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>;2<><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',
|
||||
`creator_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '<EFBFBD>ο<EFBFBD>ϵͳҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`request_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>request_info.id',
|
||||
`compile_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڷ<EFBFBD><EFBFBD>ص<EFBFBD>maat<EFBFBD><EFBFBD><EFBFBD>õı<EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>',
|
||||
`classify` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`attribute` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`lable` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ǩid,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><C4B6>ŷָ<C5B7>',
|
||||
`expr_type` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD><EFBFBD>ޱ<EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',
|
||||
`match_method` int(11) NOT NULL COMMENT 'expr_type:0ʱ<30><CAB1><EFBFBD><EFBFBD><EFBFBD>壬<EFBFBD><E5A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>0<EFBFBD><30><EFBFBD>Ӵ<EFBFBD>ƥ<EFBFBD>䣻1<E4A3BB><31><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻2<E4A3BB><32><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻3<E4A3BB><33><EFBFBD><EFBFBD>ȫƥ<C8AB><C6A5>',
|
||||
`is_hexbin` int(11) NOT NULL COMMENT 'Ĭ<EFBFBD><EFBFBD>Ϊ0:<3A><>Сд<D0A1><D0B4><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX;1:HEX<45><58>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;2:<3A><>Сд<D0A1><D0B4><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX',
|
||||
`area_effective_ids` varchar(1024) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_region_code` int(11) DEFAULT NULL,
|
||||
`cfg_type` varchar(64) DEFAULT NULL,
|
||||
`ratelimit` varchar(10) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>ٱ<EFBFBD><EFBFBD><EFBFBD>,0<><30>1֮<31><D6AE>',
|
||||
`region_id` int(11) NOT NULL,
|
||||
`group_id` int(11) NOT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE,
|
||||
KEY `http_url_cfg_compileId` (`compile_id`),
|
||||
KEY `http_url_cfg_functionId` (`function_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
CREATE TABLE `scriberid_comm_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`cfg_desc` varchar(128) DEFAULT NULL,
|
||||
`cfg_keywords` varchar(2048) NOT NULL,
|
||||
`action` int(11) NOT NULL COMMENT '1:<3A><><EFBFBD>ϣ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>⣬ 5<><35> FD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>6<EFBFBD><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>7: FD <20><><EFBFBD>ⶼ<EFBFBD><E2B6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>ҵ<EFBFBD><D2B5>ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DFBC><EFBFBD>ƥ<EFBFBD>䣬8-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>-1ɾ<31><C9BE>;1<><31> δ<><CEB4><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ÿ<EFBFBD>ɾ<EFBFBD><C9BE>;2<><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>1;3<><33> ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0δ<EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>3ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>;1<><31> <09><><EFBFBD><EFBFBD>δͨ<CEB4><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>;2<><32> <09><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',
|
||||
`creator_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '<EFBFBD>ο<EFBFBD>ϵͳҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`request_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD><EFBFBD>request_info.id',
|
||||
`compile_id` int(11) NOT NULL COMMENT 'ȡ<EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڷ<EFBFBD><EFBFBD>ص<EFBFBD>maat<EFBFBD><EFBFBD><EFBFBD>õı<EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>',
|
||||
`classify` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`attribute` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`lable` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ǩid,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><C4B6>ŷָ<C5B7>',
|
||||
`expr_type` int(11) NOT NULL COMMENT '0<EFBFBD><EFBFBD><EFBFBD>ޱ<EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',
|
||||
`match_method` int(11) NOT NULL COMMENT 'expr_type:0ʱ<30><CAB1><EFBFBD><EFBFBD><EFBFBD>壬<EFBFBD><E5A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>0<EFBFBD><30><EFBFBD>Ӵ<EFBFBD>ƥ<EFBFBD>䣻1<E4A3BB><31><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻2<E4A3BB><32><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻3<E4A3BB><33><EFBFBD><EFBFBD>ȫƥ<C8AB><C6A5>',
|
||||
`is_hexbin` int(11) NOT NULL COMMENT 'Ĭ<EFBFBD><EFBFBD>Ϊ0:<3A><>Сд<D0A1><D0B4><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX;1:HEX<45><58>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;2:<3A><>Сд<D0A1><D0B4><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX',
|
||||
`area_effective_ids` varchar(1024) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD>Ķ<EFBFBD><EFBFBD>ŷָ<EFBFBD>',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_region_code` int(11) DEFAULT NULL,
|
||||
`cfg_type` varchar(64) DEFAULT NULL,
|
||||
`ratelimit` varchar(10) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>ٱ<EFBFBD><EFBFBD><EFBFBD>,0<><30>1֮<31><D6AE>',
|
||||
`region_id` int(11) NOT NULL,
|
||||
`group_id` int(11) NOT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE,
|
||||
KEY `http_url_cfg_compileId` (`compile_id`),
|
||||
KEY `http_url_cfg_functionId` (`function_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
|
||||
# <20>˵<EFBFBD>
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('109', '0,1,109,', 'common_group_manage', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '5090', '/basics/commonGroup/list', '', 'fa fa-object-ungroup', '1', '', '1', '2019-05-27 16:15:23', '1', '2019-05-28 15:28:59', '', '1', NULL, '0', '0', NULL);
|
||||
#Ϊadmin<69>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
||||
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('common_group_manage') and m.href='/basics/commonGroup/list';
|
||||
# <20><><EFBFBD><EFBFBD>
|
||||
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 ('605', '', '1', 'ip_group_configuration', 'IP<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '1', '1', '1', NULL, '2019-05-27 14:50:16', NULL, NULL, '', '', '', '4,6', '', '', '1,2,3;1,2,3', '1,2;1,2', '0,1', '0,6,17', '1,2,3,4', '1', '1');
|
||||
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 ('606', '', '2', 'url_group_configuration', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '1', '1', '2', NULL, '2019-05-27 16:00:39', NULL, NULL, '', '0,1', '0,1,2,3', '', '0', '1', NULL, NULL, NULL, NULL, NULL, '1', '1');
|
||||
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 ('607', '', '1', 'domain_group_configuration', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '1', '1', '2', NULL, '2019-06-06 14:43:53', NULL, NULL, '', '0', '1,3', '', '2', '0', NULL, NULL, NULL, NULL, NULL, '1', '1');
|
||||
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 ('608', '', '1', 'scriberid_group_configuration', '<EFBFBD>˺Ź<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '1', '1', '2', NULL, '2019-06-06 15:32:02', NULL, NULL, '', '0', '3', '', '0', '0', NULL, NULL, NULL, NULL, NULL, '1', '1');
|
||||
|
||||
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 ('605', '0', '1', 'monit', '0', 'ip_common_group', NULL, '1', '1', '2019-05-27 14:47:47', NULL, NULL, '1', '1', '0', NULL);
|
||||
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 ('606', '0', '1', 'monit', '0', 'url_common_group', NULL, '1', '1', '2019-05-27 15:59:43', NULL, NULL, '2', '1', '0', NULL);
|
||||
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 ('607', '0', '1', 'monit', '0', 'domain_common_group', '', '1', NULL, '2019-06-06 15:24:56', NULL, NULL, '2', '1', '0', NULL);
|
||||
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 ('608', '0', '1', 'monit', '0', 'scriberid_common_group', NULL, '1', NULL, '2019-06-06 15:24:52', NULL, NULL, '2', '1', '0', NULL);
|
||||
|
||||
|
||||
# <20>ֵ<EFBFBD>
|
||||
INSERT INTO `sys_data_dictionary_item` (
|
||||
`item_code`,
|
||||
`item_value`,
|
||||
`item_desc`,
|
||||
`item_sort`,
|
||||
`status`,
|
||||
`type`,
|
||||
`dictionary_id`
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
'5',
|
||||
'IP GROUP',
|
||||
'<EFBFBD><EFBFBD>ͨIP<EFBFBD><EFBFBD>',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
(SELECT id FROM sys_data_dictionary_name WHERE mark = 'GROUP_TYPE')
|
||||
),
|
||||
(
|
||||
'7',
|
||||
'URL GROUP',
|
||||
'<EFBFBD><EFBFBD>ͨURL<EFBFBD><EFBFBD>',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
(SELECT id FROM sys_data_dictionary_name WHERE mark = 'GROUP_TYPE')
|
||||
),
|
||||
(
|
||||
'8',
|
||||
'DOMAIN GROUP',
|
||||
'<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
(SELECT id FROM sys_data_dictionary_name WHERE mark = 'GROUP_TYPE')
|
||||
),
|
||||
(
|
||||
'9',
|
||||
'SCRIBERID GROUP',
|
||||
'<EFBFBD><EFBFBD>ͨ<EFBFBD>˺<EFBFBD><EFBFBD><EFBFBD>',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
(SELECT id FROM sys_data_dictionary_name WHERE mark = 'GROUP_TYPE')
|
||||
);
|
||||
|
||||
# <20><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
|
||||
ALTER TABLE policy_group_info add ud_flag INT(2) NOT NULL DEFAULT 0 COMMENT '0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>1<EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><EFBFBD><EFBFBD>ѱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>|Ĭ<><C4AC>0';
|
||||
# <20>ı<DEB8><C4B1>ֶ<EFBFBD>ע<EFBFBD><D7A2>
|
||||
ALTER TABLE policy_group_info MODIFY COLUMN group_type INT(2) DEFAULT NULL COMMENT '1:dns 2:ip<69><70><EFBFBD><EFBFBD>, 4:asn, 5<><35>IPͨ<50><CDA8><EFBFBD><EFBFBD>, 7<><37>URLͨ<4C><CDA8><EFBFBD><EFBFBD>, 8<><38>Domainͨ<6E><CDA8><EFBFBD><EFBFBD>, 9<><39>SubscribeIdͨ<64><CDA8><EFBFBD><EFBFBD>';
|
||||
|
||||
#function_service_dict
|
||||
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, 1, 'monit', 0, 'obj_group_monit', NULL, 1, NULL, NULL, NULL, NULL, NULL, 0, 0, '1;1,2;2');
|
||||
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, 16, 'reject', -1, 'obj_group_reject', NULL, 1, NULL, NULL, NULL, NULL, NULL, 0, 0, '1;0,1,2;2');
|
||||
#functiuon_region_dict;
|
||||
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 (888, '', 0, '0', '0', 1, 1, 0, NULL, NULL, NULL, NULL, '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 1);
|
||||
#sys_menu
|
||||
#<23><><EFBFBD>Ʋ˵<C6B2> Object-List-Group
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) select id, CONCAT('0,1,',id),'object_list_group', 'Object-List-Group', 5060, '', '', '', 1, '', '1', '2019-06-13 19:46:56', '1', '2019-06-13 19:46:56', '', 1, NULL, 0, 0, NULL from sys_menu s1 where s1.code='audit_manage' and s1.del_flag=1;
|
||||
#<23><><EFBFBD>˲˵<CBB2> Object-List-Group
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) select id, CONCAT('0,1,',id),'object_list_group', 'Object-List-Group', 5060, '', '', '', 1, '', '1', '2019-06-13 19:46:56', '1', '2019-06-13 19:46:56', '', 1, NULL, 0, 0, NULL from sys_menu s1 where s1.code='examine_manage' and s1.del_flag=1;
|
||||
#<23><><EFBFBD>ò˵<C3B2> Object-List-Group
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) select id, CONCAT('0,1,',id),'object_list_group', 'Object-List-Group', 5060, '', '', '', 1, '', '1', '2019-06-13 19:46:56', '1', '2019-06-13 19:46:56', '', 1, NULL, 0, 0, NULL from sys_menu s1 where s1.code='configuration_manage' and s1.del_flag=1;
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2> Policy Group
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) select s1.id,CONCAT_WS(',','0,1',s2.id,s1.id), 'policy_group', 'Policy Group', 30, '/objgroup/list', '', '', 1, 'objgroup:audit', '1', '2019-06-13 19:47:42', '1', '2019-06-13 19:47:42', '', 1, NULL, 0, 0, 888 from sys_menu s1,sys_menu s2 where s2.code='audit_manage' and s2.del_flag=1 and s1.parent_id=s2.id and s1.code='object_list_group';
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2> Policy Group
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) select s1.id,CONCAT_WS(',','0,1',s2.id,s1.id), 'policy_group', 'Policy Group', 30, '/objgroup/list', '', '', 1, 'objgroup:confirm', '1', '2019-06-13 19:47:42', '1', '2019-06-13 19:47:42', '', 1, NULL, 0, 0, 888 from sys_menu s1,sys_menu s2 where s2.code='examine_manage' and s2.del_flag=1 and s1.parent_id=s2.id and s1.code='object_list_group';
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2> Policy Group
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) select s1.id,CONCAT_WS(',','0,1',s2.id,s1.id), 'policy_group', 'Policy Group', 30, '/objgroup/list', '', '', 1, 'objgroup:config', '1', '2019-06-13 19:47:42', '1', '2019-06-13 19:47:42', '', 1, NULL, 0, 0, 888 from sys_menu s1,sys_menu s2 where s2.code='configuration_manage' and s2.del_flag=1 and s1.parent_id=s2.id and s1.code='object_list_group';
|
||||
|
||||
|
||||
# Object List
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`)SELECT s1.id, CONCAT_WS(',', s1.parent_ids, s1.id), 'object_list', 'Object List', '60', '', '', '', '1', '', '1', '2019-06-12 10:12:05', '1', '2019-06-12 10:12:05', '', '1', NULL, '0', '0', NULL FROM sys_menu s1, sys_menu s2 WHERE s2.CODE = 'configuration_manage' AND s2.del_flag = 1 AND s1.parent_id = s2.id AND s1.CODE = 'object_list_group';
|
||||
# IP<49><50>URL<52><4C>Domain<69><6E>SubscribeId
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`)SELECT s.id, CONCAT_WS(',', s.parent_ids, s.id), 'ip_group_configuration', 'IP<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '340', '/basics/ip/list', '', '', '1', 'ip:common:config', '1', '2019-05-27 14:06:23', '1', '2019-06-12 10:13:38', '', '1', NULL, '0', '0', '605' FROM sys_menu s WHERE s.CODE = 'object_list' AND s.del_flag = 1;
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`)SELECT s.id, CONCAT_WS(',', s.parent_ids, s.id), 'url_group_configuration', 'URL<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '350', '/basics/url/list', '', '', '1', 'url:common:config', '1', '2019-05-27 15:54:43', '1', '2019-06-12 10:12:56', '', '1', NULL, '0', '0', '606' FROM sys_menu s WHERE s.CODE = 'object_list' AND s.del_flag = 1;
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`)SELECT s.id, CONCAT_WS(',', s.parent_ids, s.id), 'domain_group_configuration', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '360', '/basics/domain/list', '', '', '1', 'domain:common:config', '1', '2019-06-06 15:18:43', '1', '2019-06-12 10:14:32', '', '1', NULL, '0', '0', '607' FROM sys_menu s WHERE s.CODE = 'object_list' AND s.del_flag = 1;
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`)SELECT s.id, CONCAT_WS(',', s.parent_ids, s.id), 'scriberid_group_configuration', '<EFBFBD>˺Ź<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '370', '/basics/scriberId/list', '', '', '1', 'scriberid:common:config', '1', '2019-06-06 15:20:51', '1', '2019-06-12 10:14:05', '', '1', NULL, '0', '0', '608' FROM sys_menu s WHERE s.CODE = 'object_list' AND s.del_flag = 1;
|
||||
|
||||
#Ϊadmin<69>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
||||
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('object_list_group','policy_group','object_list','ip_group_configuration','url_group_configuration','domain_group_configuration','scriberid_group_configuration');
|
||||
@@ -148,7 +148,7 @@
|
||||
<example>${fns:unescapeHtml(html)}</example>
|
||||
</function>
|
||||
|
||||
<!-- ProcessUtil -->
|
||||
<!-- ProcessUtil wx:ProcessUtil 不存在
|
||||
<function>
|
||||
<description>根据案件状态获取标签颜色样式</description>
|
||||
<name>getCaseStateColor</name>
|
||||
@@ -162,7 +162,7 @@
|
||||
<function-class>com.nis.util.ProcessUtil</function-class>
|
||||
<function-signature>java.lang.String isAlarmDesc(int)</function-signature>
|
||||
<example>${fns:isAlarmDesc(caseState)}</example>
|
||||
</function>
|
||||
</function>-->
|
||||
|
||||
<!-- StringUtils -->
|
||||
<function>
|
||||
@@ -244,7 +244,7 @@
|
||||
<description>获取字典Map列表</description>
|
||||
<name>getDictOption</name>
|
||||
<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>
|
||||
</function>
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
<description>获取特征域字典对象列表</description>
|
||||
<name>getFeaturesDictData</name>
|
||||
<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>
|
||||
</function>
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
<description>根据id获取服务字典配置</description>
|
||||
<name>getServiceDictInfoById</name>
|
||||
<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>
|
||||
</function>
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
<description>根据id获取系统字典配置</description>
|
||||
<name>getSysDictInfoById</name>
|
||||
<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>
|
||||
</function>
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
<description>根据id获取特定服务配置</description>
|
||||
<name>getBySpecServiceId</name>
|
||||
<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>
|
||||
</function>
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
<description>计算序号</description>
|
||||
<name>getNumberResult</name>
|
||||
<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>
|
||||
</function>
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
<description>取出数据类型</description>
|
||||
<name>getItemTypeByNo</name>
|
||||
<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>
|
||||
</function>
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
<description>根据compileId获取crl</description>
|
||||
<name>getTrustedCrlByCerId</name>
|
||||
<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>
|
||||
</function>
|
||||
<!-- 根据表名取出运营商ISP标签集合 -->
|
||||
@@ -429,4 +429,12 @@
|
||||
<function-signature>java.util.List getASNIPNum(java.lang.Integer)</function-signature>
|
||||
<example>${fns:getASNIPNum(str)}</example>
|
||||
</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>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
data:{"grouIdAndCfgId":str,"groupType":8},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -103,12 +103,15 @@
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
loading('onloading');
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{ // 未选中任何 批量
|
||||
loading('onloading');
|
||||
|
||||
var myData = {};
|
||||
var groupId = $("#groupId").val();
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
@@ -118,13 +121,12 @@
|
||||
myData["groupId"] = groupId;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
myAjax = $.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/domain/ajaxCheckIsLastOneCfgBatch',
|
||||
data:myData,
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -134,17 +136,24 @@
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
// myAjax异步请求完毕后执行
|
||||
$.when(myAjax).done(function() {
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
data:{"grouIdAndCfgId":str,"groupType":5},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -104,12 +104,15 @@
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
loading('onloading');
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{ // 未选中任何 批量
|
||||
loading('onloading');
|
||||
|
||||
var myData = {};
|
||||
var groupId = $("#groupId").val();
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
@@ -119,13 +122,12 @@
|
||||
myData["groupId"] = groupId;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
myAjax = $.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/ip/ajaxCheckIsLastOneCfgBatch',
|
||||
data:myData,
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -135,16 +137,22 @@
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
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();
|
||||
}
|
||||
});
|
||||
// myAjax异步请求完毕后执行
|
||||
$.when(myAjax).done(function() {
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
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},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -107,12 +107,15 @@
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
loading('onloading');
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{ // 未选中任何 批量
|
||||
loading('onloading');
|
||||
|
||||
var myData = {};
|
||||
var groupId = $("#groupId").val();
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
@@ -122,13 +125,12 @@
|
||||
myData["groupId"] = groupId;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
myAjax = $.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/scriberId/ajaxCheckIsLastOneCfgBatch',
|
||||
data:myData,
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -138,17 +140,23 @@
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
// myAjax异步请求完毕后执行
|
||||
$.when(myAjax).done(function() {
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
data:{"grouIdAndCfgId":str,"groupType":7},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -102,12 +102,15 @@
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
loading('onloading');
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{ // 未选中任何 批量
|
||||
loading('onloading');
|
||||
|
||||
var myData = {};
|
||||
var groupId = $("#groupId").val();
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
@@ -117,13 +120,12 @@
|
||||
myData["groupId"] = groupId;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
myAjax = $.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/url/ajaxCheckIsLastOneCfgBatch',
|
||||
data:myData,
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
if(data.length > 0 && typeof(data) == 'object'){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
@@ -133,16 +135,22 @@
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
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();
|
||||
}
|
||||
});
|
||||
// myAjax异步请求完毕后执行
|
||||
$.when(myAjax).done(function() {
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
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>
|
||||
<body>
|
||||
<c:if test="${cfg.functionId eq 214}">
|
||||
<c:set var="interceptType" value="Ip"/>
|
||||
<c:set var="interceptType" value="IpPayload"/>
|
||||
</c:if>
|
||||
<c:if test="${cfg.functionId eq 200}">
|
||||
<c:set var="interceptType" value="Ip"/>
|
||||
|
||||
@@ -96,12 +96,12 @@ var switchKeyringType=function(){
|
||||
|
||||
if(keyringType =='end-entity'){ //实体证书不允许输入,并且默认0
|
||||
$("input[name=expireAfter]").val(0);
|
||||
$(".expireAfter").addClass("hidden");
|
||||
//$(".expireAfter").addClass("hidden");
|
||||
}else{
|
||||
if(expireAfter == ''){
|
||||
$("input[name=expireAfter]").val(30);
|
||||
}
|
||||
$(".expireAfter").removeClass("hidden");
|
||||
//$(".expireAfter").removeClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ function privateFileValidate(){
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-md-6 expireAfter">
|
||||
<div class="col-md-6 expireAfter hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expire_after"/></label>
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
<th column="keyring_type" ><spring:message code="keyring_type"/></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="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="issuer" ><spring:message code="issuer"/></th>
|
||||
<th column="certificate_subject" ><spring:message code="certificate_subject"/></th>
|
||||
@@ -362,7 +362,7 @@
|
||||
${fn:substring(cfg.publicKeyFile,0,20) }
|
||||
</a>
|
||||
</td>
|
||||
<td>${cfg.expireAfter }</td>
|
||||
<%--<td>${cfg.expireAfter }</td>--%>
|
||||
<td>
|
||||
<a href="${cfg.crl }" target="_blank" data-original-title="${cfg.crl }"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
|
||||
@@ -10,123 +10,113 @@
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(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");
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
//处理do_log
|
||||
$("[name='doLog']").each(function () {
|
||||
if($(this).val()==0){
|
||||
$(this).parent(".radio-inline").removeClass("hidden");
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//处理do_log
|
||||
$("[name='doLog']").each(function () {
|
||||
if($(this).val()==0){
|
||||
$(this).parent(".radio-inline").addClass("hidden");
|
||||
}
|
||||
})
|
||||
}else if('${_cfg.action}'==128){
|
||||
$("[name='userRegion1'] option:not([value=whitelist])").addClass("hidden").addClass("disabled");
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||
if('${_cfg.isValid}'==1){
|
||||
$("input[name=action]:not('[value=128]')").parent().addClass("hidden").addClass("disabled");
|
||||
}
|
||||
}
|
||||
if('${_cfg.userRegion1}'=='intercept'){
|
||||
$(".domainGroup").removeClass("hidden").removeClass("disabled");
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||
//处理do_log
|
||||
$(".doLog").addClass("hidden");
|
||||
$("[name='doLog']").find("[value=2]").prop("checked",true);
|
||||
}else if('${_cfg.userRegion1}'=='https'||'${_cfg.userRegion1}'=='http'){
|
||||
}else if('${_cfg.userRegion1}'=='https'||'${_cfg.userRegion1}'=='http'||'${_cfg.userRegion1}'=='ftp'||'${_cfg.userRegion1}'=='streaming_media'){
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").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");
|
||||
$(".subscribeIdGroup").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");
|
||||
$(".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() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
//$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
|
||||
var action=$("input[name='action']:checked").val();
|
||||
switchAction(action);
|
||||
processDoLog($(this).attr("configDoLog"));
|
||||
|
||||
//处理页面协议
|
||||
if($(this).val()!="1"){
|
||||
if($("[name='userRegion1']").val()=="intercept"){
|
||||
$("[name='userRegion1']").selectpicker("val","https");
|
||||
if($(this).val()=="16"){
|
||||
$("[name='userRegion1'] option:not([value=whitelist])").removeClass("hidden").removeClass("disabled");
|
||||
if($("[name='userRegion1']").val()=="intercept"||$("[name='userRegion1']").val()=="whitelist"){//拦截隐藏
|
||||
$("[name='userRegion1']").selectpicker("val","");
|
||||
$("[name='userRegion1']").change();
|
||||
}
|
||||
$("[name='userRegion1'] option[value=intercept]").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");
|
||||
if($("[name='userRegion1']").val()=="whitelist"){
|
||||
$("[name='userRegion1']").selectpicker("val","");
|
||||
$("[name='userRegion1']").change();
|
||||
}
|
||||
if($("[name='userRegion1']").val()=="intercept"){
|
||||
$(".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{
|
||||
$(".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");
|
||||
changeServiceId();
|
||||
var serviceId=$("[name='serviceId']").val();
|
||||
var configDoLog=$("#serviceId_"+serviceId).attr("configDoLog");
|
||||
processDoLog(configDoLog);
|
||||
});
|
||||
$("[name='userRegion1']").on("change",function () {
|
||||
if("intercept"==$(this).val()){
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").addClass("hidden").addClass("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 if("https"==$(this).val()){
|
||||
}else if("https"==$(this).val()||"http"==$(this).val()||"ftp"==$(this).val()||"streaming_media"==$(this).val()){
|
||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
//处理do_log
|
||||
$(".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()){
|
||||
}else if(""==$(this).val()||"bgp"==$(this).val()||'whitelist'==$(this).val()){
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
//处理do_log
|
||||
$(".doLog").removeClass("hidden");
|
||||
}else{
|
||||
}else if("mail"==$(this).val()||"dns"==$(this).val()||"ssl"==$(this).val()||"p2p"==$(this).val()||"voip"==$(this).val()){
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
}else {
|
||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||
$(".subscribeIdGroup").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({
|
||||
errorPlacement: function(error,element){
|
||||
@@ -162,7 +152,10 @@ $(function(){
|
||||
top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}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){
|
||||
top.$.jBox.tip("<spring:message code='most_seven_group'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
@@ -177,6 +170,23 @@ $(function(){
|
||||
flag=flag1;
|
||||
}
|
||||
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属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
@@ -206,7 +216,66 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + 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>
|
||||
</head>
|
||||
<body>
|
||||
@@ -235,7 +304,10 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<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="matchMethod" name="matchMethod" 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">
|
||||
<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="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>
|
||||
<c:forEach items="${fns:getDictList('OBJ_GROUP_PROTOCOL')}" var="protocol">
|
||||
<c:choose>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<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>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
@@ -482,9 +482,9 @@
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.userRegion1 eq 'http'}">HTTP</c:if>
|
||||
<c:if test="${cfg.userRegion1 eq 'https'}">HTTPS</c:if>
|
||||
<c:if test="${cfg.userRegion1 eq 'intercept'}"><spring:message code="intercept"/></c:if>
|
||||
<c:forEach items="${fns:getDictList('OBJ_GROUP_PROTOCOL')}" var="protocol">
|
||||
<c:if test="${cfg.userRegion1 eq protocol.itemCode}"><spring:message code="${protocol.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</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>
|
||||
|
||||
@@ -120,17 +120,13 @@
|
||||
$("select[name='httpResHdrList[0].district']").selectpicker("refresh");
|
||||
|
||||
// 域配置隐藏/显示
|
||||
if(selValue == 48){ // Redirect 隐藏响应体
|
||||
$(".resBodyCfg").addClass("hidden");
|
||||
addContent(this,'httpUrlTab');
|
||||
}else if(selValue == 80){ // Replace 隐藏请求响应体
|
||||
if(selValue == 80){ // Replace 隐藏请求响应体
|
||||
$(".reqBodyCfg").addClass("hidden");
|
||||
$(".resBodyCfg").addClass("hidden");
|
||||
}else if(selValue == 85 || selValue == 90){ // Hijack/Insert 隐藏请求头、请求体和响应体
|
||||
$(".reqHdrCfg").addClass("hidden");
|
||||
$(".resBodyCfg").addClass("hidden");
|
||||
$(".reqBodyCfg").addClass("hidden");
|
||||
$(".ntcSubscribeIdCfgCfg").addClass("hidden");
|
||||
// 且响应头匹配区域只能为Content-Type
|
||||
$("select[name='httpResHdrList[0].district']").find("option").each(function(){
|
||||
if($(this).val() != "Content-Type"){
|
||||
@@ -197,6 +193,9 @@
|
||||
getFileInfo("profileSelId",$(".profileSelDiv").attr("source"));
|
||||
}
|
||||
|
||||
// URL域必选(打开URL域并隐藏关闭按钮)
|
||||
addContent(document.getElementById("httpUrlAddButton"),'httpUrlTab');
|
||||
$(".httpUrlTab0").find("span[title='remove']").hide();
|
||||
}
|
||||
|
||||
var getFileInfo = function(selectId,source){
|
||||
@@ -255,9 +254,6 @@
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
if($(".userRegion5:checked").val()==48){
|
||||
addContent(this,"httpUrlTab");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
@@ -433,7 +429,7 @@
|
||||
<spring:message code="http_url_title" />
|
||||
<small> <span
|
||||
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>
|
||||
|
||||
<%-- <c:set var="regionValue" value="${_cfg.httpUrl.cfgType}"></c:set> --%>
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 3px;">
|
||||
<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" />
|
||||
</div>
|
||||
<div class="pull-left" style="margin-left: 5px;">
|
||||
|
||||
@@ -317,11 +317,10 @@ $(document).ready(function(){
|
||||
<spring:message code="block_drop"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="actions">${dict.itemValue}</c:set>
|
||||
<spring:message code="${actions}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<c:set var="actions">${dict.itemValue}</c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
|
||||
@@ -10,8 +10,10 @@ $(function(){
|
||||
processDoLog(doLog);
|
||||
}
|
||||
$(".action").on("change",function(){
|
||||
var _doLog=$(this).attr("configDoLog");
|
||||
if(_doLog&&_doLog!=""){
|
||||
var _doLog=$(this).attr("configDoLog");
|
||||
var functionId=$("[name='functionId']").val();
|
||||
//888为策略对象策略,比较特殊
|
||||
if(_doLog&&_doLog!=""&&888!=functionId){
|
||||
processDoLog(_doLog);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -229,12 +229,7 @@ function profileChange(val){
|
||||
|
||||
// 根据动作隐藏配置域,若该域隐藏前已被选中则默认选中首个
|
||||
var resetFlag = false;
|
||||
if(val == 48){
|
||||
if($(resBodyInput).prop("checked") == true){
|
||||
resetFlag = true;
|
||||
}
|
||||
$(resBodyInput).parents("label:first").hide();
|
||||
}else if(val == 80){
|
||||
if(val == 80){
|
||||
if($(reqBodyInput).prop("checked") == true || $(resBodyInput).prop("checked") == true){
|
||||
resetFlag = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user