增加配置批量审核不通过和删除操作
除高级功能菜单下配置
This commit is contained in:
@@ -71,6 +71,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{
|
|||||||
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.basics.ServiceDictInfoDao");
|
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.basics.ServiceDictInfoDao");
|
||||||
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.PxyObjKeyringDao.updatePxyObjTrustedCaCrl");
|
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.PxyObjKeyringDao.updatePxyObjTrustedCaCrl");
|
||||||
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.CommonPolicyDao.auditCfgBatch");
|
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.CommonPolicyDao.auditCfgBatch");
|
||||||
|
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.CommonPolicyDao.deleteCfgBatch");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* is_valid 字段名
|
* is_valid 字段名
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ import com.nis.util.Constants;
|
|||||||
import com.nis.util.DateUtils;
|
import com.nis.util.DateUtils;
|
||||||
import com.nis.util.DictUtils;
|
import com.nis.util.DictUtils;
|
||||||
import com.nis.util.JsonMapper;
|
import com.nis.util.JsonMapper;
|
||||||
|
import com.nis.util.Reflections;
|
||||||
import com.nis.util.ServiceConfigTemplateUtil;
|
import com.nis.util.ServiceConfigTemplateUtil;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.util.excel.ExcelCsv;
|
import com.nis.util.excel.ExcelCsv;
|
||||||
@@ -2816,10 +2817,10 @@ public class BaseController {
|
|||||||
BeanUtils.copyProperties(entity, searchAsnIpCfg);
|
BeanUtils.copyProperties(entity, searchAsnIpCfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auditType = (Integer)Reflections.invokeGetter(entity, "isAudit");
|
||||||
|
|
||||||
|
//全部审核通过,只查询当前条件下的所有未审核的配置 -批量审核通过/不通过
|
||||||
//全部审核通过,只查询当前条件下的所有未审核的配置
|
if(auditType.equals(1) || auditType.equals(2)) {
|
||||||
if(auditType.equals(1)) {
|
|
||||||
searchCfg.setIsValid(0);
|
searchCfg.setIsValid(0);
|
||||||
searchCfg.setIsAudit(0);
|
searchCfg.setIsAudit(0);
|
||||||
searchAppCfg.setIsValid(0);
|
searchAppCfg.setIsValid(0);
|
||||||
@@ -2859,8 +2860,13 @@ public class BaseController {
|
|||||||
searchAsnIpCfg.setIsValid(0);
|
searchAsnIpCfg.setIsValid(0);
|
||||||
searchAsnIpCfg.setIsAudit(0);
|
searchAsnIpCfg.setIsAudit(0);
|
||||||
|
|
||||||
|
if(auditType.equals(1)) {
|
||||||
auditBatchCfg.setIsAudit(1);
|
auditBatchCfg.setIsAudit(1);
|
||||||
auditBatchCfg.setIsValid(1);
|
auditBatchCfg.setIsValid(1);
|
||||||
|
}else {
|
||||||
|
auditBatchCfg.setIsAudit(2);
|
||||||
|
auditBatchCfg.setIsValid(0);
|
||||||
|
}
|
||||||
auditBatchCfg.setAuditTime(new Date());
|
auditBatchCfg.setAuditTime(new Date());
|
||||||
auditBatchCfg.setAuditorId(UserUtils.getUser().getId());
|
auditBatchCfg.setAuditorId(UserUtils.getUser().getId());
|
||||||
}else {
|
}else {
|
||||||
@@ -2916,12 +2922,11 @@ public class BaseController {
|
|||||||
functionId=auditBatchCfg.getFunctionId();
|
functionId=auditBatchCfg.getFunctionId();
|
||||||
}
|
}
|
||||||
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByFunctionId(functionId);
|
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByFunctionId(functionId);
|
||||||
|
|
||||||
for(Map<String,Object> service:serviceList){
|
for(Map<String,Object> service:serviceList){
|
||||||
String tableNameXml = service.get("tableName").toString();
|
String tableNameXml = service.get("tableName").toString(); // 获取业务主配置表
|
||||||
String serviceTypeXml = service.get("serviceType").toString();
|
String serviceTypeXml = service.get("serviceType").toString(); // 业务类型 1maat 2callback
|
||||||
String classNameXml = service.get("className").toString();
|
String classNameXml = service.get("className").toString(); // 主配置Java类
|
||||||
String serviceIdXml = service.get("id").toString();
|
String serviceIdXml = service.get("id").toString(); // service字典表 service_id字段
|
||||||
auditBatchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
auditBatchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||||
auditBatchCfg.setTableName(tableNameXml);
|
auditBatchCfg.setTableName(tableNameXml);
|
||||||
searchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
searchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||||
@@ -2962,6 +2967,7 @@ public class BaseController {
|
|||||||
searchAppSslCertCfg.setTableName(tableNameXml);
|
searchAppSslCertCfg.setTableName(tableNameXml);
|
||||||
|
|
||||||
if("1".equals(serviceTypeXml)){//maat类配置
|
if("1".equals(serviceTypeXml)){//maat类配置
|
||||||
|
// 存放域配置类型 及 对应表名
|
||||||
List<Map<String,Object>> cfgList = (List<Map<String, Object>>) service.get("cfgList");
|
List<Map<String,Object>> cfgList = (List<Map<String, Object>>) service.get("cfgList");
|
||||||
List<Map<String,Object>> userRegionList = (List<Map<String, Object>>) service.get("userRegionList");
|
List<Map<String,Object>> userRegionList = (List<Map<String, Object>>) service.get("userRegionList");
|
||||||
if(!StringUtil.isEmpty(cfgList)) {
|
if(!StringUtil.isEmpty(cfgList)) {
|
||||||
@@ -2971,21 +2977,25 @@ public class BaseController {
|
|||||||
while(hasData){
|
while(hasData){
|
||||||
page.setPageNo(1);
|
page.setPageNo(1);
|
||||||
page.setLastPage(false);
|
page.setLastPage(false);
|
||||||
List<CfgIndexInfo> list=getDataList(page,searchCfg,null,null,null);
|
List<CfgIndexInfo> list = getDataList(page,searchCfg,null,null,null); // 通过ServiceId获取cfg_index_info主配置表数据
|
||||||
if(!StringUtil.isEmpty(list)){
|
if(!StringUtil.isEmpty(list)){
|
||||||
//配置生效处理 复用全量下发
|
//配置生效处理 复用全量下发
|
||||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||||
hasData = configSynchronizationService.auditNtcMaatData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
hasData = configSynchronizationService.auditNtcMaatData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
||||||
}else {//配置失效处理 批量处理
|
}else {
|
||||||
List<BaseCfg> cfgIndexList=new ArrayList<>();
|
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||||
if(!StringUtil.isEmpty(list)) {
|
if(!StringUtil.isEmpty(list)) {
|
||||||
for (CfgIndexInfo cfg : list) {
|
for (CfgIndexInfo cfg : list) {
|
||||||
BaseCfg baseCfg=new BaseCfg();
|
BaseCfg baseCfg=new BaseCfg();
|
||||||
BeanUtils.copyProperties(cfg, baseCfg);
|
BeanUtils.copyProperties(cfg, baseCfg);
|
||||||
cfgIndexList.add(baseCfg);
|
BaseCfgList.add(baseCfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg, cfgIndexList, hasData);
|
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||||
|
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, BaseCfgList, hasData);
|
||||||
|
}else {// 配置失效处理 批量处理
|
||||||
|
hasData = commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg, BaseCfgList, hasData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
@@ -3001,9 +3011,9 @@ public class BaseController {
|
|||||||
List<FileDigestCfg> list=getDataList(page,null,null,searchDigestCfg,null);
|
List<FileDigestCfg> list=getDataList(page,null,null,searchDigestCfg,null);
|
||||||
if(!StringUtil.isEmpty(list)){
|
if(!StringUtil.isEmpty(list)){
|
||||||
//配置生效处理 复用全量下发
|
//配置生效处理 复用全量下发
|
||||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||||
hasData=configSynchronizationService.auditFileDigestData(cfgList, userRegionList, page, auditBatchCfg, list, hasData, true);
|
hasData=configSynchronizationService.auditFileDigestData(cfgList, userRegionList, page, auditBatchCfg, list, hasData, true);
|
||||||
}else {//配置失效处理 批量处理
|
}else {
|
||||||
List<BaseCfg> baseCfgList=new ArrayList<>();
|
List<BaseCfg> baseCfgList=new ArrayList<>();
|
||||||
if(!StringUtil.isEmpty(list)) {
|
if(!StringUtil.isEmpty(list)) {
|
||||||
for (FileDigestCfg cfg : list) {
|
for (FileDigestCfg cfg : list) {
|
||||||
@@ -3012,8 +3022,12 @@ public class BaseController {
|
|||||||
baseCfgList.add(baseCfg);
|
baseCfgList.add(baseCfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||||
|
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, baseCfgList, hasData);
|
||||||
|
}else {// 配置失效处理 批量处理
|
||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,baseCfgList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,baseCfgList, hasData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
}
|
}
|
||||||
@@ -3027,9 +3041,9 @@ public class BaseController {
|
|||||||
List<AppPolicyCfg> list=getDataList(page,null,searchAppCfg,null,null);
|
List<AppPolicyCfg> list=getDataList(page,null,searchAppCfg,null,null);
|
||||||
if(!StringUtil.isEmpty(list)){
|
if(!StringUtil.isEmpty(list)){
|
||||||
//配置生效处理 复用全量下发
|
//配置生效处理 复用全量下发
|
||||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||||
hasData=configSynchronizationService.auditAppPolicyData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
hasData=configSynchronizationService.auditAppPolicyData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
||||||
}else {//配置失效处理 批量处理
|
}else {
|
||||||
List<BaseCfg> cfgAppList=new ArrayList<>();
|
List<BaseCfg> cfgAppList=new ArrayList<>();
|
||||||
if(!StringUtil.isEmpty(list)) {
|
if(!StringUtil.isEmpty(list)) {
|
||||||
for (AppPolicyCfg cfg : list) {
|
for (AppPolicyCfg cfg : list) {
|
||||||
@@ -3038,8 +3052,12 @@ public class BaseController {
|
|||||||
cfgAppList.add(baseCfg);
|
cfgAppList.add(baseCfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||||
|
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, cfgAppList, hasData);
|
||||||
|
}else {// 配置失效处理 批量处理
|
||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgAppList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgAppList, hasData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
}
|
}
|
||||||
@@ -3054,9 +3072,9 @@ public class BaseController {
|
|||||||
List<AppFeatureIndex> list=getDataList(page,null,null,null,searchAppFeatureIndex);
|
List<AppFeatureIndex> list=getDataList(page,null,null,null,searchAppFeatureIndex);
|
||||||
if(!StringUtil.isEmpty(list)){
|
if(!StringUtil.isEmpty(list)){
|
||||||
//配置生效处理 复用全量下发
|
//配置生效处理 复用全量下发
|
||||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||||
hasData=configSynchronizationService.auditAppFeatureData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
hasData=configSynchronizationService.auditAppFeatureData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
||||||
}else {//配置失效处理 批量处理
|
}else {
|
||||||
List<BaseCfg> cfgFeatrureList=new ArrayList<>();
|
List<BaseCfg> cfgFeatrureList=new ArrayList<>();
|
||||||
if(!StringUtil.isEmpty(list)) {
|
if(!StringUtil.isEmpty(list)) {
|
||||||
for (AppFeatureIndex cfg : list) {
|
for (AppFeatureIndex cfg : list) {
|
||||||
@@ -3065,8 +3083,12 @@ public class BaseController {
|
|||||||
cfgFeatrureList.add(baseCfg);
|
cfgFeatrureList.add(baseCfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||||
|
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, cfgFeatrureList, hasData);
|
||||||
|
}else {// 配置失效处理 批量处理
|
||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgFeatrureList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgFeatrureList, hasData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
hasData = false;
|
hasData = false;
|
||||||
}
|
}
|
||||||
@@ -3085,7 +3107,8 @@ public class BaseController {
|
|||||||
|
|
||||||
List<DdosIpCfg> list=ddosCfgService.findPage(page, searchDdosIpCfg).getList();
|
List<DdosIpCfg> list=ddosCfgService.findPage(page, searchDdosIpCfg).getList();
|
||||||
if(!StringUtil.isEmpty(list)){
|
if(!StringUtil.isEmpty(list)){
|
||||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
// 配置生效处理
|
||||||
|
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||||
hasData=configSynchronizationService.auditDdosMaatData(cfgList,userRegionList,
|
hasData=configSynchronizationService.auditDdosMaatData(cfgList,userRegionList,
|
||||||
page,auditBatchCfg,list,hasData,true);
|
page,auditBatchCfg,list,hasData,true);
|
||||||
}else {
|
}else {
|
||||||
@@ -3096,8 +3119,12 @@ public class BaseController {
|
|||||||
newList.add(cfg);
|
newList.add(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||||
|
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, newList, hasData);
|
||||||
|
}else {// 配置失效处理 批量处理
|
||||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(hasData) {
|
if(hasData) {
|
||||||
page.setPageNo(1);
|
page.setPageNo(1);
|
||||||
page.setLastPage(false);
|
page.setLastPage(false);
|
||||||
@@ -3324,7 +3351,181 @@ public class BaseController {
|
|||||||
logger.warn("配置批量生效/失效耗时:"+(end-start));
|
logger.warn("配置批量生效/失效耗时:"+(end-start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 界面批量删除当前检索条件下的配置
|
||||||
|
* @param page
|
||||||
|
* @param functionId
|
||||||
|
* @param entity
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void deleteAll(Page page,Integer functionId, Object entity)throws Exception {
|
||||||
|
long start=System.currentTimeMillis();
|
||||||
|
page.setOrderBy("");
|
||||||
|
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
|
||||||
|
// 只有未审核的配置可删除
|
||||||
|
CfgIndexInfo searchCfg = new CfgIndexInfo();
|
||||||
|
AppPolicyCfg searchAppCfg=new AppPolicyCfg();
|
||||||
|
FileDigestCfg searchDigestCfg=new FileDigestCfg();
|
||||||
|
AvFileSampleCfg searchFileSampleCfg=new AvFileSampleCfg();
|
||||||
|
DdosIpCfg searchDdosIpCfg=new DdosIpCfg();
|
||||||
|
|
||||||
|
// 传递检索条件
|
||||||
|
if(entity != null && (entity instanceof CfgIndexInfo)) {
|
||||||
|
BeanUtils.copyProperties(entity, searchCfg);
|
||||||
|
searchCfg.setIsValid(0);
|
||||||
|
searchCfg.setIsAudit(0);
|
||||||
|
searchCfg.setFunctionId(functionId);
|
||||||
|
}
|
||||||
|
if(entity != null && (entity instanceof AppPolicyCfg)) {
|
||||||
|
BeanUtils.copyProperties(entity, searchAppCfg);
|
||||||
|
searchAppCfg.setIsValid(0);
|
||||||
|
searchAppCfg.setIsAudit(0);
|
||||||
|
searchAppCfg.setFunctionId(functionId);
|
||||||
|
}
|
||||||
|
if(entity != null && (entity instanceof FileDigestCfg)) {
|
||||||
|
BeanUtils.copyProperties(entity, searchDigestCfg);
|
||||||
|
searchDigestCfg.setIsValid(0);
|
||||||
|
searchDigestCfg.setIsAudit(0);
|
||||||
|
searchDigestCfg.setFunctionId(functionId);
|
||||||
|
}
|
||||||
|
if(entity != null && (entity instanceof AvFileSampleCfg)) {
|
||||||
|
BeanUtils.copyProperties(entity, searchFileSampleCfg);
|
||||||
|
searchFileSampleCfg.setIsValid(0);
|
||||||
|
searchFileSampleCfg.setIsAudit(0);
|
||||||
|
searchFileSampleCfg.setFunctionId(functionId);
|
||||||
|
}
|
||||||
|
if(entity != null && (entity instanceof DdosIpCfg)) {
|
||||||
|
BeanUtils.copyProperties(entity, searchDdosIpCfg);
|
||||||
|
searchDdosIpCfg.setIsValid(0);
|
||||||
|
searchDdosIpCfg.setIsAudit(0);
|
||||||
|
searchDdosIpCfg.setFunctionId(functionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
BaseCfg batchCfg = new BaseCfg();
|
||||||
|
batchCfg.setEditTime(new Date());
|
||||||
|
batchCfg.setEditorId(UserUtils.getUser().getId());
|
||||||
|
|
||||||
|
ServiceConfigTemplateUtil serviceTemplate = new ServiceConfigTemplateUtil();
|
||||||
|
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByFunctionId(functionId);
|
||||||
|
for(Map<String,Object> service:serviceList){
|
||||||
|
String tableNameXml = service.get("tableName").toString(); // 获取业务主配置表
|
||||||
|
String serviceTypeXml = service.get("serviceType").toString(); // 业务类型 1maat 2callback
|
||||||
|
String classNameXml = service.get("className").toString(); // 主配置Java类
|
||||||
|
String serviceIdXml = service.get("id").toString(); // service字典表 service_id字段
|
||||||
|
|
||||||
|
searchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||||
|
searchCfg.setTableName(tableNameXml);
|
||||||
|
searchAppCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||||
|
searchAppCfg.setTableName(tableNameXml);
|
||||||
|
searchDigestCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||||
|
searchDigestCfg.setTableName(tableNameXml);
|
||||||
|
batchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||||
|
batchCfg.setTableName(tableNameXml);
|
||||||
|
|
||||||
|
// 存放域配置类型 及 对应表名
|
||||||
|
List<Map<String,Object>> cfgList = (List<Map<String, Object>>) service.get("cfgList");
|
||||||
|
//if(!StringUtil.isEmpty(cfgList)) {
|
||||||
|
if("cfg_index_info".equals(tableNameXml)){
|
||||||
|
boolean hasData = true;
|
||||||
|
while(hasData){
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
List<CfgIndexInfo> list = getDataList(page,searchCfg,null,null,null); // 通过serviceId获取主配置表数据
|
||||||
|
if(!StringUtil.isEmpty(list)){
|
||||||
|
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||||
|
for (CfgIndexInfo cfg : list) {
|
||||||
|
BaseCfg baseCfg=new BaseCfg();
|
||||||
|
BeanUtils.copyProperties(cfg, baseCfg);
|
||||||
|
BaseCfgList.add(baseCfg);
|
||||||
|
}
|
||||||
|
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||||
|
}else{
|
||||||
|
hasData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if("file_digest_cfg".equals(tableNameXml)) {
|
||||||
|
boolean hasData = true;
|
||||||
|
while(hasData){
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
List<FileDigestCfg> list = getDataList(page,null,null,searchDigestCfg,null); // 通过serviceId获取主配置表数据
|
||||||
|
if(!StringUtil.isEmpty(list)){
|
||||||
|
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||||
|
for (FileDigestCfg cfg : list) {
|
||||||
|
BaseCfg baseCfg=new BaseCfg();
|
||||||
|
BeanUtils.copyProperties(cfg, baseCfg);
|
||||||
|
BaseCfgList.add(baseCfg);
|
||||||
|
}
|
||||||
|
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||||
|
}else{
|
||||||
|
hasData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if("app_policy_cfg".equals(tableNameXml)) {
|
||||||
|
boolean hasData = true;
|
||||||
|
while(hasData){
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
List<AppPolicyCfg> list = getDataList(page,null,searchAppCfg,null,null); // 通过serviceId获取主配置表数据
|
||||||
|
if(!StringUtil.isEmpty(list)){
|
||||||
|
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||||
|
for (AppPolicyCfg cfg : list) {
|
||||||
|
BaseCfg baseCfg=new BaseCfg();
|
||||||
|
BeanUtils.copyProperties(cfg, baseCfg);
|
||||||
|
BaseCfgList.add(baseCfg);
|
||||||
|
}
|
||||||
|
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||||
|
}else{
|
||||||
|
hasData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if("av_file_sample_cfg".equals(tableNameXml)) {
|
||||||
|
boolean hasData = true;
|
||||||
|
while(hasData){
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
List<BaseCfg> list = avCfgService.getAvFileSampleList(page,searchFileSampleCfg).getList();
|
||||||
|
if(!StringUtil.isEmpty(list)){
|
||||||
|
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, list, hasData);
|
||||||
|
}else{
|
||||||
|
hasData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if("ddos_ip_cfg".equals(tableNameXml)) {
|
||||||
|
boolean hasData = true;
|
||||||
|
while(hasData){
|
||||||
|
page.setPageNo(1);
|
||||||
|
page.setLastPage(false);
|
||||||
|
List<DdosIpCfg> list=ddosCfgService.findPage(page, searchDdosIpCfg).getList();
|
||||||
|
if(!StringUtil.isEmpty(list)){
|
||||||
|
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||||
|
for (DdosIpCfg cfg : list) {
|
||||||
|
BaseCfg baseCfg=new BaseCfg();
|
||||||
|
BeanUtils.copyProperties(cfg, baseCfg);
|
||||||
|
BaseCfgList.add(baseCfg);
|
||||||
|
}
|
||||||
|
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||||
|
}else{
|
||||||
|
hasData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if("app_feature_index".equals(tableNameXml)) {
|
||||||
|
|
||||||
|
}else{
|
||||||
|
logger.info("未知业务");
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
|
long end=System.currentTimeMillis();
|
||||||
|
logger.warn("配置批量删除耗时:"+(end-start));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public List getDataList(Page searchPage
|
public List getDataList(Page searchPage
|
||||||
,CfgIndexInfo searchCfg
|
,CfgIndexInfo searchCfg
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import com.nis.domain.configuration.AppSslCertCfg;
|
|||||||
import com.nis.domain.configuration.AppTcpCfg;
|
import com.nis.domain.configuration.AppTcpCfg;
|
||||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||||
@@ -305,8 +306,26 @@ public class AppCfgController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value = { "updateAppPolicyCfgValid" })
|
@RequestMapping(value = { "updateAppPolicyCfgValid" })
|
||||||
@RequiresPermissions(value = { "app:policy:config" })
|
@RequiresPermissions(value = { "app:policy:config" })
|
||||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId) {
|
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/app/policyCfgList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/app/policyCfgList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -251,20 +251,23 @@ public class BasicProtocolController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value = { "updateValid" })
|
@RequestMapping(value = { "updateValid" })
|
||||||
@RequiresPermissions(value = { "basicprotocol:config" })
|
@RequiresPermissions(value = { "basicprotocol:config" })
|
||||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId,
|
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) {
|
||||||
try {
|
try {
|
||||||
|
if(!StringUtil.isEmpty(ids)) {
|
||||||
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
||||||
addMessage(redirectAttributes, "success", "delete_success");
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("基础协议信息保存失败", e);
|
logger.error("基础协议信息保存失败", e);
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
} else if (e instanceof CallExternalProceduresException) {
|
} else if (e instanceof CallExternalProceduresException) {
|
||||||
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
||||||
} else {
|
} else {
|
||||||
e.printStackTrace();
|
|
||||||
addMessage(redirectAttributes, "error", "delete_failed");
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import com.nis.domain.Page;
|
|||||||
import com.nis.domain.SysDataDictionaryItem;
|
import com.nis.domain.SysDataDictionaryItem;
|
||||||
import com.nis.domain.configuration.AppPolicyCfg;
|
import com.nis.domain.configuration.AppPolicyCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.domain.specific.SpecificServiceCfg;
|
import com.nis.domain.specific.SpecificServiceCfg;
|
||||||
@@ -270,10 +271,17 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value = { "updateValid" })
|
@RequestMapping(value = { "updateValid" })
|
||||||
@RequiresPermissions(value = { "encryptedtunnelbehav:config" })
|
@RequiresPermissions(value = { "encryptedtunnelbehav:config" })
|
||||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId,
|
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) {
|
||||||
try {
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("加密隧道协议保存失败", e);
|
logger.error("加密隧道协议保存失败", e);
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
|
|||||||
@@ -87,8 +87,26 @@ public class DdosCfgController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "/delete" })
|
@RequestMapping(value = { "/delete" })
|
||||||
@RequiresPermissions(value = { "ddos:ip:config" })
|
@RequiresPermissions(value = { "ddos:ip:config" })
|
||||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) {
|
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")DdosIpCfg cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
ddosCfgService.delete(isAudit, isValid, ids, functionId);
|
ddosCfgService.delete(isAudit, isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + functionId;
|
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,18 +152,22 @@ public class AvContentController extends BaseController {
|
|||||||
// 修改VOIP IP配置状态
|
// 修改VOIP IP配置状态
|
||||||
@RequestMapping(value = { "/updateAvVoipValid" })
|
@RequestMapping(value = { "/updateAvVoipValid" })
|
||||||
@RequiresPermissions(value = { "avVoip:config" })
|
@RequiresPermissions(value = { "avVoip:config" })
|
||||||
public String updateVoipValid(Integer isAudit, String compileIds, Integer isValid, String ids, Integer functionId,
|
public String updateVoipValid(Integer isAudit, String compileIds, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
try {
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId);
|
avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId);
|
||||||
addMessage(redirectAttributes, "success", "delete_success");
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
|
||||||
logger.error("voip 信息审核失败", e);
|
logger.error("voip 信息审核失败", e);
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
} else {
|
} else {
|
||||||
e.printStackTrace();
|
|
||||||
logger.error("voip 信息审核失败", e);
|
logger.error("voip 信息审核失败", e);
|
||||||
addMessage(redirectAttributes, "error", "delete_failed");
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
}
|
}
|
||||||
@@ -627,9 +631,26 @@ public class AvContentController extends BaseController {
|
|||||||
// 修改CONTUrl例配置状态
|
// 修改CONTUrl例配置状态
|
||||||
@RequestMapping(value = { "/updateAvContUrlValid" })
|
@RequestMapping(value = { "/updateAvContUrlValid" })
|
||||||
@RequiresPermissions(value = { "avContUrl:config" })
|
@RequiresPermissions(value = { "avContUrl:config" })
|
||||||
public String updateAvContUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
|
public String updateAvContUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId);
|
avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/av/contUrlList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/av/contUrlList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -350,10 +350,26 @@ public class AvController extends BaseController {
|
|||||||
|
|
||||||
// 修改文件样例配置状态
|
// 修改文件样例配置状态
|
||||||
@RequestMapping(value = { "/sample/updateAvFileSampleValid" })
|
@RequestMapping(value = { "/sample/updateAvFileSampleValid" })
|
||||||
public String updateAvFileSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
|
public String updateAvFileSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AvFileSampleCfg cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
avCfgService.updateAvFileSampleValid(isAudit, isValid, ids);
|
avCfgService.updateAvFileSampleValid(isAudit, isValid, ids);
|
||||||
addMessage(redirectAttributes, "success", "delete_success");
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,9 +122,26 @@ public class BgpCfgController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateBgpCfgValid" })
|
@RequestMapping(value = { "updateBgpCfgValid" })
|
||||||
@RequiresPermissions(value = { "other:bgp:config" })
|
@RequiresPermissions(value = { "other:bgp:config" })
|
||||||
public String updateBgpCfgValid(Integer isValid, String ids, Integer functionId,
|
public String updateBgpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
bgpCfgService.updateBgpCfgValid(isValid, ids, functionId);
|
bgpCfgService.updateBgpCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,19 +150,22 @@ public class FileTransferCfgController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value = { "updateFtpCfgValid" })
|
@RequestMapping(value = { "updateFtpCfgValid" })
|
||||||
@RequiresPermissions(value = { "fileTransfer:ftp:config" })
|
@RequiresPermissions(value = { "fileTransfer:ftp:config" })
|
||||||
public String updateFtpCfgValid(Integer isValid, String ids, Integer functionId,
|
public String updateFtpCfgValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
try {
|
try {
|
||||||
|
if(!StringUtil.isEmpty(ids)) {
|
||||||
fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId);
|
fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId);
|
||||||
addMessage(redirectAttributes, "success", "delete_success");
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
logger.error("ftp配置删除失败:" + e.getMessage());
|
||||||
logger.info("ftp配置删除失败:" + e.getMessage());
|
|
||||||
;
|
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
} else {
|
} else {
|
||||||
e.printStackTrace();
|
|
||||||
logger.error("ftp配置删除失败", e);
|
logger.error("ftp配置删除失败", e);
|
||||||
addMessage(redirectAttributes, "error", "delete_failed");
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
}
|
}
|
||||||
@@ -303,9 +306,27 @@ public class FileTransferCfgController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateFileDigestValid" })
|
@RequestMapping(value = { "updateFileDigestValid" })
|
||||||
@RequiresPermissions(value = { "fileTransfer:fileDigest:config" })
|
@RequiresPermissions(value = { "fileTransfer:fileDigest:config" })
|
||||||
public String updateFileDigestValid(Integer isValid, String ids, Integer functionId,
|
public String updateFileDigestValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")FileDigestCfg cfg) {
|
||||||
|
try {
|
||||||
|
if(!StringUtil.isEmpty(ids)) {
|
||||||
fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId);
|
fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
logger.error("文件摘要配置删除失败:" + e.getMessage());
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
logger.error("文件摘要配置删除失败", e);
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -483,19 +504,22 @@ public class FileTransferCfgController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateP2pCfgValid" })
|
@RequestMapping(value = { "updateP2pCfgValid" })
|
||||||
@RequiresPermissions(value = { "fileTransfer:p2p:config" })
|
@RequiresPermissions(value = { "fileTransfer:p2p:config" })
|
||||||
public String updateP2pCfgValid(Integer isValid, String ids, Integer functionId,
|
public String updateP2pCfgValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
try {
|
try {
|
||||||
|
if(!StringUtil.isEmpty(ids)) {
|
||||||
fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId);
|
fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId);
|
||||||
addMessage(redirectAttributes, "success", "delete_success");
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof MaatConvertException) {
|
if (e instanceof MaatConvertException) {
|
||||||
e.printStackTrace();
|
logger.error("P2P配置删除失败:" + e.getMessage());
|
||||||
logger.info("P2P配置删除失败:" + e.getMessage());
|
|
||||||
;
|
|
||||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
} else {
|
} else {
|
||||||
e.printStackTrace();
|
|
||||||
logger.error("P2P配置删除失败", e);
|
logger.error("P2P配置删除失败", e);
|
||||||
addMessage(redirectAttributes, "error", "delete_failed");
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,8 +151,27 @@ public class IpController extends BaseController{
|
|||||||
}
|
}
|
||||||
@RequestMapping(value = {"updateValid"})
|
@RequestMapping(value = {"updateValid"})
|
||||||
@RequiresPermissions("iplist:config")
|
@RequiresPermissions("iplist:config")
|
||||||
public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId) {
|
public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
ipCfgService.updateIpCfgValid(isValid, ids, functionId);
|
ipCfgService.updateIpCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId;
|
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -170,8 +170,26 @@ public class MailCfgController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateMailCfgValid" })
|
@RequestMapping(value = { "updateMailCfgValid" })
|
||||||
@RequiresPermissions(value = { "mail:config" })
|
@RequiresPermissions(value = { "mail:config" })
|
||||||
public String updateMailCfgValid(Integer isValid, String ids, Integer functionId) {
|
public String updateMailCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
mailCfgService.updateMailCfgValid(isValid, ids, functionId);
|
mailCfgService.updateMailCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/mail/mailList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/mail/mailList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -208,8 +208,26 @@ public class WebsiteController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateHttpCfgValid" })
|
@RequestMapping(value = { "updateHttpCfgValid" })
|
||||||
@RequiresPermissions(value = { "website:http:config" })
|
@RequiresPermissions(value = { "website:http:config" })
|
||||||
public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId) {
|
public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
websiteCfgService.updateHttpCfgValid(isValid, ids, functionId);
|
websiteCfgService.updateHttpCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,8 +356,26 @@ public class WebsiteController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateSslCfgValid" })
|
@RequestMapping(value = { "updateSslCfgValid" })
|
||||||
@RequiresPermissions(value = { "website:ssl:config" })
|
@RequiresPermissions(value = { "website:ssl:config" })
|
||||||
public String updateSslCfgValid(Integer isValid, String ids, Integer functionId) {
|
public String updateSslCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
websiteCfgService.updateSslCfgValid(isValid, ids, functionId);
|
websiteCfgService.updateSslCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,8 +496,26 @@ public class WebsiteController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateDnsCfgValid" })
|
@RequestMapping(value = { "updateDnsCfgValid" })
|
||||||
@RequiresPermissions(value = { "website:dns:config" })
|
@RequiresPermissions(value = { "website:dns:config" })
|
||||||
public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId) {
|
public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
websiteCfgService.updateDnsCfgValid(isValid, ids, functionId);
|
websiteCfgService.updateDnsCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,8 +167,28 @@ public class WhiteListController extends CommonController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "updateIpValid" })
|
@RequestMapping(value = { "updateIpValid" })
|
||||||
@RequiresPermissions(value = { "whitelist:ip:config" })
|
@RequiresPermissions(value = { "whitelist:ip:config" })
|
||||||
public String updateIpCfgValid(Integer isValid, String ids, Integer functionId) {
|
public String updateIpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
ipCfgService.updateIpCfgValid(isValid, ids, functionId);
|
ipCfgService.updateIpCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
//addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,8 +285,26 @@ public class WhiteListController extends CommonController {
|
|||||||
|
|
||||||
@RequestMapping(value = { "domain/updateValid" })
|
@RequestMapping(value = { "domain/updateValid" })
|
||||||
@RequiresPermissions(value = { "whitelist:domain:config" })
|
@RequiresPermissions(value = { "whitelist:domain:config" })
|
||||||
public String updateDomainValid(Integer isValid, String ids, Integer functionId) {
|
public String updateDomainValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
domainService.updateDomainCfgValid(isValid, ids, functionId);
|
domainService.updateDomainCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId;
|
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,8 +157,26 @@ public class CachePolicyController extends BaseController{
|
|||||||
}
|
}
|
||||||
@RequestMapping(value = {"delete"})
|
@RequestMapping(value = {"delete"})
|
||||||
@RequiresPermissions(value={"cache:policy:config"})
|
@RequiresPermissions(value={"cache:policy:config"})
|
||||||
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
cachePolicyService.updateCachePolicyValid(isValid,ids,functionId);
|
cachePolicyService.updateCachePolicyValid(isValid,ids,functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath +"/proxy/cache/list?functionId="+functionId;
|
return "redirect:" + adminPath +"/proxy/cache/list?functionId="+functionId;
|
||||||
}
|
}
|
||||||
@RequestMapping(value = {"audit"})
|
@RequestMapping(value = {"audit"})
|
||||||
|
|||||||
@@ -215,8 +215,26 @@ public class HttpRedirectPolicyController extends BaseController {
|
|||||||
@RequiresPermissions(value = { "control:httpBlock:config", "control:httpRedirect:config",
|
@RequiresPermissions(value = { "control:httpBlock:config", "control:httpRedirect:config",
|
||||||
"control:httpReplace:config", "control:httpMinit:config",
|
"control:httpReplace:config", "control:httpMinit:config",
|
||||||
"control:httpWhitelist:config" }, logical = Logical.OR)
|
"control:httpWhitelist:config" }, logical = Logical.OR)
|
||||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) {
|
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
|
try {
|
||||||
|
if (!StringUtil.isEmpty(ids)) {
|
||||||
httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId);
|
httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId);
|
||||||
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
// 批量删除
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("配置删除失败:", e);
|
||||||
|
if (e instanceof MaatConvertException) {
|
||||||
|
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||||
|
} else {
|
||||||
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId=" + functionId;
|
return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -209,11 +209,16 @@ public class InterceptController extends CommonController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = { "updateInterceptIpValid", "updateInterceptDomainValid", "updateInterceptIpPayloadValid" })
|
@RequestMapping(value = { "updateInterceptIpValid", "updateInterceptDomainValid", "updateInterceptIpPayloadValid" })
|
||||||
public String updateInterceptIpValid(Integer isValid, String ids, Integer functionId,
|
public String updateInterceptIpValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||||
RedirectAttributes redirectAttributes) {
|
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||||
try {
|
try {
|
||||||
|
if(!StringUtil.isEmpty(ids)) {
|
||||||
interceptCfgService.updatInterceptValid(isValid, ids, functionId);
|
interceptCfgService.updatInterceptValid(isValid, ids, functionId);
|
||||||
addMessage(redirectAttributes, "success", "delete_success");
|
addMessage(redirectAttributes, "success", "delete_success");
|
||||||
|
}else {
|
||||||
|
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||||
|
deleteAll(searchPage, functionId, cfg);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("intercept ip delete failed", e);
|
logger.error("intercept ip delete failed", e);
|
||||||
addMessage(redirectAttributes, "error", "delete_failed");
|
addMessage(redirectAttributes, "error", "delete_failed");
|
||||||
|
|||||||
@@ -41,4 +41,8 @@ public interface CommonPolicyDao {
|
|||||||
public List<CachePolicyUserRegion> getCachePolicyUserRegionList(CachePolicyUserRegion entity);
|
public List<CachePolicyUserRegion> getCachePolicyUserRegionList(CachePolicyUserRegion entity);
|
||||||
|
|
||||||
public List<CachePolicyUserRegion> getCachePolicyByUserRegionList(@Param("ids")String ids);
|
public List<CachePolicyUserRegion> getCachePolicyByUserRegionList(@Param("ids")String ids);
|
||||||
|
|
||||||
|
public void deleteCfgBatch(@Param("tableName")String tableName,
|
||||||
|
@Param("entity")BaseCfg entity,
|
||||||
|
@Param("compileIds")List compileIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1013,5 +1013,17 @@
|
|||||||
where a.CFG_ID in (${ids})
|
where a.CFG_ID in (${ids})
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="deleteCfgBatch">
|
||||||
|
UPDATE ${tableName}
|
||||||
|
SET is_valid =-1,is_audit=0,
|
||||||
|
editor_id = #{entity.editorId,jdbcType=INTEGER},
|
||||||
|
edit_time = #{entity.editTime,jdbcType=TIMESTAMP}
|
||||||
|
<where>
|
||||||
|
AND compile_id IN
|
||||||
|
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||||
|
#{compileId}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -306,4 +306,107 @@ public class CommonPolicyService extends CrudService<WebsiteCfgDao, CfgIndexInfo
|
|||||||
logger.warn("回调配置批量失效-下发耗时:end("+(end-start)+")");
|
logger.warn("回调配置批量失效-下发耗时:end("+(end-start)+")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置批量审核不通过
|
||||||
|
* @param cfgList // 存放域配置类型 及 对应表名
|
||||||
|
* @param page
|
||||||
|
* @param entity // 保存要审核的状态类
|
||||||
|
* @param list // 主配置表数据(在调用前查出)
|
||||||
|
* @param hasData // 标识是否还有数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean batchUnApproveMaatData(List<Map<String, Object>> cfgList, Page page, BaseCfg entity,
|
||||||
|
List<BaseCfg> list, boolean hasData) {
|
||||||
|
|
||||||
|
// 1.获取所有配置的编译ID
|
||||||
|
List<Integer> compileIds = new ArrayList();
|
||||||
|
for(BaseCfg cfg:list){
|
||||||
|
compileIds.add(cfg.getCompileId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2.更新配置审核状态(主表)
|
||||||
|
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
|
||||||
|
List auditHttpCompileIds= new ArrayList();
|
||||||
|
List deleteHttpCompileIds= new ArrayList();
|
||||||
|
|
||||||
|
// Protocol -> HTTP 请求/响应内容关键字单独处理 ------>
|
||||||
|
//http关键字配置失效,获取与其匹配的http url配置
|
||||||
|
if(entity.getServiceId().equals(152) || entity.getServiceId().equals(40)) {
|
||||||
|
List<CfgIndexInfo> httpUrlCfgs=commonPolicyDao.getHttpUrlCfgBySourceCompileId(compileIds);
|
||||||
|
if(!StringUtil.isEmpty(httpUrlCfgs)) {
|
||||||
|
for (CfgIndexInfo httpUrlCfg: httpUrlCfgs) {
|
||||||
|
//审核通过的
|
||||||
|
if(httpUrlCfg.getIsValid().equals(1) && httpUrlCfg.getIsAudit().equals(1)) {
|
||||||
|
auditHttpCompileIds.add(httpUrlCfg.getCompileId());
|
||||||
|
/*maatCfg = new MaatCfg();
|
||||||
|
maatCfg.setCompileId(httpUrlCfg.getCompileId());
|
||||||
|
maatCfg.setServiceId(httpUrlCfg.getServiceId());
|
||||||
|
maatCfg.setIsValid(0);//无效
|
||||||
|
configCompileList.add(maatCfg);*/
|
||||||
|
}
|
||||||
|
//未审核或者审核未通过的
|
||||||
|
if(httpUrlCfg.getIsValid().equals(0) && (httpUrlCfg.getIsAudit().equals(0) || httpUrlCfg.getIsAudit().equals(2))) {
|
||||||
|
deleteHttpCompileIds.add(httpUrlCfg.getCompileId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!StringUtil.isEmpty(auditHttpCompileIds)) {
|
||||||
|
commonPolicyDao.auditCfgBatch("cfg_index_info", entity,auditHttpCompileIds,null);
|
||||||
|
commonPolicyDao.auditCfgBatch("http_url_cfg", entity,auditHttpCompileIds,null);
|
||||||
|
}
|
||||||
|
if(!StringUtil.isEmpty(deleteHttpCompileIds)) {
|
||||||
|
commonPolicyDao.deleteHttpUrlCfg("cfg_index_info", entity,deleteHttpCompileIds);
|
||||||
|
commonPolicyDao.deleteHttpUrlCfg("http_url_cfg", entity,deleteHttpCompileIds);
|
||||||
|
}
|
||||||
|
// Protocol -> HTTP 请求/响应内容关键字单独处理 ------>
|
||||||
|
|
||||||
|
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null); // 批量审核并修改配置审核状态(主表)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3.更新域配置审核状态(子表)
|
||||||
|
if(cfgList!=null){
|
||||||
|
for(Map<String,Object> m:cfgList){
|
||||||
|
String tableName = m.get("tableName").toString();
|
||||||
|
commonPolicyDao.auditCfgBatch( tableName, entity,compileIds,null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4.判断是否是当前检索条件下最后一页数据 并返回结果
|
||||||
|
page.setList(list);
|
||||||
|
if(page.isLastPage()){
|
||||||
|
hasData = false;
|
||||||
|
}
|
||||||
|
return hasData;
|
||||||
|
|
||||||
|
}
|
||||||
|
public boolean batchDeleteMaatData(List<Map<String, Object>> cfgList, Page page, BaseCfg entity,
|
||||||
|
List<BaseCfg> list, boolean hasData) {
|
||||||
|
// 1.获取所有配置的编译ID
|
||||||
|
List<Integer> compileIds = new ArrayList();
|
||||||
|
for(BaseCfg cfg:list){
|
||||||
|
compileIds.add(cfg.getCompileId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2.更新配置状态(主表)
|
||||||
|
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
|
||||||
|
commonPolicyDao.deleteCfgBatch(entity.getTableName(), entity,compileIds); // 批量修改配置状态(主表)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3.更新域配置状态(子表)
|
||||||
|
if(cfgList != null){
|
||||||
|
for(Map<String,Object> m : cfgList){
|
||||||
|
String tableName = m.get("tableName").toString();
|
||||||
|
commonPolicyDao.deleteCfgBatch(tableName, entity, compileIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4.判断是否是当前检索条件下最后一页数据 并返回结果
|
||||||
|
page.setList(list);
|
||||||
|
if(page.isLastPage()){
|
||||||
|
hasData = false;
|
||||||
|
}
|
||||||
|
return hasData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1507,3 +1507,5 @@ effective=Effective
|
|||||||
admin_user_warn=Admin User Warn
|
admin_user_warn=Admin User Warn
|
||||||
interface_total=Interface Total
|
interface_total=Interface Total
|
||||||
service_total=Service Total
|
service_total=Service Total
|
||||||
|
unapproved_all=UnApprove all configurations!
|
||||||
|
delete_all=Delete all configurations!
|
||||||
@@ -1505,3 +1505,5 @@ effective=\u6709\u6548
|
|||||||
admin_user_warn=\u7ba1\u7406\u5458\u7528\u6237\u9884\u8b66
|
admin_user_warn=\u7ba1\u7406\u5458\u7528\u6237\u9884\u8b66
|
||||||
interface_total=\u754c\u9762\u603b\u91cf
|
interface_total=\u754c\u9762\u603b\u91cf
|
||||||
service_total=\u670d\u52a1\u603b\u91cf
|
service_total=\u670d\u52a1\u603b\u91cf
|
||||||
|
unapproved_all=\u5ba1\u6838\u4E0D\u901a\u8fc7\u6240\u6709\u914d\u7f6e!
|
||||||
|
delete_all=\u5220\u9664\u6240\u6709\u914d\u7f6e!
|
||||||
@@ -62,101 +62,10 @@ $(document).ready(function() {
|
|||||||
$('#${id} tbody tr td input.i-checks').iCheck('uncheck');
|
$('#${id} tbody tr td input.i-checks').iCheck('uncheck');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//删除
|
|
||||||
function del(url){
|
|
||||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
|
||||||
|
|
||||||
if($(checkboxes).filter(":checked").length>0){
|
// 判断该业务是否可以批量操作配置
|
||||||
if(validateIsDelete(checkboxes)){
|
function isBatch(url){
|
||||||
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
|
var flag = false;
|
||||||
return;
|
|
||||||
}else{
|
|
||||||
var serviceGroupIds=[],ids=[],canDel=true;
|
|
||||||
$(checkboxes).filter(":checked").each(function(){
|
|
||||||
if($(this).attr("serviceGroupId")&&$(this).attr("isValid")){
|
|
||||||
if($(this).attr("isValid")==1){//下发过的组的ip才需要判断是否是组内最后一个IP
|
|
||||||
serviceGroupIds.push($(this).attr("serviceGroupId"));
|
|
||||||
}
|
|
||||||
ids.push($(this).attr("id"));
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
if(serviceGroupIds.length>0){
|
|
||||||
$.ajax({
|
|
||||||
type:'post',
|
|
||||||
url:'${ctx}/basics/asn/ajaxIsLast',
|
|
||||||
data:{"serviceGroupIds":serviceGroupIds.join(','),"ids":ids.join(',')},
|
|
||||||
async:false,
|
|
||||||
success:function(data,textStatus){//处理返回结果
|
|
||||||
if(data){
|
|
||||||
top.$.jBox.tip('<spring:message code="last_ip_in_asn_group"/>');
|
|
||||||
canDel=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if(canDel){
|
|
||||||
doAll(checkboxes,url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//修改配置
|
|
||||||
function update(url){
|
|
||||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
|
||||||
var cked = $("tbody tr td input.i-checks:checkbox:checked");
|
|
||||||
|
|
||||||
/* var schedulerFlag = $(cked).parent().parent().find(".schedulerFlag").find("span").attr("isScheduler");
|
|
||||||
if(schedulerFlag!= "undefined" && schedulerFlag=="yes"){//验证配置是否是定时任务,如果是定时任务,不允许修改
|
|
||||||
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
} */
|
|
||||||
if($(checkboxes).filter(":checked").length==1){
|
|
||||||
//TODO 生效配置可更改功能,在最后功能实现完成后打开【打开时确认来函和专项是否影响】
|
|
||||||
if(cked.val()==1){
|
|
||||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}/*else if(cked.val()==3){
|
|
||||||
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
//处理asnIp,asn组下发过的ip配置不允许修改
|
|
||||||
if(cked.attr("asnGroup")&&cked.attr("isValid")){
|
|
||||||
var asnGroup=cked.attr("asnGroup");
|
|
||||||
var _isValid=cked.attr("isValid");
|
|
||||||
if(asnGroup&&_isValid==1){
|
|
||||||
top.$.jBox.tip("<spring:message code='can_not_edit_issued_ans_group'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
doAll(checkboxes,url);
|
|
||||||
}else{
|
|
||||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//通过
|
|
||||||
function passOpt(url){
|
|
||||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
|
||||||
|
|
||||||
if($(checkboxes).filter(":checked").length>0){
|
|
||||||
/* if(validateIsScheduler(checkboxes)){//验证配置是否是定时任务,如果是定时任务,不允许手动审核
|
|
||||||
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
} */
|
|
||||||
if(validateAllNoAudit(checkboxes)){
|
|
||||||
top.$.jBox.tip("<spring:message code='has_prohibit_pass'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}else{
|
|
||||||
doAll(checkboxes,url);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
url=url+"&"
|
|
||||||
//配置批量下发
|
|
||||||
if(url.indexOf("functionId=3&") > -1 //ip whitelist
|
if(url.indexOf("functionId=3&") > -1 //ip whitelist
|
||||||
|| url.indexOf("functionId=5&") > -1 //ip
|
|| url.indexOf("functionId=5&") > -1 //ip
|
||||||
|| url.indexOf("functionId=212&") > -1 //ip
|
|| url.indexOf("functionId=212&") > -1 //ip
|
||||||
@@ -211,6 +120,117 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
|||||||
|| url.indexOf("functionId=571&") > -1 //Trusted Certificate
|
|| url.indexOf("functionId=571&") > -1 //Trusted Certificate
|
||||||
|| url.indexOf("functionId=600&") > -1 //Trusted Certificate
|
|| url.indexOf("functionId=600&") > -1 //Trusted Certificate
|
||||||
){
|
){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
function del(url){
|
||||||
|
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||||
|
|
||||||
|
if($(checkboxes).filter(":checked").length>0){
|
||||||
|
if(validateIsDelete(checkboxes)){
|
||||||
|
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
var serviceGroupIds=[],ids=[],canDel=true;
|
||||||
|
$(checkboxes).filter(":checked").each(function(){
|
||||||
|
if($(this).attr("serviceGroupId")&&$(this).attr("isValid")){
|
||||||
|
if($(this).attr("isValid")==1){//下发过的组的ip才需要判断是否是组内最后一个IP
|
||||||
|
serviceGroupIds.push($(this).attr("serviceGroupId"));
|
||||||
|
}
|
||||||
|
ids.push($(this).attr("id"));
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
if(serviceGroupIds.length>0){
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
url:'${ctx}/basics/asn/ajaxIsLast',
|
||||||
|
data:{"serviceGroupIds":serviceGroupIds.join(','),"ids":ids.join(',')},
|
||||||
|
async:false,
|
||||||
|
success:function(data,textStatus){//处理返回结果
|
||||||
|
if(data){
|
||||||
|
top.$.jBox.tip('<spring:message code="last_ip_in_asn_group"/>');
|
||||||
|
canDel=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(canDel){
|
||||||
|
doAll(checkboxes,url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
url = url+"&"
|
||||||
|
if(isBatch(url)) {
|
||||||
|
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
|
if(v=="ok"){
|
||||||
|
$("#searchForm").attr("action",url);
|
||||||
|
page();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//修改配置
|
||||||
|
function update(url){
|
||||||
|
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||||
|
var cked = $("tbody tr td input.i-checks:checkbox:checked");
|
||||||
|
|
||||||
|
/* var schedulerFlag = $(cked).parent().parent().find(".schedulerFlag").find("span").attr("isScheduler");
|
||||||
|
if(schedulerFlag!= "undefined" && schedulerFlag=="yes"){//验证配置是否是定时任务,如果是定时任务,不允许修改
|
||||||
|
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
} */
|
||||||
|
if($(checkboxes).filter(":checked").length==1){
|
||||||
|
//TODO 生效配置可更改功能,在最后功能实现完成后打开【打开时确认来函和专项是否影响】
|
||||||
|
if(cked.val()==1){
|
||||||
|
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}/*else if(cked.val()==3){
|
||||||
|
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}*/
|
||||||
|
//处理asnIp,asn组下发过的ip配置不允许修改
|
||||||
|
if(cked.attr("asnGroup")&&cked.attr("isValid")){
|
||||||
|
var asnGroup=cked.attr("asnGroup");
|
||||||
|
var _isValid=cked.attr("isValid");
|
||||||
|
if(asnGroup&&_isValid==1){
|
||||||
|
top.$.jBox.tip("<spring:message code='can_not_edit_issued_ans_group'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doAll(checkboxes,url);
|
||||||
|
}else{
|
||||||
|
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//通过
|
||||||
|
function passOpt(url){
|
||||||
|
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||||
|
|
||||||
|
if($(checkboxes).filter(":checked").length>0){
|
||||||
|
/* if(validateIsScheduler(checkboxes)){//验证配置是否是定时任务,如果是定时任务,不允许手动审核
|
||||||
|
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
} */
|
||||||
|
if(validateAllNoAudit(checkboxes)){
|
||||||
|
top.$.jBox.tip("<spring:message code='has_prohibit_pass'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
doAll(checkboxes,url);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
url = url+"&"
|
||||||
|
//配置批量下发
|
||||||
|
if(isBatch(url)){
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='approved_all'/>",function(v,h,f){
|
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='approved_all'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
$("#searchForm").attr("action",url);
|
$("#searchForm").attr("action",url);
|
||||||
@@ -234,11 +254,23 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
|||||||
}else{
|
}else{
|
||||||
doAll(checkboxes,url);
|
doAll(checkboxes,url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
url = url+"&"
|
||||||
|
//配置批量审核(未通过)
|
||||||
|
if(isBatch(url)){
|
||||||
|
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='unapproved_all'/>",function(v,h,f){
|
||||||
|
if(v=="ok"){
|
||||||
|
$("#searchForm").attr("action",url);
|
||||||
|
page();
|
||||||
|
}
|
||||||
|
});
|
||||||
}else{
|
}else{
|
||||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//配置取消
|
//配置取消
|
||||||
function cancelPassOpt(url){
|
function cancelPassOpt(url){
|
||||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||||
@@ -304,60 +336,7 @@ function cancelPassOpt(url){
|
|||||||
}else{
|
}else{
|
||||||
url = url+"&"
|
url = url+"&"
|
||||||
//配置批量取消
|
//配置批量取消
|
||||||
if( url.indexOf("functionId=3&") > -1 //ip whitelist
|
if(isBatch(url)){
|
||||||
|| url.indexOf("functionId=5&") > -1 //ip
|
|
||||||
|| url.indexOf("functionId=212&") > -1 //ip
|
|
||||||
|| url.indexOf("functionId=214&") > -1 //ip
|
|
||||||
|| url.indexOf("functionId=6&") > -1 //http url
|
|
||||||
|| url.indexOf("functionId=7&") > -1 //dns
|
|
||||||
|| url.indexOf("functionId=37&") > -1 //mail address
|
|
||||||
|| url.indexOf("functionId=35&") > -1 //mail advanced
|
|
||||||
|| url.indexOf("functionId=210&") > -1 //https monitor
|
|
||||||
|| url.indexOf("functionId=207&") > -1 //https block
|
|
||||||
|| url.indexOf("functionId=208&") > -1 //https redirect
|
|
||||||
|| url.indexOf("functionId=209&") > -1 //https replace
|
|
||||||
|| url.indexOf("functionId=211&") > -1 //https whitelist
|
|
||||||
|| url.indexOf("functionId=407&") > -1 //Protocol Identify
|
|
||||||
|| url.indexOf("functionId=63&") > -1 //App Identify
|
|
||||||
|| url.indexOf("functionId=408&") > -1 //Behavior Identify
|
|
||||||
|| url.indexOf("functionId=61&") > -1 //BGP
|
|
||||||
|| url.indexOf("functionId=34&") > -1 //SSL
|
|
||||||
|| url.indexOf("functionId=635&") > -1 //Website Keyword
|
|
||||||
|| url.indexOf("functionId=8&") > -1 //HTTP Advanced
|
|
||||||
|| url.indexOf("functionId=51&") > -1 //FTP
|
|
||||||
|| url.indexOf("functionId=510&") > -1 //P2P
|
|
||||||
|| url.indexOf("functionId=22&") > -1 //Streaming media
|
|
||||||
|| url.indexOf("functionId=24&") > -1 //VoIP
|
|
||||||
|| url.indexOf("functionId=52&") > -1 //File Digest
|
|
||||||
|| url.indexOf("functionId=28&") > -1 //Audio Sample
|
|
||||||
|| url.indexOf("functionId=29&") > -1 //Video Sample
|
|
||||||
|| url.indexOf("functionId=30&") > -1 //Picture Sample
|
|
||||||
|| url.indexOf("functionId=31&") > -1 //VoIP Voice Sample
|
|
||||||
|| url.indexOf("functionId=630&") > -1 //Speaker Recognization
|
|
||||||
|| url.indexOf("functionId=631&") > -1 //Logo Detection
|
|
||||||
|| url.indexOf("functionId=632&") > -1 //Face Recognization
|
|
||||||
|| url.indexOf("functionId=301&") > -1 //DDOS
|
|
||||||
|| url.indexOf("functionId=200&") > -1 //Intercept Policy
|
|
||||||
|| url.indexOf("functionId=210&") > -1 //HTTPS monitor
|
|
||||||
|| url.indexOf("functionId=207&") > -1 //HTTPS block
|
|
||||||
|| url.indexOf("functionId=208&") > -1 //HTTPS Redirect
|
|
||||||
|| url.indexOf("functionId=209&") > -1 //HTTPS Replace
|
|
||||||
|| url.indexOf("functionId=211&") > -1 //whitelist
|
|
||||||
|| url.indexOf("functionId=213&") > -1 //Cache
|
|
||||||
|| url.indexOf("functionId=560&") > -1 //Focused Website
|
|
||||||
|| url.indexOf("functionId=405&") > -1 //APP IP
|
|
||||||
|| url.indexOf("functionId=403&") > -1 //APP DOMAIN
|
|
||||||
//|| url.indexOf("functionId=520&") > -1 //APP SSL CERT
|
|
||||||
|| url.indexOf("functionId=563&") > -1 //APP Payload
|
|
||||||
|| url.indexOf("functionId=565&") > -1 //APP HTTP
|
|
||||||
|| url.indexOf("functionId=566&") > -1 //APP SSL
|
|
||||||
|| url.indexOf("functionId=564&") > -1 //APP DNS
|
|
||||||
|| url.indexOf("functionId=400&") > -1 //DNS Response Profiles
|
|
||||||
|| url.indexOf("functionId=401&") > -1 //Spoofing IP
|
|
||||||
|| url.indexOf("functionId=570&") > -1 //Key Ring
|
|
||||||
|| url.indexOf("functionId=571&") > -1 //Trusted Certificate
|
|
||||||
|| url.indexOf("functionId=600&") > -1 //Trusted Certificate
|
|
||||||
){
|
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='cancel_all'/>",function(v,h,f){
|
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='cancel_all'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
$("#searchForm").attr("action",url);
|
$("#searchForm").attr("action",url);
|
||||||
|
|||||||
Reference in New Issue
Block a user