Merge branch 'develop_no_common_group' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop_no_common_group

This commit is contained in:
duandongmei
2019-04-13 18:35:30 +08:00
78 changed files with 1462 additions and 382 deletions

View File

@@ -61,6 +61,9 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
protected Integer compileIsIssued; protected Integer compileIsIssued;
protected String exType;//导出类型 protected String exType;//导出类型
protected String hColumns;//导出隐藏列 protected String hColumns;//导出隐藏列
protected String compileIdNew;// 查询 配置ID 范围
/** /**
* 定时任务信息 * 定时任务信息
*/ */
@@ -107,7 +110,13 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
public void setCompileGroupMap(Map<Integer, Integer> compileGroupMap) { public void setCompileGroupMap(Map<Integer, Integer> compileGroupMap) {
this.compileGroupMap = compileGroupMap; this.compileGroupMap = compileGroupMap;
} }
public String getCompileIdNew() {
return compileIdNew;
}
public void setCompileIdNew(String compileIdNew) {
this.compileIdNew = compileIdNew;
}
/** /**
* 编译id * 编译id
*/ */

View File

@@ -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 字段名
@@ -200,6 +201,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{
sc.setCompileId(compileId); sc.setCompileId(compileId);
sc.setEditorId(bc.getEditorId()); sc.setEditorId(bc.getEditorId());
sc.setEditTime(bc.getEditTime()); sc.setEditTime(bc.getEditTime());
sc.setType(1);
sc.setCfgId(cfgId); sc.setCfgId(cfgId);
//根据 compileId 删除之前的 //根据 compileId 删除之前的
MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.deleteByCompileId"); MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.deleteByCompileId");
@@ -276,6 +278,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{
MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.insert"); MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.insert");
scfg.setIsValid(isValid); scfg.setIsValid(isValid);
scfg.setIsAudit(isAudit); scfg.setIsAudit(isAudit);
scfg.setType(1);
executor.update(statement, scfg); executor.update(statement, scfg);
} }
//手动 审核通过,立即生效时 已经下发,修改 exce_new 表的是否需要下发字段为 不需要 0 //手动 审核通过,立即生效时 已经下发,修改 exce_new 表的是否需要下发字段为 不需要 0

View File

@@ -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);
auditBatchCfg.setIsAudit(1); if(auditType.equals(1)) {
auditBatchCfg.setIsValid(1); auditBatchCfg.setIsAudit(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,7 +3022,11 @@ public class BaseController {
baseCfgList.add(baseCfg); baseCfgList.add(baseCfg);
} }
} }
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,baseCfgList, 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;
@@ -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,7 +3052,11 @@ public class BaseController {
cfgAppList.add(baseCfg); cfgAppList.add(baseCfg);
} }
} }
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgAppList, hasData); if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, cfgAppList, hasData);
}else {// 配置失效处理 批量处理
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,7 +3083,11 @@ public class BaseController {
cfgFeatrureList.add(baseCfg); cfgFeatrureList.add(baseCfg);
} }
} }
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgFeatrureList, hasData); if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, cfgFeatrureList, hasData);
}else {// 配置失效处理 批量处理
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,7 +3119,11 @@ public class BaseController {
newList.add(cfg); newList.add(cfg);
} }
} }
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData); if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, newList, hasData);
}else {// 配置失效处理 批量处理
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
}
} }
if(hasData) { if(hasData) {
page.setPageNo(1); page.setPageNo(1);
@@ -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

View File

@@ -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,
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -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 {
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); if(!StringUtil.isEmpty(ids)) {
addMessage(redirectAttributes, "success", "delete_success"); 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) {
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");
} }
} }

View File

@@ -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 {
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); if (!StringUtil.isEmpty(ids)) {
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) {

View File

@@ -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,
ddosCfgService.delete(isAudit, isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")DdosIpCfg cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -484,13 +484,15 @@ public class IpMultiplexController extends CommonController {
for (Integer id : set) { for (Integer id : set) {
serviceIds.append(id+","); serviceIds.append(id+",");
} }
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1); if(serviceIds.length()>1&&compileIds.length()>1){
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1); String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
//获取日志总量 String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){ //获取日志总量
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
logTotals.addAll(logs); List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
} logTotals.addAll(logs);
}
}
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool(); List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
for (IpReusePolicyCfg ipReusePolicyCfg : ipLists) { for (IpReusePolicyCfg ipReusePolicyCfg : ipLists) {
if(ipReusePolicyCfg.getAddrPoolId()!=null){ if(ipReusePolicyCfg.getAddrPoolId()!=null){
@@ -604,12 +606,15 @@ public class IpMultiplexController extends CommonController {
for (Integer id : set) { for (Integer id : set) {
serviceIds.append(id+","); serviceIds.append(id+",");
} }
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1); if(serviceIds.length()>1&&compileIds.length()>1){
//获取日志总量 String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){ String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); //获取日志总量
logTotals.addAll(logs); if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
logTotals.addAll(logs);
}
} }
titleList.add(entity.getMenuNameCode()); titleList.add(entity.getMenuNameCode());
classMap.put(entity.getMenuNameCode(), IpReuseDnatPolicyCfg.class); classMap.put(entity.getMenuNameCode(), IpReuseDnatPolicyCfg.class);

View File

@@ -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 {
avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId); if (!StringUtil.isEmpty(ids)) {
addMessage(redirectAttributes, "success", "delete_success"); avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, 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) {
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) {
avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId); try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -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) {
avCfgService.updateAvFileSampleValid(isAudit, isValid, ids); try {
addMessage(redirectAttributes, "success", "delete_success"); if (!StringUtil.isEmpty(ids)) {
avCfgService.updateAvFileSampleValid(isAudit, isValid, ids);
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;
} }

View File

@@ -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) {
bgpCfgService.updateBgpCfgValid(isValid, ids, functionId); try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -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 {
fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId); if(!StringUtil.isEmpty(ids)) {
addMessage(redirectAttributes, "success", "delete_success"); fileTransferCfgService.updateFtpCfgValid(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) {
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) {
fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId); try {
if(!StringUtil.isEmpty(ids)) {
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 {
fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId); if(!StringUtil.isEmpty(ids)) {
addMessage(redirectAttributes, "success", "delete_success"); fileTransferCfgService.updateP2pCfgValid(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) {
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");
} }

View File

@@ -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,
ipCfgService.updateIpCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }
/** /**
@@ -194,7 +213,7 @@ public class IpController extends BaseController{
/*if(StringUtils.isNoneBlank(entity.getUserRegion4())) { /*if(StringUtils.isNoneBlank(entity.getUserRegion4())) {
ipCfgService.auditAsnCfg(entity, isAudit); ipCfgService.auditAsnCfg(entity, isAudit);
}else {*/ }else {*/
ipCfgService.auditIpCfg(entity,isAudit); ipCfgService.auditIpCfg(entity,isAudit,Constants.INSERT_ACTION);
/*}*/ /*}*/
addMessage(redirectAttributes,"success", "audit_success"); addMessage(redirectAttributes,"success", "audit_success");
} catch (Exception e) { } catch (Exception e) {

View File

@@ -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,
mailCfgService.updateMailCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -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,
websiteCfgService.updateHttpCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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,
websiteCfgService.updateSslCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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,
websiteCfgService.updateDnsCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -97,9 +97,24 @@ public class WhiteListController extends CommonController {
} }
@RequestMapping(value = { "ip/save" }) @RequestMapping(value = { "ip/save" })
public String saveIpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response, public String saveIpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes,
String ids, CfgIndexInfo entity) { String ids, CfgIndexInfo entity) {
ipCfgService.saveIpCfg(entity); try {
ipCfgService.saveIpCfg(entity);
//配置仅保存
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
} catch (MaatConvertException e) {
logger.error("ip白名单配置下发失败",e);
addMessage(redirectAttributes, "error", "request_service_failed");
} catch (Exception e) {
logger.error("ip白名单配置保存失败",e);
addMessage(redirectAttributes, "error", "save_failed");
}
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + entity.getFunctionId(); return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + entity.getFunctionId();
} }
@@ -115,11 +130,9 @@ public class WhiteListController extends CommonController {
entity = ipCfgService.getIpPortCfg(Long.parseLong(id), null); entity = ipCfgService.getIpPortCfg(Long.parseLong(id), null);
entity.setIsAudit(isAudit); entity.setIsAudit(isAudit);
entity.setIsValid(isValid); entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(new Date());
entity.setFunctionId(functionId); entity.setFunctionId(functionId);
try { try {
ipCfgService.auditIpCfg(entity, isAudit); ipCfgService.auditIpCfg(entity, isAudit,Constants.INSERT_ACTION);
addMessage(redirectAttributes, "success", "audit_success"); addMessage(redirectAttributes, "success", "audit_success");
} catch (MaatConvertException e) { } catch (MaatConvertException e) {
logger.info("ip配置下发失败" + e.getMessage()); logger.info("ip配置下发失败" + e.getMessage());
@@ -154,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,
ipCfgService.updateIpCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }
@@ -252,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,
domainService.updateDomainCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -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,
cachePolicyService.updateCachePolicyValid(isValid,ids,functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg){
try {
if (!StringUtil.isEmpty(ids)) {
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"})

View File

@@ -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,
httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId); HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
try {
if (!StringUtil.isEmpty(ids)) {
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;
} }

View File

@@ -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 {
interceptCfgService.updatInterceptValid(isValid, ids, functionId); if(!StringUtil.isEmpty(ids)) {
addMessage(redirectAttributes, "success", "delete_success"); interceptCfgService.updatInterceptValid(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("intercept ip delete failed", e); logger.error("intercept ip delete failed", e);
addMessage(redirectAttributes, "error", "delete_failed"); addMessage(redirectAttributes, "error", "delete_failed");

View File

@@ -761,6 +761,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>
@@ -931,6 +950,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="compileGroupMap != null"> <if test="compileGroupMap != null">
and r.COMPILE_ID in and r.COMPILE_ID in
<foreach collection="compileGroupMap.keys" index="index" item="compileId" open="(" separator="," close=")"> <foreach collection="compileGroupMap.keys" index="index" item="compileId" open="(" separator="," close=")">
@@ -1140,6 +1178,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>
@@ -1241,6 +1298,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>
@@ -1539,6 +1615,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -308,6 +308,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -164,6 +164,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -352,6 +352,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -234,6 +234,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -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);
} }

View File

@@ -245,6 +245,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>
@@ -917,6 +936,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>
@@ -975,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>

View File

@@ -252,6 +252,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>
@@ -696,6 +715,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>
@@ -1130,6 +1168,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -1105,6 +1105,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -128,6 +128,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND r.compile_id=#{compileId,jdbcType=BIGINT} AND r.compile_id=#{compileId,jdbcType=BIGINT}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND r.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND r.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND r.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="srcIpAddress != null and srcIpAddress != ''"> <if test="srcIpAddress != null and srcIpAddress != ''">
AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR} AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR}
</if> </if>
@@ -638,6 +657,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.compile_id=#{compileId,jdbcType=BIGINT} AND a.compile_id=#{compileId,jdbcType=BIGINT}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="srcIpAddress != null and srcIpAddress != ''"> <if test="srcIpAddress != null and srcIpAddress != ''">
AND a.original_dest_ip=#{srcIpAddress,jdbcType=VARCHAR} AND a.original_dest_ip=#{srcIpAddress,jdbcType=VARCHAR}
</if> </if>

View File

@@ -196,6 +196,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -215,6 +215,25 @@
<if test="compileId != null"> <if test="compileId != null">
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if> </if>
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
<if test="index == 0">
AND a.COMPILE_ID &gt;= #{item,jdbcType=INTEGER}
</if>
<if test="index == 1">
AND a.COMPILE_ID &lt;= #{item,jdbcType=INTEGER}
</if>
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
AND a.COMPILE_ID in
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null"> <if test="isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if> </if>

View File

@@ -286,15 +286,15 @@ public abstract class BaseService {
scopeSql.append(" OR (" + officeAlias + ".parent_id = '" + user.getEntity().getId() + "' AND " + officeAlias scopeSql.append(" OR (" + officeAlias + ".parent_id = '" + user.getEntity().getId() + "' AND " + officeAlias
+ ".type>1)"); + ".type>1)");
} else if (SysRole.DATA_SCOPE_CREATOR.equals(dataScope)) { } else if (SysRole.DATA_SCOPE_CREATOR.equals(dataScope)) {//操作员【非管理员用户数据】
// scopeSql.append(" OR " + configAlias + ".is_audit !=3"); // scopeSql.append(" OR " + configAlias + ".is_audit !=3");
scopeSql.append(" OR " + configAlias + ".creator_id <>1 "); scopeSql.append(" OR " + configAlias + ".creator_id <>1 ");
} else if (SysRole.DATA_SCOPE_AUDITOR.equals(dataScope)) { } else if (SysRole.DATA_SCOPE_AUDITOR.equals(dataScope)) {//审核员【未审核和审核通过状态的非管理员用户数据】
scopeSql.append(" OR " + configAlias + ".is_audit = 0 or " + configAlias + ".is_audit = 1"); scopeSql.append(" OR (" + configAlias + ".is_audit = 0 OR " + configAlias + ".is_audit = 1)");
scopeSql.append(" OR " + configAlias + ".creator_id <>1 "); scopeSql.append(" AND " + configAlias + ".creator_id <>1 ");
} else if (SysRole.DATA_SCOPE_SHOWER.equals(dataScope)) { } else if (SysRole.DATA_SCOPE_SHOWER.equals(dataScope)) {//审计员【审核通过状态的非管理员用户数据】
scopeSql.append(" OR " + configAlias + ".is_audit = 1"); scopeSql.append(" OR " + configAlias + ".is_audit = 1");
scopeSql.append(" OR " + configAlias + ".creator_id <>1 "); scopeSql.append(" AND " + configAlias + ".creator_id <>1 ");
} }
return scopeSql.toString(); return scopeSql.toString();
@@ -2344,8 +2344,7 @@ public abstract class BaseService {
try{ try{
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false); batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
for(int index = 0; index < appPolicyCfgs.size();index++){ for(int index = 0; index < appPolicyCfgs.size();index++){
AppPolicyCfg _cfg = new AppPolicyCfg(); AppPolicyCfg _cfg = appPolicyCfgs.get(index);
BeanUtils.copyProperties(appPolicyCfgs.get(index), _cfg);
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppPolicyCfgForBatch(_cfg); ((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppPolicyCfgForBatch(_cfg);
} }

View File

@@ -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;
}
} }

View File

@@ -720,7 +720,7 @@ public class ConfigSynchronizationService extends BaseService{
} }
if(isUpdateCfg) { if(isUpdateCfg) {
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) { if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null); commonPolicyDao.auditCfgBatch( tableName, entity,compileIds,null);
} }
} }
} }
@@ -913,7 +913,7 @@ public class ConfigSynchronizationService extends BaseService{
} }
if(isUpdateCfg) { if(isUpdateCfg) {
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) { if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null); commonPolicyDao.auditCfgBatch( tableName, entity,compileIds,null);
} }
} }
} }

View File

@@ -115,6 +115,10 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
//设置区域运营商信息 //设置区域运营商信息
setAreaEffectiveIds(entity); setAreaEffectiveIds(entity);
int isValid=0;
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
isValid=1;
}
entity.setIsValid(0); entity.setIsValid(0);
entity.setIsAudit(0); entity.setIsAudit(0);
@@ -189,6 +193,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
} }
} }
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditIpCfg(entity, isValid,Constants.INSERT_ACTION);
}
}else{ }else{
entity.setEditTime(new Date()); entity.setEditTime(new Date());
entity.setEditorId(entity.getCurrentUser().getId()); entity.setEditorId(entity.getCurrentUser().getId());
@@ -262,6 +271,12 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
} }
} }
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditIpCfg(entity, isValid,Constants.UPDATE_ACTION);
}
} }
} }
public void updateIpCfgValid(Integer isValid,String ids,Integer functionId){ public void updateIpCfgValid(Integer isValid,String ids,Integer functionId){
@@ -526,12 +541,15 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
} }
} }
} }
public void auditIpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{ public void auditIpCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
Properties props=this.getMsgProp(); Properties props=this.getMsgProp();
//修改数据库审核状态信息 //修改数据库审核状态信息
entity.setTableName(CfgIndexInfo.getTablename()); entity.setTableName(CfgIndexInfo.getTablename());
entity.setIsAudit(isAudit); entity.setIsAudit(isAudit);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(new Date());
ipCfgDao.auditCfg(entity); ipCfgDao.auditCfg(entity);
ToMaatBean maatBean = new ToMaatBean(); ToMaatBean maatBean = new ToMaatBean();
MaatCfg maatCfg = new MaatCfg(); MaatCfg maatCfg = new MaatCfg();
List<MaatCfg> configCompileList = new ArrayList(); List<MaatCfg> configCompileList = new ArrayList();
@@ -665,7 +683,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
maatBean.setAuditTime(entity.getAuditTime()); maatBean.setAuditTime(entity.getAuditTime());
maatBean.setCreatorName(entity.getCurrentUser().getName()); maatBean.setCreatorName(entity.getCurrentUser().getName());
maatBean.setVersion(Constants.MAAT_VERSION); maatBean.setVersion(Constants.MAAT_VERSION);
maatBean.setOpAction(Constants.INSERT_ACTION); maatBean.setOpAction(opAction);
//限速需要发Droprate=0.001 暂不支持Bandwidth=200kbps //限速需要发Droprate=0.001 暂不支持Bandwidth=200kbps
if(entity.getAction().equals(Constants.RATELIMIT_ACTION)){ if(entity.getAction().equals(Constants.RATELIMIT_ACTION)){
if(entity.getUserRegion1().equals("0")){//丢包率 if(entity.getUserRegion1().equals("0")){//丢包率

View File

@@ -1506,4 +1506,6 @@ protection_list_manage=Protection List Manage
effective=Effective 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!

View File

@@ -1504,4 +1504,6 @@ protection_list_manage=\u5185\u7f6e\u4fdd\u62a4\u540d\u5355\u7ba1\u7406
effective=\u6709\u6548 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!

View File

@@ -0,0 +1,5 @@
#审核并下发功能,只有将此菜单分配给保存并下发用户的角色,此角色下的用户新增的配置可直接下发(此版本注意角色分配)
#新增审核并下发菜单
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', '保存并下发按钮', 5060, '', '', '', 0, 'save:audit:permission', '1', '2019-04-08 11:30:31', '1', '2019-04-08 11:47:16', '保存并下发功能权限', 1, NULL, 0, 0, NULL);
#新增审核并下发角色
INSERT INTO `sys_role`(`NAME`, `DATA_SCOPE`, `REMARK`, `STATUS`, `CREATE_TIME`, `ROLE_TYPE`) VALUES ('saveAndAudit', 10, '', 1, '2019-04-09 11:33:40', 'user');

View File

@@ -67,16 +67,13 @@ DELETE FROM ip_reuse_policy_cfg;
DELETE FROM user_manage; DELETE FROM user_manage;
#clear vpn #clear vpn
DELETE FROM service_dict_info where item_type='5'; DELETE FROM service_dict_info where item_type='5';
#<23><><EFBFBD><EFBFBD>DNS<4E><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>100<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>101<EFBFBD><EFBFBD>ʼ #<23><><EFBFBD><EFBFBD>DNS<4E><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>100<30><30><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>Է<EFBFBD><D4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>101<30><31>ʼ
ALTER TABLE policy_group_info auto_increment = 101; ALTER TABLE policy_group_info auto_increment = 101;
#<23><><EFBFBD><EFBFBD>asn<EFBFBD>ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> #<23><><EFBFBD>asn<73>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD>
DELETE FROM asn_group_info; DELETE FROM asn_group_info;
<>϶<EFBFBD>̬IP<49><50>ַ<EFBFBD><D6B7> <>϶<EFBFBD>̬IP<49><50>ַ<EFBFBD><D6B7>
INSERT INTO `ip_reuse_addr_pool` (`cfg_id`, `addr_pool_name`, `ip_total`, `action`, `is_valid`, `is_audit`, `cfg_region_code`, `cfg_type`, `function_id`, `service_id`, `compile_id`, `is_area_effective`, `area_effective_ids`, `request_id`, `classify`, `attribute`, `lable`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `description`, `cancel_request_id`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`) VALUES ('0', 'dynamic_pool', '1', '96', '1', '1', '1', 'IR_STATIC_NOMINEE_IP', '633', '834', '0', '0', '', '0', '0', '0', '0', '0', '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', NULL, '', '', '', '', ''); INSERT INTO `ip_reuse_addr_pool` (`cfg_id`, `addr_pool_name`, `ip_total`, `action`, `is_valid`, `is_audit`, `cfg_region_code`, `cfg_type`, `function_id`, `service_id`, `compile_id`, `is_area_effective`, `area_effective_ids`, `request_id`, `classify`, `attribute`, `lable`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `description`, `cancel_request_id`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`) VALUES ('0', 'dynamic_pool', '1', '96', '1', '1', '1', 'IR_STATIC_NOMINEE_IP', '633', '834', '0', '0', '', '0', '0', '0', '0', '0', '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', NULL, '', '', '', '', '');
UPDATE ip_reuse_addr_pool set cfg_id=0 where addr_pool_name= 'dynamic_pool'; UPDATE ip_reuse_addr_pool set cfg_id=0 where addr_pool_name= 'dynamic_pool';
DELETE FROM schedule_cfg;
DELETE FROM schedule_exce_log;
DELETE FROM schedule_exce_new;
DELETE FROM sys_log; DELETE FROM sys_log;
DELETE FROM sys_cfg_operation_log; DELETE FROM sys_cfg_operation_log;
DELETE FROM sys_cfg_operation_log; DELETE FROM sys_cfg_operation_log;
@@ -85,11 +82,13 @@ DELETE FROM cfg_num_statistics;
DELETE FROM request_num_statistics; DELETE FROM request_num_statistics;
DELETE FROM common_keyword_cfg; DELETE FROM common_keyword_cfg;
DELETE FROM pxy_obj_spoofing_ip_pool; DELETE FROM pxy_obj_spoofing_ip_pool;
DELETE FROM schedule_cfg;
DELETE FROM schedule_exce_log;
DELETE FROM schedule_exce_new;
#<23><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ı<EFBFBD><C4B1>ؽ<EFBFBD>sql<71><6C><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
#<23><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1>ؽ<EFBFBD>sql<71><6C><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
# In your Quartz properties file, you'll need to set # In your Quartz properties file, you'll need to set
# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate # org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
# #

View File

@@ -225,12 +225,29 @@
<div class="row"> <div class="row">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="examine"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="examine"/></label>
<div class="col-md-6"> <div class="col-md-6">
<label class="radio-inline"> <!-- 拥有配置新增直接生效的功能权限导入时默认导入+下发 -->
<input type="radio" name="isSend" value="0" checked><spring:message code="no"/> <shiro:hasPermission name="save:audit:permission">
</label> <c:set var="auditPermission" value="true"></c:set>
<label class="radio-inline"> </shiro:hasPermission>
<input type="radio" name="isSend" value="1"><spring:message code="yes"/> <c:choose>
</label> <c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
<label class="radio-inline">
<input type="radio" name="isSend" value="0"><spring:message code="no"/>
</label>
<label class="radio-inline">
<input type="radio" name="isSend" value="1" checked><spring:message code="yes"/>
</label>
</button>
</c:when>
<c:otherwise>
<label class="radio-inline">
<input type="radio" name="isSend" value="0" checked><spring:message code="no"/>
</label>
<label class="radio-inline">
<input type="radio" name="isSend" value="1"><spring:message code="yes"/>
</label>
</c:otherwise>
</c:choose>
</div> </div>
</div> </div>
</br> </br>

View File

@@ -62,6 +62,69 @@ $(document).ready(function() {
$('#${id} tbody tr td input.i-checks').iCheck('uncheck'); $('#${id} tbody tr td input.i-checks').iCheck('uncheck');
}); });
}); });
// 判断该业务是否可以批量操作配置
function isBatch(url){
var flag = false;
if(url.indexOf("functionId=3&") > -1 //ip whitelist
|| 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
){
flag = true;
}
return flag;
}
//删除 //删除
function del(url){ function del(url){
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox"); var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
@@ -101,8 +164,18 @@ function del(url){
} }
} }
}else{ }else{
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>"); url = url+"&"
return; 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;
}
} }
} }
//修改配置 //修改配置
@@ -116,6 +189,7 @@ function update(url){
return; return;
} */ } */
if($(checkboxes).filter(":checked").length==1){ if($(checkboxes).filter(":checked").length==1){
//TODO 生效配置可更改功能,在最后功能实现完成后打开【打开时确认来函和专项是否影响】
if(cked.val()==1){ if(cked.val()==1){
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>"); top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
return; return;
@@ -154,89 +228,48 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
doAll(checkboxes,url); doAll(checkboxes,url);
} }
}else{ }else{
url=url+"&" url = url+"&"
//配置批量下发 //配置批量下发
if( url.indexOf("functionId=3&") > -1 //ip whitelist if(isBatch(url)){
|| url.indexOf("functionId=5&") > -1 //ip top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='approved_all'/>",function(v,h,f){
|| url.indexOf("functionId=212&") > -1 //ip if(v=="ok"){
|| url.indexOf("functionId=214&") > -1 //ip $("#searchForm").attr("action",url);
|| url.indexOf("functionId=6&") > -1 //http url page();
|| url.indexOf("functionId=7&") > -1 //dns }
|| url.indexOf("functionId=37&") > -1 //mail address });
|| url.indexOf("functionId=35&") > -1 //mail advanced }else{
|| url.indexOf("functionId=210&") > -1 //https monitor top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|| url.indexOf("functionId=207&") > -1 //https block return;
|| 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='approved_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 noPassOpt(url){ function noPassOpt(url){
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox"); var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
if($(checkboxes).filter(":checked").length>0){ if($(checkboxes).filter(":checked").length>0){
if(validateAllNoAudit(checkboxes)){ if(validateAllNoAudit(checkboxes)){
top.$.jBox.tip("<spring:message code='has_prohibit_nopass'/>", "<spring:message code='info'/>"); top.$.jBox.tip("<spring:message code='has_prohibit_nopass'/>", "<spring:message code='info'/>");
return; return;
}else{ }else{
doAll(checkboxes,url); doAll(checkboxes,url);
}
}else{
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
} }
}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{
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
}
}
} }
//配置取消 //配置取消
function cancelPassOpt(url){ function cancelPassOpt(url){
@@ -301,69 +334,16 @@ 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);
page(); 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;
} }

View File

@@ -80,7 +80,7 @@ $(function(){
<div class="form-group asnNo"> <div class="form-group asnNo">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label>
<div class="col-md-6"> <div class="col-md-6">
<input id="asnNo" class="form-control required asnNoUnique number" type="text" name="asnId" value="${_cfg.asnId}" autocomplete="off" maxlength="15" ctx="${ctx }"> <input id="asnNo" class="form-control required asnNoUnique digits" type="text" name="asnId" value="${_cfg.asnId}" autocomplete="off" maxlength="15" ctx="${ctx }">
</div> </div>
<div for="asnId"></div> <div for="asnId"></div>
</div> </div>

View File

@@ -12,8 +12,8 @@
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.cfgKeywords}"){ }else if("${cfg.cfgKeywords}"){
$("#intype").val("${cfg.cfgKeywords}"); $("#intype").val("${cfg.cfgKeywords}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -126,7 +126,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgKeywords"><spring:message code="domain"></spring:message></form:option> <form:option value="cfgKeywords"><spring:message code="domain"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -14,8 +14,8 @@
$("#intype").val("${cfg.destPort}"); $("#intype").val("${cfg.destPort}");
} else if("${cfg.cfgDesc}"){ } else if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
} else if("${cfg.compileId}"){ } else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
} else{ } else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -130,7 +130,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="destIpAddress"><spring:message code="server_ip"></spring:message></form:option> <form:option value="destIpAddress"><spring:message code="server_ip"></spring:message></form:option>
<form:option value="destPort"><spring:message code="server_port"></spring:message></form:option> <form:option value="destPort"><spring:message code="server_port"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -10,8 +10,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipCfg.destIpAddress}"){ }else if("${cfg.ipCfg.destIpAddress}"){
$("#intype").val("${cfg.ipCfg.destIpAddress}"); $("#intype").val("${cfg.ipCfg.destIpAddress}");
}else if("${cfg.strCfg.cfgKeywords}"){ }else if("${cfg.strCfg.cfgKeywords}"){
@@ -187,7 +187,7 @@
<div class="input-group-btn"> <div class="input-group-btn">
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<c:if test="${cfg.functionId ne 564 && cfg.functionId ne 567}"> <c:if test="${cfg.functionId ne 564 && cfg.functionId ne 567}">
<form:option value="ipCfg.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipCfg.destIpAddress"><spring:message code="serverip"></spring:message></form:option>

View File

@@ -22,9 +22,9 @@ $(function(){
$(".ratelimitAction").addClass("hidden"); $(".ratelimitAction").addClass("hidden");
} }
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){ if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
$(".subscribeId").show(); $(".subscribeId").show().removeClass("disabled");
}else{ }else{
$(".subscribeId").hide(); $(".subscribeId").hide().addClass("disabled");
} }
if($(this).val()==1){ if($(this).val()==1){
$(".ipPortAdd").click(); $(".ipPortAdd").click();
@@ -44,12 +44,12 @@ $(function(){
$(".ratelimitAction").addClass("hidden"); $(".ratelimitAction").addClass("hidden");
} }
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){ if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
$(".subscribeId").show(); $(".subscribeId").show().removeClass("disabled");
}else{ }else{
$(".subscribeId").hide(); $(".subscribeId").hide().addClass("disabled");
} }
$("#cfgFrom").validate({ $("#cfgFrom").validate({
errorPlacement: function(error,element){ errorPlacement: function(error,element){
if($(element).parents().hasClass("tagsinput")){ if($(element).parents().hasClass("tagsinput")){
$(element).parents(".col-md-6").next("div").append(error); $(element).parents(".col-md-6").next("div").append(error);
}else{ }else{

View File

@@ -10,8 +10,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -181,7 +181,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>

View File

@@ -12,8 +12,8 @@
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.cfgKeywords}"){ }else if("${cfg.cfgKeywords}"){
$("#intype").val("${cfg.cfgKeywords}"); $("#intype").val("${cfg.cfgKeywords}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -109,7 +109,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgKeywords"><spring:message code="keywords"></spring:message></form:option> <form:option value="cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -12,8 +12,8 @@
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.cfgKeywords}"){ }else if("${cfg.cfgKeywords}"){
$("#intype").val("${cfg.cfgKeywords}"); $("#intype").val("${cfg.cfgKeywords}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -125,7 +125,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgKeywords"><spring:message code="domain"></spring:message></form:option> <form:option value="cfgKeywords"><spring:message code="domain"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -22,8 +22,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -178,7 +178,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"/></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"/></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="avContUrlCfg.cfgKeywords"><spring:message code="URL"></spring:message></form:option> <form:option value="avContUrlCfg.cfgKeywords"><spring:message code="URL"></spring:message></form:option>

View File

@@ -8,8 +8,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -105,7 +105,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -22,8 +22,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -99,6 +99,11 @@
$("#"+openId).show(); $("#"+openId).show();
$("#"+closeId).parent().parent().next("tr").hide(); $("#"+closeId).parent().parent().next("tr").hide();
}); });
if($("#exportType").val() != null && $("#exportType").val() != ""){
if($("#intype").val() != null && $("#intype").val() != ""){
$("#exportValue").val($("#intype").val());
}
}
}); });
</script> </script>
@@ -143,6 +148,8 @@
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/av/voipList?functionId=${cfg.functionId}" method="post" class="form-search"> <form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/av/voipList?functionId=${cfg.functionId}" method="post" class="form-search">
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/> <input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
<input id="audit" name="audit" type="hidden" value="${audit}"/> <input id="audit" name="audit" type="hidden" value="${audit}"/>
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
<input id="exportValue" type="hidden" value=""/>
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/> <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/> <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" <sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
@@ -169,7 +176,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"/></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"/></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="keywords"/></form:option> <form:option value="voipAccount.cfgKeywords"><spring:message code="keywords"/></form:option>

View File

@@ -10,8 +10,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -184,7 +184,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>

View File

@@ -10,8 +10,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -181,7 +181,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<%-- <form:option value="ntcSubscribeIdCfg.cfgKeywords"><spring:message code="APP_SUBSCRIBE_ID"></spring:message></form:option> --%> <%-- <form:option value="ntcSubscribeIdCfg.cfgKeywords"><spring:message code="APP_SUBSCRIBE_ID"></spring:message></form:option> --%>

View File

@@ -10,8 +10,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -176,7 +176,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="cfdsLevel"><spring:message code="harm_level"/></form:option> <form:option value="cfdsLevel"><spring:message code="harm_level"/></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>

View File

@@ -51,12 +51,12 @@
submitHandler : function(form) { submitHandler : function(form) {
var flag = true; var flag = true;
var boxSolidLenth=$(".boxSolid").length;
/* var subscribeId=0; /* var subscribeId=0;
//存在隐藏的subscribeId不算进域配置 //存在隐藏的subscribeId不算进域配置
if($(".boxSolid.hidden").hasClass("subscribeId")){ if($(".boxSolid.hidden").hasClass("subscribeId")){
subscribeId=1; subscribeId=1;
} }
var boxSolidLenth=$(".boxSolid").length;
if($(".boxSolid").hasClass("subscribeId")){ if($(".boxSolid").hasClass("subscribeId")){
boxSolidLenth=boxSolidLenth-1; boxSolidLenth=boxSolidLenth-1;
} */ } */

View File

@@ -10,8 +10,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -151,7 +151,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="searchKeywords"><spring:message code="keywords"/></form:option> <form:option value="searchKeywords"><spring:message code="keywords"/></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -165,7 +165,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="p2pKeyword.cfgKeywords"><spring:message code="p2p_eMule_keywords"/></form:option> <form:option value="p2pKeyword.cfgKeywords"><spring:message code="p2p_eMule_keywords"/></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -174,7 +174,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<c:if test="${cfg.functionId eq 212}"> <c:if test="${cfg.functionId eq 212}">

View File

@@ -24,7 +24,7 @@
<option asnId="${policyGroup.asnId}" value="${policyGroup.groupName}" <c:if test="${asn==policyGroup.groupName }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option> <option asnId="${policyGroup.asnId}" value="${policyGroup.groupName}" <c:if test="${asn==policyGroup.groupName }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
</c:forEach> </c:forEach>
</select> --%> </select> --%>
<input class="form-control required invisibleChar asnMustExists" type="text" name="userRegion5" value="${_cfg.userRegion5}" ctx="${ctx}"> <input class="form-control required invisibleChar asnMustExists digits" type="text" name="userRegion5" value="${_cfg.userRegion5}" ctx="${ctx}">
<input class="form-control required invisibleChar orgMustExists hidden" type="text" name="userRegion4" value="${asn}" ctx="${ctx}"> <input class="form-control required invisibleChar orgMustExists hidden" type="text" name="userRegion4" value="${asn}" ctx="${ctx}">
</div> </div>
<div for="userRegion5"></div> <div for="userRegion5"></div>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -162,7 +162,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>

View File

@@ -10,8 +10,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -164,7 +164,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<c:if test="${cfg.functionId eq '35'}"> <c:if test="${cfg.functionId eq '35'}">
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.srcIpAddress}"){ }else if("${cfg.srcIpAddress}"){
$("#intype").val("${cfg.srcIpAddress}"); $("#intype").val("${cfg.srcIpAddress}");
}else if("${cfg.srcPort}"){ }else if("${cfg.srcPort}"){
@@ -133,7 +133,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="srcIpAddress"><spring:message code="original_dest_ip"></spring:message></form:option> <form:option value="srcIpAddress"><spring:message code="original_dest_ip"></spring:message></form:option>
<form:option value="srcPort"><spring:message code="original_dest_port"></spring:message></form:option> <form:option value="srcPort"><spring:message code="original_dest_port"></spring:message></form:option>
<%-- <form:option value="destIpAddress"><spring:message code="translated_dest_ip"></spring:message></form:option> --%> <%-- <form:option value="destIpAddress"><spring:message code="translated_dest_ip"></spring:message></form:option> --%>

View File

@@ -15,8 +15,8 @@
$("#intype").val("${cfg.userName}"); $("#intype").val("${cfg.userName}");
}else if("${cfg.srcIpAddress}"){ }else if("${cfg.srcIpAddress}"){
$("#intype").val("${cfg.srcIpAddress}"); $("#intype").val("${cfg.srcIpAddress}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -123,7 +123,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<%-- <form:option value="srcIpAddress"><spring:message code="ip"></spring:message></form:option> --%> <%-- <form:option value="srcIpAddress"><spring:message code="ip"></spring:message></form:option> --%>
<form:option value="userName"><spring:message code="user"></spring:message></form:option> <form:option value="userName"><spring:message code="user"></spring:message></form:option>
<%-- <form:option value="userType"><spring:message code="user_type"></spring:message></form:option> --%> <%-- <form:option value="userType"><spring:message code="user_type"></spring:message></form:option> --%>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -165,7 +165,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="ntcBgpAsCfg.cfgKeywords"><spring:message code="keywords"/></form:option> <form:option value="ntcBgpAsCfg.cfgKeywords"><spring:message code="keywords"/></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.strCfg.cfgKeywords}"){ }else if("${cfg.strCfg.cfgKeywords}"){
$("#intype").val("${cfg.strCfg.cfgKeywords}"); $("#intype").val("${cfg.strCfg.cfgKeywords}");
}else{ }else{
@@ -84,6 +84,11 @@
$("#serviceId").val($(this).attr("serviceId")); $("#serviceId").val($(this).attr("serviceId"));
$("#protocolId").val($(this).attr("protocolId")); $("#protocolId").val($(this).attr("protocolId"));
}); });
if($("#exportType").val() != null && $("#exportType").val() != ""){
if($("#intype").val() != null && $("#intype").val() != ""){
$("#exportValue").val($("#intype").val());
}
}
}); });
</script> </script>
@@ -122,6 +127,8 @@
<form:form id="searchForm" modelAttribute="cfg" action="${actionPath }" method="post" class="form-search"> <form:form id="searchForm" modelAttribute="cfg" action="${actionPath }" method="post" class="form-search">
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/> <input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
<input id="audit" name="audit" type="hidden" value="${audit}"/> <input id="audit" name="audit" type="hidden" value="${audit}"/>
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
<input id="exportValue" type="hidden" value=""/>
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/> <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/> <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" <sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
@@ -148,7 +155,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="strCfg.cfgKeywords"><spring:message code="keywords"></spring:message></form:option> <form:option value="strCfg.cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -358,7 +358,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="httpUrl.cfgKeywords"><spring:message code="URL"></spring:message></form:option> <form:option value="httpUrl.cfgKeywords"><spring:message code="URL"></spring:message></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -163,7 +163,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="searchKeywords"><spring:message code="keywords"></spring:message></form:option> <form:option value="searchKeywords"><spring:message code="keywords"></spring:message></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -316,7 +316,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<c:if test="${cfg.functionId eq 8}"> <c:if test="${cfg.functionId eq 8}">
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -162,7 +162,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="sslCfg.cfgKeywords"><spring:message code="keywords"></spring:message></form:option> <form:option value="sslCfg.cfgKeywords"><spring:message code="keywords"></spring:message></form:option>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.httpUrl.cfgKeywords}"){ }else if("${cfg.httpUrl.cfgKeywords}"){
$("#intype").val("${cfg.httpUrl.cfgKeywords}"); $("#intype").val("${cfg.httpUrl.cfgKeywords}");
}else{ }else{
@@ -145,7 +145,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="httpUrl.cfgKeywords"><spring:message code="URL"></spring:message></form:option> <form:option value="httpUrl.cfgKeywords"><spring:message code="URL"></spring:message></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>

View File

@@ -169,6 +169,8 @@
<input type="hidden" name="cfgId" value="${_cfg.cfgId}"> <input type="hidden" name="cfgId" value="${_cfg.cfgId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}"> <input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}"> <input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" name="isValid" value="${_cfg.isValid}">
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
<!-- <input type="hidden" name="protocol" value="0"> <!-- <input type="hidden" name="protocol" value="0">
<input type="hidden" name="direction" value="0"> --> <input type="hidden" name="direction" value="0"> -->
<input type="hidden" name="isAreaEffective" value="0" > <input type="hidden" name="isAreaEffective" value="0" >
@@ -342,9 +344,23 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="row"> <div class="row">
<div class="col-md-offset-3 col-md-8"> <div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green"> <c:set var="auditPermission" value="false"></c:set>
<spring:message code="submit" /> <!-- 拥有配置新增直接生效的功能权限 -->
</button> <shiro:hasPermission name="save:audit:permission">
<c:set var="auditPermission" value="true"></c:set>
</shiro:hasPermission>
<c:choose>
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
<button id="audit" type="submit" class="btn green">
<spring:message code="submit" />
</button>
</c:when>
<c:otherwise>
<button id="save" type="submit" class="btn green">
<spring:message code="submit" />
</button>
</c:otherwise>
</c:choose>
<button id="cancel" type="button" class="btn default"> <button id="cancel" type="button" class="btn default">
<spring:message code="cancel" /> <spring:message code="cancel" />
</button> </button>

View File

@@ -9,8 +9,8 @@
//搜索框提示语初始化 //搜索框提示语初始化
if("${cfg.cfgDesc}"){ if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileIdNew}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileIdNew}");
}else if("${cfg.ipPort.srcIpAddress}"){ }else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}"); $("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){ }else if("${cfg.ipPort.destIpAddress}"){
@@ -160,7 +160,7 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option> <%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option> <form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option> <form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>

View File

@@ -24,6 +24,24 @@
}); });
}(jQuery)); }(jQuery));
//cfgId 新增配置ID查询条件验证 1,2,3 1-3
jQuery.validator.addMethod("compileIdCheck",function(value,element){
var flagTypeSame=true;
if(this.optional(element) || /^(\d+,)*\d+$/.test(value) || /^(\d+-)?\d+$/.test(value)){
flagTypeSame=true;
if(/^(\d+-)?\d+$/.test(value)){
var strArr=value.split("-");
if(Number(strArr[0])>Number(strArr[1])){
flagTypeSame=false;
}else{
flagTypeSame=true;
}
}
}else{
flagTypeSame=false;
}
return flagTypeSame ;
},$.validator.messages.compileIdCheck);
jQuery.validator.addMethod("hexCheck", function(value, element) { jQuery.validator.addMethod("hexCheck", function(value, element) {
return this.optional(element) || /^([0-9|a-f|A-F]*)$/.test(value); return this.optional(element) || /^([0-9|a-f|A-F]*)$/.test(value);
}, $.validator.messages.hexCheck); }, $.validator.messages.hexCheck);

View File

@@ -92,6 +92,7 @@
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!", protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
log_no_data:"This hour no data", log_no_data:"This hour no data",
expireTip:"Start time and end time interval is at least 1 minute", expireTip:"Start time and end time interval is at least 1 minute",
compareTip:"Start time should not be less than the current time plus 2 minutes." compareTip:"Start time should not be less than the current time plus 2 minutes.",
compileIdCheck:"Please enter the correct query format"
}); });
}(jQuery)); }(jQuery));

View File

@@ -92,6 +92,7 @@
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!", protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
log_no_data:"Нет данных за этот час", log_no_data:"Нет данных за этот час",
expireTip:"Start time and end time interval is at least 1 minute", expireTip:"Start time and end time interval is at least 1 minute",
compareTip:"Start time should not be less than the current time plus 2 minutes." compareTip:"Start time should not be less than the current time plus 2 minutes.",
compileIdCheck:"Please enter the correct query format"
}); });
}(jQuery)); }(jQuery));

View File

@@ -92,6 +92,7 @@
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!", protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
log_no_data:"本小时无数据", log_no_data:"本小时无数据",
expireTip:"开始时间结束时间间隔至少为1分钟", expireTip:"开始时间结束时间间隔至少为1分钟",
compareTip:"开始时间不能小于当前时间加上2分钟 " compareTip:"开始时间不能小于当前时间加上2分钟 ",
compileIdCheck:"请输入正确的查询格式"
}); });
}(jQuery)); }(jQuery));

View File

@@ -739,25 +739,25 @@ window.onload=function(){
$("div[class='content content5']").find("label:lt(1)").addClass("keyword-disinline");//page.css 关键词换行 $("div[class='content content5']").find("label:lt(1)").addClass("keyword-disinline");//page.css 关键词换行
}) })
// 配置id的搜索下拉框选择切换 // 配置id的搜索下拉框选择切换
if ($("#searchForm #seltype").val() == 'compileId') { if ($("#searchForm #seltype").val() == 'compileIdNew') {
$("#searchForm #intype").addClass("number"); $("#searchForm #intype").addClass("compileIdCheck");
} else { } else {
$("#searchForm #intype").removeClass("number"); $("#searchForm #intype").removeClass("compileIdCheck");
} }
// reset时去掉number // reset时去掉number
$("#resetBtn").on("click", function() { $("#resetBtn").on("click", function() {
if ($("#searchForm #seltype").val() == 'compileId') { if ($("#searchForm #seltype").val() == 'compileIdNew') {
$("#searchForm #intype").addClass("number"); $("#searchForm #intype").addClass("compileIdCheck");
} else { } else {
$("#searchForm #intype").removeClass("number"); $("#searchForm #intype").removeClass("compileIdCheck");
} }
}); });
// 切换时为compileId加上number // 切换时为compileId加上number
$("#searchForm #seltype").on("change", function() { $("#searchForm #seltype").on("change", function() {
if ($("#searchForm #seltype").val() == 'compileId') { if ($("#searchForm #seltype").val() == 'compileIdNew') {
$("#searchForm #intype").addClass("number"); $("#searchForm #intype").addClass("compileIdCheck");
} else { } else {
$("#searchForm #intype").removeClass("number"); $("#searchForm #intype").removeClass("compileIdCheck");
} }
}); });