From 9b5792d74818a517d2de90eb01de5c45ab47fc34 Mon Sep 17 00:00:00 2001 From: leijun Date: Tue, 9 Apr 2019 17:30:28 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=B0=83=E6=95=B4app=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=20ratelimit=E5=88=87=E6=8D=A2=E6=97=B6subscribeid=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0disable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index 8eb03583e..c216110a8 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -22,9 +22,9 @@ $(function(){ $(".ratelimitAction").addClass("hidden"); } if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){ - $(".subscribeId").show(); + $(".subscribeId").show().removeClass("disabled"); }else{ - $(".subscribeId").hide(); + $(".subscribeId").hide().addClass("disabled"); } if($(this).val()==1){ $(".ipPortAdd").click(); @@ -44,12 +44,12 @@ $(function(){ $(".ratelimitAction").addClass("hidden"); } if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){ - $(".subscribeId").show(); + $(".subscribeId").show().removeClass("disabled"); }else{ - $(".subscribeId").hide(); + $(".subscribeId").hide().addClass("disabled"); } $("#cfgFrom").validate({ - errorPlacement: function(error,element){ + errorPlacement: function(error,element){ if($(element).parents().hasClass("tagsinput")){ $(element).parents(".col-md-6").next("div").append(error); }else{ From 7f9a1c4f70f03aeeeccc14c85b822af020035a57 Mon Sep 17 00:00:00 2001 From: leijun Date: Wed, 10 Apr 2019 18:24:10 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dftp=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=B6js=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp index 3e570b8d6..e79fe3d04 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpForm.jsp @@ -51,12 +51,12 @@ submitHandler : function(form) { var flag = true; + var boxSolidLenth=$(".boxSolid").length; /* var subscribeId=0; //存在隐藏的subscribeId,不算进域配置 if($(".boxSolid.hidden").hasClass("subscribeId")){ subscribeId=1; } - var boxSolidLenth=$(".boxSolid").length; if($(".boxSolid").hasClass("subscribeId")){ boxSolidLenth=boxSolidLenth-1; } */ From 04a94458eddc89334f317461b7138e014dbb7a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E5=86=AC=E6=A2=85?= Date: Thu, 11 Apr 2019 09:52:50 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=B6=E7=B1=BB=E5=9E=8B=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nis/persistence/interceptor/ScheduleUpdateInterceptor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java b/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java index 23e628ecd..6a1d26d67 100644 --- a/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java +++ b/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java @@ -200,6 +200,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{ sc.setCompileId(compileId); sc.setEditorId(bc.getEditorId()); sc.setEditTime(bc.getEditTime()); + sc.setType(1); sc.setCfgId(cfgId); //根据 compileId 删除之前的 MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.deleteByCompileId"); @@ -276,6 +277,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{ MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.insert"); scfg.setIsValid(isValid); scfg.setIsAudit(isAudit); + scfg.setType(1); executor.update(statement, scfg); } //手动 审核通过,立即生效时 已经下发,修改 exce_new 表的是否需要下发字段为 不需要 : 0 From fc082619292db42c5c1b332513cb0f0a7faf2572 Mon Sep 17 00:00:00 2001 From: shangguanyanfei Date: Thu, 11 Apr 2019 11:26:39 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E7=9A=84Cfg=20Id=E6=A3=80=E7=B4=A2=E6=9D=A1=E4=BB=B6=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8C=83=E5=9B=B4=E5=92=8Cin=E7=9A=84?= =?UTF-8?q?=E6=A3=80=E7=B4=A2=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/domain/configuration/BaseCfg.java | 29 +++++ .../manipulation/IpMultiplexController.java | 31 +++-- .../nis/web/dao/configuration/AppCfgDao.xml | 50 ++++++++ .../configuration/AppMultiFeatureCfgDao.xml | 10 ++ .../nis/web/dao/configuration/AvCfgDao.xml | 10 ++ .../web/dao/configuration/AvContentCfgDao.xml | 10 ++ .../nis/web/dao/configuration/BgpCfgDao.xml | 10 ++ .../web/dao/configuration/CommonPolicyDao.xml | 20 +++ .../dao/configuration/FileTransferCfgDao.xml | 30 +++++ .../nis/web/dao/configuration/IpCfgDao.xml | 10 ++ .../web/dao/configuration/IpMultiplexDao.xml | 20 +++ .../nis/web/dao/configuration/MailCfgDao.xml | 10 ++ .../web/dao/configuration/WebsiteCfgDao.xml | 10 ++ .../service/configuration/AppCfgService.java | 115 ++++++++++++++++++ .../AppMultiFeatureCfgService.java | 23 ++++ .../service/configuration/AvCfgService.java | 23 ++++ .../configuration/AvContentCfgService.java | 23 ++++ .../service/configuration/BgpCfgService.java | 23 ++++ .../configuration/CachePolicyService.java | 46 +++++++ .../service/configuration/DomainService.java | 23 ++++ .../configuration/FileTransferCfgService.java | 69 +++++++++++ .../configuration/HttpRedirectCfgService.java | 23 ++++ .../service/configuration/IpCfgService.java | 23 ++++ .../configuration/IpMultiplexService.java | 48 ++++++++ .../service/configuration/MailCfgService.java | 24 ++++ .../configuration/WebsiteCfgService.java | 24 ++++ .../views/cfg/app/appDomainCfgList.jsp | 6 +- .../WEB-INF/views/cfg/app/appIpCfgList.jsp | 6 +- .../views/cfg/app/appMultiFeatureCfgList.jsp | 6 +- .../views/cfg/app/appPolicyCfgList.jsp | 6 +- .../WEB-INF/views/cfg/app/appSslCfgList.jsp | 6 +- .../views/cfg/app/appTopicDomainCfgList.jsp | 6 +- .../views/cfg/av/contUrl/contUrlList.jsp | 6 +- .../WEB-INF/views/cfg/av/fileSampleList.jsp | 6 +- .../WEB-INF/views/cfg/av/voip/voipList.jsp | 13 +- .../WEB-INF/views/cfg/basicprotocol/list.jsp | 6 +- .../views/cfg/encryptedtunnelbehav/list.jsp | 6 +- .../views/cfg/fileTransfer/fileDigestList.jsp | 6 +- .../views/cfg/fileTransfer/ftpList.jsp | 6 +- .../views/cfg/fileTransfer/p2pList.jsp | 6 +- .../views/cfg/intercept/interceptList.jsp | 6 +- .../WEB-INF/views/cfg/ipaddr/ipList.jsp | 6 +- .../WEB-INF/views/cfg/mail/mailList.jsp | 6 +- .../ipmulitiplex/dnatPolicyList2.jsp | 6 +- .../ipmulitiplex/snatPolicyList2.jsp | 6 +- .../WEB-INF/views/cfg/other/bgpList.jsp | 6 +- .../WEB-INF/views/cfg/proxy/cache/list.jsp | 13 +- .../cfg/proxy/control/httpRedirectList.jsp | 6 +- .../WEB-INF/views/cfg/website/dnsList.jsp | 6 +- .../WEB-INF/views/cfg/website/httpList.jsp | 6 +- .../WEB-INF/views/cfg/website/sslList.jsp | 6 +- .../views/cfg/whitelist/domainList.jsp | 6 +- .../WEB-INF/views/cfg/whitelist/ipList.jsp | 6 +- .../1.11.0/jquery.validate.method.js | 10 ++ .../1.11.0/localization/messages_en.js | 3 +- .../1.11.0/localization/messages_ru.js | 3 +- .../1.11.0/localization/messages_zh.js | 3 +- .../webapp/static/global/scripts/common.js | 18 +-- 58 files changed, 844 insertions(+), 106 deletions(-) diff --git a/src/main/java/com/nis/domain/configuration/BaseCfg.java b/src/main/java/com/nis/domain/configuration/BaseCfg.java index 0cadc60ea..d1bcc50c1 100644 --- a/src/main/java/com/nis/domain/configuration/BaseCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseCfg.java @@ -61,6 +61,11 @@ public class BaseCfg extends BaseEntity implements Cloneable{ protected Integer compileIsIssued; protected String exType;//导出类型 protected String hColumns;//导出隐藏列 + + protected Integer compileIdStart;//配置ID 查询范围 开始 + protected Integer compileIdEnd;//配置ID 查询范围 结束 + protected String compileIdNew;// 查询 配置ID 范围 + protected List compileIdNewList; //查询范围(1,2,3) /** * 定时任务信息 */ @@ -108,6 +113,30 @@ public class BaseCfg extends BaseEntity implements Cloneable{ this.compileGroupMap = compileGroupMap; } + public Integer getCompileIdStart() { + return compileIdStart; + } + public void setCompileIdStart(Integer compileIdStart) { + this.compileIdStart = compileIdStart; + } + public Integer getCompileIdEnd() { + return compileIdEnd; + } + public void setCompileIdEnd(Integer compileIdEnd) { + this.compileIdEnd = compileIdEnd; + } + public String getCompileIdNew() { + return compileIdNew; + } + public void setCompileIdNew(String compileIdNew) { + this.compileIdNew = compileIdNew; + } + public List getCompileIdNewList() { + return compileIdNewList; + } + public void setCompileIdNewList(List compileIdNewList) { + this.compileIdNewList = compileIdNewList; + } /** * 编译id */ diff --git a/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java b/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java index 2ed0a247f..f1d8a4bca 100644 --- a/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java +++ b/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java @@ -484,13 +484,15 @@ public class IpMultiplexController extends CommonController { for (Integer id : set) { serviceIds.append(id+","); } - 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> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); - logTotals.addAll(logs); - } + if(serviceIds.length()>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> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); + logTotals.addAll(logs); + } + } List addrPools = ipAddrPoolCfgService.getEffectiveAddrPool(); for (IpReusePolicyCfg ipReusePolicyCfg : ipLists) { if(ipReusePolicyCfg.getAddrPoolId()!=null){ @@ -604,12 +606,15 @@ public class IpMultiplexController extends CommonController { for (Integer id : set) { serviceIds.append(id+","); } - 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> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); - logTotals.addAll(logs); + + if(serviceIds.length()>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> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); + logTotals.addAll(logs); + } } titleList.add(entity.getMenuNameCode()); classMap.put(entity.getMenuNameCode(), IpReuseDnatPolicyCfg.class); diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index 4c6fe22bd..d015b66ce 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -761,6 +761,16 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -931,6 +941,16 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + and r.COMPILE_ID in @@ -1140,6 +1160,16 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -1241,6 +1271,16 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -1539,6 +1579,16 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml index 5d77ae0f7..588a514aa 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml @@ -308,6 +308,16 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml index b3d1a0426..f0c646e21 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml @@ -164,6 +164,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml index 44d539907..58639ff18 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml @@ -352,6 +352,16 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml index 0629d63aa..da12abb00 100644 --- a/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml @@ -234,6 +234,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml index 9061abb8e..57b5ebc84 100644 --- a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml @@ -245,6 +245,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -917,6 +927,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml index 8e63f0b89..2ea68eeb1 100644 --- a/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml @@ -252,6 +252,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -696,6 +706,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -1130,6 +1150,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml index bbe4f33bd..1d9ce2fb3 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml @@ -1105,6 +1105,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml index 1b5f2b58d..554f0d4a9 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml @@ -128,6 +128,16 @@ AND r.compile_id=#{compileId,jdbcType=BIGINT} + + AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND r.COMPILE_ID in + + #{id} + + AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR} @@ -638,6 +648,16 @@ AND a.compile_id=#{compileId,jdbcType=BIGINT} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.original_dest_ip=#{srcIpAddress,jdbcType=VARCHAR} diff --git a/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml index b33ce612b..3a4c5ee94 100644 --- a/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml @@ -196,6 +196,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml index ec33f8ff0..661ac8c5b 100644 --- a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml @@ -215,6 +215,16 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} + + AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} + AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + AND a.COMPILE_ID in + + #{id} + + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index b9fbdb340..b0fe4db13 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -88,6 +88,29 @@ public class AppCfgService extends BaseService { protected AsnIpCfgDao asnIpCfgDao; public Page findAppPolicyList(Page page, AppPolicyCfg entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppPolicyList(entity); @@ -102,6 +125,29 @@ public class AppCfgService extends BaseService { public Page findAppIpList(Page page, AppIpCfg entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppIpList(entity); @@ -132,6 +178,29 @@ public class AppCfgService extends BaseService { } public Page findAppDomainList(Page page, AppDomainCfg entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppDomainList(entity); @@ -156,6 +225,29 @@ public class AppCfgService extends BaseService { // 主题网站列表 public Page findAppTopicDomainList(Page page, AppTopicDomainCfg entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppTopicDomainList(entity); @@ -180,6 +272,29 @@ public class AppCfgService extends BaseService { } public Page findAppSslList(Page page, AppSslCertCfg entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppSslList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java b/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java index 3d1694ff6..10108f547 100644 --- a/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java @@ -58,6 +58,29 @@ public class AppMultiFeatureCfgService extends BaseService { //分页查询 public Page findAppFeatureIndexList(Page page, AppFeatureIndex entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appMultiFeatureCfgDao.findAppFeatureIndexList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/AvCfgService.java b/src/main/java/com/nis/web/service/configuration/AvCfgService.java index 49994ac48..73478b3c7 100644 --- a/src/main/java/com/nis/web/service/configuration/AvCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvCfgService.java @@ -59,6 +59,29 @@ public class AvCfgService extends BaseService{ return avCfgDao.getAvSignSampleById(cfgId); } public Page getAvFileSampleList(Page page, AvFileSampleCfg entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java index 8b2ae6421..0b42c09d9 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -72,6 +72,29 @@ public class AvContentCfgService extends BaseService{ * @return */ public Page findPage(Page page, CfgIndexInfo entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r")); entity.setPage(page); List list=avContentCfgDao.findVoipList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/BgpCfgService.java b/src/main/java/com/nis/web/service/configuration/BgpCfgService.java index 954776b36..94b0699e7 100644 --- a/src/main/java/com/nis/web/service/configuration/BgpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/BgpCfgService.java @@ -64,6 +64,29 @@ public class BgpCfgService extends CrudService { return entity; } public Page getBgpList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/CachePolicyService.java b/src/main/java/com/nis/web/service/configuration/CachePolicyService.java index 77bedde08..09cbfb034 100644 --- a/src/main/java/com/nis/web/service/configuration/CachePolicyService.java +++ b/src/main/java/com/nis/web/service/configuration/CachePolicyService.java @@ -73,6 +73,29 @@ public class CachePolicyService extends CrudService } public Page getCachePolicyUserRegionList(Page page, CachePolicyUserRegion entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); List list = commonPolicyDao.getCachePolicyUserRegionList(entity); @@ -154,6 +177,29 @@ public class CachePolicyService extends CrudService } public Page getCachePolicyList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/DomainService.java b/src/main/java/com/nis/web/service/configuration/DomainService.java index 854f00f05..f65c14aa8 100644 --- a/src/main/java/com/nis/web/service/configuration/DomainService.java +++ b/src/main/java/com/nis/web/service/configuration/DomainService.java @@ -661,6 +661,29 @@ public class DomainService extends CrudService { } } public Page getDomainList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java b/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java index 6a7fcf8f9..ba0671d8b 100644 --- a/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java @@ -66,6 +66,29 @@ public class FileTransferCfgService extends CrudService getFtpList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); @@ -393,6 +416,29 @@ public class FileTransferCfgService extends CrudService getFileDigestList(Page page, FileDigestCfg entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); @@ -677,6 +723,29 @@ public class FileTransferCfgService extends CrudService getP2pList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java b/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java index f6d9d6971..55172e70c 100644 --- a/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java @@ -101,6 +101,29 @@ public class HttpRedirectCfgService extends CrudService getHttpRedirectList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/IpCfgService.java b/src/main/java/com/nis/web/service/configuration/IpCfgService.java index af1ab9204..cb3a6b16a 100644 --- a/src/main/java/com/nis/web/service/configuration/IpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpCfgService.java @@ -1001,6 +1001,29 @@ public class IpCfgService extends CrudService { return msgProp; } public Page getIpCfgList(Page page, CfgIndexInfo entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); List list = ipCfgDao.getIpCfgList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java b/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java index 548588aff..7d74d9d6b 100644 --- a/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java +++ b/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java @@ -1,5 +1,6 @@ package com.nis.web.service.configuration; +import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -23,6 +24,7 @@ import com.nis.domain.maat.ToMaatResult; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; +import com.nis.util.StringUtil; import com.nis.util.StringUtils; import com.nis.web.dao.configuration.IpMultiplexDao; import com.nis.web.security.UserUtils; @@ -37,6 +39,29 @@ public class IpMultiplexService extends BaseService{ private IpMultiplexDao ipMultiplexDao; public Page findPage(Page page, IpReusePolicyCfg entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r")); entity.setPage(page); List list=ipMultiplexDao.findPage(entity); @@ -283,6 +308,29 @@ public class IpMultiplexService extends BaseService{ } public Page findPageDnat(Page page, IpReuseDnatPolicyCfg entity) { + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); List list=ipMultiplexDao.findPageDnat(entity); diff --git a/src/main/java/com/nis/web/service/configuration/MailCfgService.java b/src/main/java/com/nis/web/service/configuration/MailCfgService.java index c3018f40a..98fb2a20f 100644 --- a/src/main/java/com/nis/web/service/configuration/MailCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/MailCfgService.java @@ -37,6 +37,7 @@ import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; import com.nis.util.FileUtils; import com.nis.util.JsonMapper; +import com.nis.util.StringUtil; import com.nis.web.dao.configuration.AreaIpCfgDao; import com.nis.web.dao.configuration.MailCfgDao; import com.nis.web.dao.configuration.StringCfgDao; @@ -59,6 +60,29 @@ public class MailCfgService extends CrudService { public Page getMailList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java index edab676ee..fa17c38c0 100644 --- a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java @@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.nis.domain.Page; +import com.nis.domain.SysUser; import com.nis.domain.configuration.AreaIpCfg; import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; @@ -165,6 +166,29 @@ public class WebsiteCfgService extends CrudService { return entity; } public Page getWebsiteList(Page page, CfgIndexInfo entity){ + //配置ID 查询条件 查询范围的处理 + String compileIdNew =entity.getCompileIdNew(); + if(!StringUtil.isEmpty(compileIdNew)){ + if(compileIdNew.indexOf("-")!=-1){//包含 + String[] split = compileIdNew.split("-"); + if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ + entity.setCompileIdStart(Integer.parseInt(split[0])); + entity.setCompileIdEnd(Integer.parseInt(split[1])); + }else{ + entity.setCompileIdStart(Integer.parseInt(split[1])); + entity.setCompileIdEnd(Integer.parseInt(split[0])); + } + }else if(compileIdNew.indexOf(",")!=-1){ + String[] split = compileIdNew.split(","); + List idList=new ArrayList(); + for (int i = 0; i < split.length; i++) { + idList.add(split[i]); + } + entity.setCompileIdNewList(idList); + }else{ + entity.setCompileId(Integer.parseInt(compileIdNew)); + } + } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp index b66cdfb08..3a9dfc592 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp @@ -12,8 +12,8 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.cfgKeywords}"){ $("#intype").val("${cfg.cfgKeywords}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -126,7 +126,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp index 3c0baf1d5..4871c31e7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp @@ -14,8 +14,8 @@ $("#intype").val("${cfg.destPort}"); } else if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - } else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + } else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); } else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -130,7 +130,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp index 764aa57ea..1d7487ed2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgList.jsp @@ -10,8 +10,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipCfg.destIpAddress}"){ $("#intype").val("${cfg.ipCfg.destIpAddress}"); }else if("${cfg.strCfg.cfgKeywords}"){ @@ -187,7 +187,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp index 18ded5bc4..82afa40e3 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp @@ -10,8 +10,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -181,7 +181,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp index a67a9ba8b..d8d4b0ac9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp @@ -12,8 +12,8 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.cfgKeywords}"){ $("#intype").val("${cfg.cfgKeywords}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -109,7 +109,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp index abf9a5123..39889ec8e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp @@ -12,8 +12,8 @@ $("#intype").val("${cfg.cfgDesc}"); }else if("${cfg.cfgKeywords}"){ $("#intype").val("${cfg.cfgKeywords}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -125,7 +125,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp index 60b883acb..d9fa60f86 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlList.jsp @@ -22,8 +22,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -178,7 +178,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp index 3e601a586..bbefac273 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp @@ -8,8 +8,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -105,7 +105,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp index c35324542..a177ab0b7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp @@ -22,8 +22,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -99,6 +99,11 @@ $("#"+openId).show(); $("#"+closeId).parent().parent().next("tr").hide(); }); + if($("#exportType").val() != null && $("#exportType").val() != ""){ + if($("#intype").val() != null && $("#intype").val() != ""){ + $("#exportValue").val($("#intype").val()); + } + } }); @@ -143,6 +148,8 @@ + + - + diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp index aaa0aafb8..7c96657be 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp @@ -10,8 +10,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -184,7 +184,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp index dbc1538aa..8302fb491 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp @@ -10,8 +10,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -181,7 +181,7 @@ - + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp index 13d5b63ac..8e693ca7e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp @@ -10,8 +10,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -176,7 +176,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp index 2f764116e..308e5d166 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp @@ -10,8 +10,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -151,7 +151,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp index 9f43c56b6..67fa60e5e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -165,7 +165,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp index 644a47fd6..1d766e257 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -174,7 +174,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp index 4ef3ad3c4..2d5ee098c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -162,7 +162,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp index 2786a4b48..bfb162e53 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -10,8 +10,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -164,7 +164,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp index 41a00dace..216e244e2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.srcIpAddress}"){ $("#intype").val("${cfg.srcIpAddress}"); }else if("${cfg.srcPort}"){ @@ -133,7 +133,7 @@ - + <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp index 7e920966d..10ef8101a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp @@ -15,8 +15,8 @@ $("#intype").val("${cfg.userName}"); }else if("${cfg.srcIpAddress}"){ $("#intype").val("${cfg.srcIpAddress}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -123,7 +123,7 @@ - + <%-- --%> <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp index c2d505eb4..b0f412d48 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -165,7 +165,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp index a3151175a..e7d4003a5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/list.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.strCfg.cfgKeywords}"){ $("#intype").val("${cfg.strCfg.cfgKeywords}"); }else{ @@ -84,6 +84,11 @@ $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); }); + if($("#exportType").val() != null && $("#exportType").val() != ""){ + if($("#intype").val() != null && $("#intype").val() != ""){ + $("#exportValue").val($("#intype").val()); + } + } }); @@ -122,6 +127,8 @@ + + - + diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp index f875bfd3c..8a45cea43 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -358,7 +358,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp index b6f689f79..7bb5e65c3 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -163,7 +163,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp index 038fe080a..0c3fd272f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -316,7 +316,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp index 1df1576c8..cd159c01b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -162,7 +162,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp index d4b36260d..c215c60b6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.httpUrl.cfgKeywords}"){ $("#intype").val("${cfg.httpUrl.cfgKeywords}"); }else{ @@ -145,7 +145,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp index b198df2e4..2f6368931 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp @@ -9,8 +9,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); - }else if("${cfg.compileId}"){ - $("#intype").val("${cfg.compileId}"); + }else if("${cfg.compileIdNew}"){ + $("#intype").val("${cfg.compileIdNew}"); }else if("${cfg.ipPort.srcIpAddress}"){ $("#intype").val("${cfg.ipPort.srcIpAddress}"); }else if("${cfg.ipPort.destIpAddress}"){ @@ -160,7 +160,7 @@ - + <%-- diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js index 908f74bb3..f3d76558a 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js @@ -24,6 +24,16 @@ }); }(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; + }else{ + flagTypeSame=false; + } + return flagTypeSame ; +},$.validator.messages.compileIdCheck); jQuery.validator.addMethod("hexCheck", function(value, element) { return this.optional(element) || /^([0-9|a-f|A-F]*)$/.test(value); }, $.validator.messages.hexCheck); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js index 10a80a420..75d4b37ff 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js @@ -92,6 +92,7 @@ protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!", log_no_data:"This hour no data", 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)); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js index 84615a9af..3353a4757 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js @@ -92,6 +92,7 @@ protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!", log_no_data:"Нет данных за этот час", 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)); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js index 981daba6e..104ce97e0 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js @@ -92,6 +92,7 @@ protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!", log_no_data:"本小时无数据", expireTip:"开始时间结束时间间隔至少为1分钟", - compareTip:"开始时间不能小于当前时间加上2分钟 " + compareTip:"开始时间不能小于当前时间加上2分钟 ", + compileIdCheck:"请输入正确的查询格式" }); }(jQuery)); diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 423ef31e4..9be15efb1 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -739,25 +739,25 @@ window.onload=function(){ $("div[class='content content5']").find("label:lt(1)").addClass("keyword-disinline");//page.css 关键词换行 }) // 配置id的搜索下拉框选择切换 - if ($("#searchForm #seltype").val() == 'compileId') { - $("#searchForm #intype").addClass("number"); + if ($("#searchForm #seltype").val() == 'compileIdNew') { + $("#searchForm #intype").addClass("compileIdCheck"); } else { - $("#searchForm #intype").removeClass("number"); + $("#searchForm #intype").removeClass("compileIdCheck"); } // reset时去掉number $("#resetBtn").on("click", function() { - if ($("#searchForm #seltype").val() == 'compileId') { - $("#searchForm #intype").addClass("number"); + if ($("#searchForm #seltype").val() == 'compileIdNew') { + $("#searchForm #intype").addClass("compileIdCheck"); } else { - $("#searchForm #intype").removeClass("number"); + $("#searchForm #intype").removeClass("compileIdCheck"); } }); // 切换时为compileId加上number $("#searchForm #seltype").on("change", function() { - if ($("#searchForm #seltype").val() == 'compileId') { - $("#searchForm #intype").addClass("number"); + if ($("#searchForm #seltype").val() == 'compileIdNew') { + $("#searchForm #intype").addClass("compileIdCheck"); } else { - $("#searchForm #intype").removeClass("number"); + $("#searchForm #intype").removeClass("compileIdCheck"); } }); From 268a0ae81bb6d16d63619586b0dfbfb3bff260a1 Mon Sep 17 00:00:00 2001 From: shangguanyanfei Date: Thu, 11 Apr 2019 17:13:44 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E7=9A=84Cfg=20Id=E6=A3=80=E7=B4=A2=E6=9D=A1=E4=BB=B6=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8C=83=E5=9B=B4=E5=92=8Cin=E7=9A=84?= =?UTF-8?q?=E6=A3=80=E7=B4=A2=E6=96=B9=E5=BC=8F=E7=9A=84=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/domain/configuration/BaseCfg.java | 24 +--- .../nis/web/dao/configuration/AppCfgDao.xml | 95 +++++++++++---- .../configuration/AppMultiFeatureCfgDao.xml | 19 ++- .../nis/web/dao/configuration/AvCfgDao.xml | 19 ++- .../web/dao/configuration/AvContentCfgDao.xml | 19 ++- .../nis/web/dao/configuration/BgpCfgDao.xml | 19 ++- .../web/dao/configuration/CommonPolicyDao.xml | 38 ++++-- .../dao/configuration/FileTransferCfgDao.xml | 57 ++++++--- .../nis/web/dao/configuration/IpCfgDao.xml | 19 ++- .../web/dao/configuration/IpMultiplexDao.xml | 38 ++++-- .../nis/web/dao/configuration/MailCfgDao.xml | 19 ++- .../web/dao/configuration/WebsiteCfgDao.xml | 19 ++- .../service/configuration/AppCfgService.java | 115 ------------------ .../AppMultiFeatureCfgService.java | 23 ---- .../service/configuration/AvCfgService.java | 23 ---- .../configuration/AvContentCfgService.java | 23 ---- .../service/configuration/BgpCfgService.java | 23 ---- .../configuration/CachePolicyService.java | 46 ------- .../service/configuration/DomainService.java | 23 ---- .../configuration/FileTransferCfgService.java | 69 ----------- .../configuration/HttpRedirectCfgService.java | 23 ---- .../service/configuration/IpCfgService.java | 23 ---- .../configuration/IpMultiplexService.java | 48 -------- .../service/configuration/MailCfgService.java | 24 ---- .../configuration/WebsiteCfgService.java | 24 ---- .../1.11.0/jquery.validate.method.js | 8 ++ 26 files changed, 276 insertions(+), 604 deletions(-) diff --git a/src/main/java/com/nis/domain/configuration/BaseCfg.java b/src/main/java/com/nis/domain/configuration/BaseCfg.java index d1bcc50c1..6ccfbba1d 100644 --- a/src/main/java/com/nis/domain/configuration/BaseCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseCfg.java @@ -62,10 +62,8 @@ public class BaseCfg extends BaseEntity implements Cloneable{ protected String exType;//导出类型 protected String hColumns;//导出隐藏列 - protected Integer compileIdStart;//配置ID 查询范围 开始 - protected Integer compileIdEnd;//配置ID 查询范围 结束 protected String compileIdNew;// 查询 配置ID 范围 - protected List compileIdNewList; //查询范围(1,2,3) + /** * 定时任务信息 */ @@ -112,31 +110,13 @@ public class BaseCfg extends BaseEntity implements Cloneable{ public void setCompileGroupMap(Map compileGroupMap) { this.compileGroupMap = compileGroupMap; } - - public Integer getCompileIdStart() { - return compileIdStart; - } - public void setCompileIdStart(Integer compileIdStart) { - this.compileIdStart = compileIdStart; - } - public Integer getCompileIdEnd() { - return compileIdEnd; - } - public void setCompileIdEnd(Integer compileIdEnd) { - this.compileIdEnd = compileIdEnd; - } public String getCompileIdNew() { return compileIdNew; } public void setCompileIdNew(String compileIdNew) { this.compileIdNew = compileIdNew; } - public List getCompileIdNewList() { - return compileIdNewList; - } - public void setCompileIdNewList(List compileIdNewList) { - this.compileIdNewList = compileIdNewList; - } + /** * 编译id */ diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index d015b66ce..3cc5bd7dc 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -761,16 +761,25 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -941,16 +950,25 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + and r.COMPILE_ID in @@ -1160,16 +1178,25 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -1271,16 +1298,25 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -1579,16 +1615,25 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml index 588a514aa..05cfddc32 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml @@ -308,16 +308,25 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml index f0c646e21..6602ceda9 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml @@ -164,16 +164,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml index 58639ff18..f6010441b 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml @@ -352,16 +352,25 @@ AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml index da12abb00..951507015 100644 --- a/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/BgpCfgDao.xml @@ -234,16 +234,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml index 57b5ebc84..9a6ede3e4 100644 --- a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml @@ -245,16 +245,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -927,16 +936,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml index 2ea68eeb1..07be2eeea 100644 --- a/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml @@ -252,16 +252,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -706,16 +715,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} @@ -1150,16 +1168,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml index 1d9ce2fb3..06db8585e 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml @@ -1105,16 +1105,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml index 554f0d4a9..7bcfbfc74 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpMultiplexDao.xml @@ -128,15 +128,24 @@ AND r.compile_id=#{compileId,jdbcType=BIGINT} - - AND r.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND r.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND r.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND r.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND r.COMPILE_ID in - + #{id} + + + AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR} @@ -648,15 +657,24 @@ AND a.compile_id=#{compileId,jdbcType=BIGINT} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} AND a.original_dest_ip=#{srcIpAddress,jdbcType=VARCHAR} diff --git a/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml index 3a4c5ee94..f51a93e48 100644 --- a/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/MailCfgDao.xml @@ -196,16 +196,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml index 661ac8c5b..91e781bbd 100644 --- a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml @@ -215,16 +215,25 @@ AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND a.COMPILE_ID >= #{compileIdStart,jdbcType=INTEGER} - AND a.COMPILE_ID <= #{compileIdEnd,jdbcType=INTEGER} + + + + AND a.COMPILE_ID >= #{item,jdbcType=INTEGER} + + + AND a.COMPILE_ID <= #{item,jdbcType=INTEGER} + + - + AND a.COMPILE_ID in - + #{id} + + AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER} + AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index b0fe4db13..b9fbdb340 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -88,29 +88,6 @@ public class AppCfgService extends BaseService { protected AsnIpCfgDao asnIpCfgDao; public Page findAppPolicyList(Page page, AppPolicyCfg entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppPolicyList(entity); @@ -125,29 +102,6 @@ public class AppCfgService extends BaseService { public Page findAppIpList(Page page, AppIpCfg entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppIpList(entity); @@ -178,29 +132,6 @@ public class AppCfgService extends BaseService { } public Page findAppDomainList(Page page, AppDomainCfg entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppDomainList(entity); @@ -225,29 +156,6 @@ public class AppCfgService extends BaseService { // 主题网站列表 public Page findAppTopicDomainList(Page page, AppTopicDomainCfg entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppTopicDomainList(entity); @@ -272,29 +180,6 @@ public class AppCfgService extends BaseService { } public Page findAppSslList(Page page, AppSslCertCfg entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appCfgDao.findAppSslList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java b/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java index 10108f547..3d1694ff6 100644 --- a/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java @@ -58,29 +58,6 @@ public class AppMultiFeatureCfgService extends BaseService { //分页查询 public Page findAppFeatureIndexList(Page page, AppFeatureIndex entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.setPage(page); List list = appMultiFeatureCfgDao.findAppFeatureIndexList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/AvCfgService.java b/src/main/java/com/nis/web/service/configuration/AvCfgService.java index 73478b3c7..49994ac48 100644 --- a/src/main/java/com/nis/web/service/configuration/AvCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvCfgService.java @@ -59,29 +59,6 @@ public class AvCfgService extends BaseService{ return avCfgDao.getAvSignSampleById(cfgId); } public Page getAvFileSampleList(Page page, AvFileSampleCfg entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java index 0b42c09d9..8b2ae6421 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -72,29 +72,6 @@ public class AvContentCfgService extends BaseService{ * @return */ public Page findPage(Page page, CfgIndexInfo entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r")); entity.setPage(page); List list=avContentCfgDao.findVoipList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/BgpCfgService.java b/src/main/java/com/nis/web/service/configuration/BgpCfgService.java index 94b0699e7..954776b36 100644 --- a/src/main/java/com/nis/web/service/configuration/BgpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/BgpCfgService.java @@ -64,29 +64,6 @@ public class BgpCfgService extends CrudService { return entity; } public Page getBgpList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/CachePolicyService.java b/src/main/java/com/nis/web/service/configuration/CachePolicyService.java index 09cbfb034..77bedde08 100644 --- a/src/main/java/com/nis/web/service/configuration/CachePolicyService.java +++ b/src/main/java/com/nis/web/service/configuration/CachePolicyService.java @@ -73,29 +73,6 @@ public class CachePolicyService extends CrudService } public Page getCachePolicyUserRegionList(Page page, CachePolicyUserRegion entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); List list = commonPolicyDao.getCachePolicyUserRegionList(entity); @@ -177,29 +154,6 @@ public class CachePolicyService extends CrudService } public Page getCachePolicyList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/DomainService.java b/src/main/java/com/nis/web/service/configuration/DomainService.java index f65c14aa8..854f00f05 100644 --- a/src/main/java/com/nis/web/service/configuration/DomainService.java +++ b/src/main/java/com/nis/web/service/configuration/DomainService.java @@ -661,29 +661,6 @@ public class DomainService extends CrudService { } } public Page getDomainList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java b/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java index ba0671d8b..6a7fcf8f9 100644 --- a/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java @@ -66,29 +66,6 @@ public class FileTransferCfgService extends CrudService getFtpList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); @@ -416,29 +393,6 @@ public class FileTransferCfgService extends CrudService getFileDigestList(Page page, FileDigestCfg entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); @@ -723,29 +677,6 @@ public class FileTransferCfgService extends CrudService getP2pList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java b/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java index 55172e70c..f6d9d6971 100644 --- a/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/HttpRedirectCfgService.java @@ -101,29 +101,6 @@ public class HttpRedirectCfgService extends CrudService getHttpRedirectList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/IpCfgService.java b/src/main/java/com/nis/web/service/configuration/IpCfgService.java index cb3a6b16a..af1ab9204 100644 --- a/src/main/java/com/nis/web/service/configuration/IpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpCfgService.java @@ -1001,29 +1001,6 @@ public class IpCfgService extends CrudService { return msgProp; } public Page getIpCfgList(Page page, CfgIndexInfo entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); List list = ipCfgDao.getIpCfgList(entity); diff --git a/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java b/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java index 7d74d9d6b..548588aff 100644 --- a/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java +++ b/src/main/java/com/nis/web/service/configuration/IpMultiplexService.java @@ -1,6 +1,5 @@ package com.nis.web.service.configuration; -import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -24,7 +23,6 @@ import com.nis.domain.maat.ToMaatResult; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; -import com.nis.util.StringUtil; import com.nis.util.StringUtils; import com.nis.web.dao.configuration.IpMultiplexDao; import com.nis.web.security.UserUtils; @@ -39,29 +37,6 @@ public class IpMultiplexService extends BaseService{ private IpMultiplexDao ipMultiplexDao; public Page findPage(Page page, IpReusePolicyCfg entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r")); entity.setPage(page); List list=ipMultiplexDao.findPage(entity); @@ -308,29 +283,6 @@ public class IpMultiplexService extends BaseService{ } public Page findPageDnat(Page page, IpReuseDnatPolicyCfg entity) { - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); List list=ipMultiplexDao.findPageDnat(entity); diff --git a/src/main/java/com/nis/web/service/configuration/MailCfgService.java b/src/main/java/com/nis/web/service/configuration/MailCfgService.java index 98fb2a20f..c3018f40a 100644 --- a/src/main/java/com/nis/web/service/configuration/MailCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/MailCfgService.java @@ -37,7 +37,6 @@ import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; import com.nis.util.FileUtils; import com.nis.util.JsonMapper; -import com.nis.util.StringUtil; import com.nis.web.dao.configuration.AreaIpCfgDao; import com.nis.web.dao.configuration.MailCfgDao; import com.nis.web.dao.configuration.StringCfgDao; @@ -60,29 +59,6 @@ public class MailCfgService extends CrudService { public Page getMailList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java index fa17c38c0..edab676ee 100644 --- a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java @@ -12,7 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.nis.domain.Page; -import com.nis.domain.SysUser; import com.nis.domain.configuration.AreaIpCfg; import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; @@ -166,29 +165,6 @@ public class WebsiteCfgService extends CrudService { return entity; } public Page getWebsiteList(Page page, CfgIndexInfo entity){ - //配置ID 查询条件 查询范围的处理 - String compileIdNew =entity.getCompileIdNew(); - if(!StringUtil.isEmpty(compileIdNew)){ - if(compileIdNew.indexOf("-")!=-1){//包含 - String[] split = compileIdNew.split("-"); - if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){ - entity.setCompileIdStart(Integer.parseInt(split[0])); - entity.setCompileIdEnd(Integer.parseInt(split[1])); - }else{ - entity.setCompileIdStart(Integer.parseInt(split[1])); - entity.setCompileIdEnd(Integer.parseInt(split[0])); - } - }else if(compileIdNew.indexOf(",")!=-1){ - String[] split = compileIdNew.split(","); - List idList=new ArrayList(); - for (int i = 0; i < split.length; i++) { - idList.add(split[i]); - } - entity.setCompileIdNewList(idList); - }else{ - entity.setCompileId(Integer.parseInt(compileIdNew)); - } - } // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js index f3d76558a..2487196bc 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js @@ -29,6 +29,14 @@ 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; } From bca7de69903612a34c843553ad0b40234bef395c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E5=86=AC=E6=A2=85?= Date: Sat, 13 Apr 2019 08:58:38 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E5=91=98=E5=AE=A1=E6=A0=B8=E5=91=98=E5=AE=A1=E8=AE=A1=E5=91=98?= =?UTF-8?q?=E4=B8=89=E7=B1=BB=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/web/service/BaseService.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/nis/web/service/BaseService.java b/src/main/java/com/nis/web/service/BaseService.java index 5a25841dd..94c06be31 100644 --- a/src/main/java/com/nis/web/service/BaseService.java +++ b/src/main/java/com/nis/web/service/BaseService.java @@ -286,15 +286,15 @@ public abstract class BaseService { scopeSql.append(" OR (" + officeAlias + ".parent_id = '" + user.getEntity().getId() + "' AND " + officeAlias + ".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 + ".creator_id <>1 "); - } else if (SysRole.DATA_SCOPE_AUDITOR.equals(dataScope)) { - scopeSql.append(" OR " + configAlias + ".is_audit = 0 or " + configAlias + ".is_audit = 1"); - scopeSql.append(" OR " + configAlias + ".creator_id <>1 "); - } else if (SysRole.DATA_SCOPE_SHOWER.equals(dataScope)) { + } else if (SysRole.DATA_SCOPE_AUDITOR.equals(dataScope)) {//审核员【未审核和审核通过状态的非管理员用户数据】 + scopeSql.append(" OR (" + configAlias + ".is_audit = 0 OR " + configAlias + ".is_audit = 1)"); + scopeSql.append(" AND " + configAlias + ".creator_id <>1 "); + } else if (SysRole.DATA_SCOPE_SHOWER.equals(dataScope)) {//审计员【审核通过状态的非管理员用户数据】 scopeSql.append(" OR " + configAlias + ".is_audit = 1"); - scopeSql.append(" OR " + configAlias + ".creator_id <>1 "); + scopeSql.append(" AND " + configAlias + ".creator_id <>1 "); } return scopeSql.toString(); @@ -2344,8 +2344,7 @@ public abstract class BaseService { try{ batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false); for(int index = 0; index < appPolicyCfgs.size();index++){ - AppPolicyCfg _cfg = new AppPolicyCfg(); - BeanUtils.copyProperties(appPolicyCfgs.get(index), _cfg); + AppPolicyCfg _cfg = appPolicyCfgs.get(index); ((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppPolicyCfgForBatch(_cfg); } From a478bee5f3f7c17e535e810b0f37d8bdd5f2a16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E5=86=AC=E6=A2=85?= Date: Sat, 13 Apr 2019 09:01:24 +0800 Subject: [PATCH 07/10] =?UTF-8?q?IP=E7=99=BD=E5=90=8D=E5=8D=95=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=B0=E5=A2=9E=E7=9B=B4=E6=8E=A5=E7=94=9F=E6=95=88?= =?UTF-8?q?(=E9=9C=80=E8=A6=81=E5=88=86=E9=85=8D=E6=9D=83=E9=99=90?= =?UTF-8?q?=EF=BC=8C=E6=AD=A4=E5=8A=9F=E8=83=BD=E6=89=8D=E5=8F=AF=E5=BC=80?= =?UTF-8?q?=E5=90=AF).=20ip=E7=99=BD=E5=90=8D=E5=8D=95=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=94=9F=E6=95=88=E7=8A=B6=E6=80=81=E4=B8=8B=E5=8F=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9(=E4=BF=AE=E6=94=B9delRow=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=89=8D=E5=8F=AF=E5=BC=80=E5=90=AF=E6=AD=A4=E5=8A=9F=E8=83=BD?= =?UTF-8?q?).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/ntc/IpController.java | 2 +- .../ntc/WhiteListController.java | 23 +++++++++++---- .../service/configuration/IpCfgService.java | 22 ++++++++++++-- .../sql/201904011/add_save_and_audit.sql | 5 ++++ src/main/resources/sql/truncate_tables.sql | 15 +++++----- .../WEB-INF/include/excel/importModal.jsp | 29 +++++++++++++++---- src/main/webapp/WEB-INF/tags/sys/delRow.tag | 1 + .../WEB-INF/views/cfg/whitelist/ipForm.jsp | 22 ++++++++++++-- 8 files changed, 94 insertions(+), 25 deletions(-) create mode 100644 src/main/resources/sql/201904011/add_save_and_audit.sql diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java index af31023be..77dd1c3f3 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java @@ -194,7 +194,7 @@ public class IpController extends BaseController{ /*if(StringUtils.isNoneBlank(entity.getUserRegion4())) { ipCfgService.auditAsnCfg(entity, isAudit); }else {*/ - ipCfgService.auditIpCfg(entity,isAudit); + ipCfgService.auditIpCfg(entity,isAudit,Constants.INSERT_ACTION); /*}*/ addMessage(redirectAttributes,"success", "audit_success"); } catch (Exception e) { diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java index fa5615f78..c0c3983b8 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java @@ -97,9 +97,24 @@ public class WhiteListController extends CommonController { } @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) { - 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(); } @@ -115,11 +130,9 @@ public class WhiteListController extends CommonController { entity = ipCfgService.getIpPortCfg(Long.parseLong(id), null); entity.setIsAudit(isAudit); entity.setIsValid(isValid); - entity.setAuditorId(UserUtils.getUser().getId()); - entity.setAuditTime(new Date()); entity.setFunctionId(functionId); try { - ipCfgService.auditIpCfg(entity, isAudit); + ipCfgService.auditIpCfg(entity, isAudit,Constants.INSERT_ACTION); addMessage(redirectAttributes, "success", "audit_success"); } catch (MaatConvertException e) { logger.info("ip配置下发失败:" + e.getMessage()); diff --git a/src/main/java/com/nis/web/service/configuration/IpCfgService.java b/src/main/java/com/nis/web/service/configuration/IpCfgService.java index af1ab9204..e8c95eb9a 100644 --- a/src/main/java/com/nis/web/service/configuration/IpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpCfgService.java @@ -115,6 +115,10 @@ public class IpCfgService extends CrudService { //设置区域运营商信息 setAreaEffectiveIds(entity); + int isValid=0; + if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) { + isValid=1; + } entity.setIsValid(0); entity.setIsAudit(0); @@ -189,6 +193,11 @@ public class IpCfgService extends CrudService { } } + if(isValid==1) { + entity.setIsAudit(1); + entity.setIsValid(1); + auditIpCfg(entity, isValid,Constants.INSERT_ACTION); + } }else{ entity.setEditTime(new Date()); entity.setEditorId(entity.getCurrentUser().getId()); @@ -262,6 +271,12 @@ public class IpCfgService extends CrudService { } } + + if(isValid==1) { + entity.setIsAudit(1); + entity.setIsValid(1); + auditIpCfg(entity, isValid,Constants.INSERT_ACTION); + } } } public void updateIpCfgValid(Integer isValid,String ids,Integer functionId){ @@ -526,12 +541,15 @@ public class IpCfgService extends CrudService { } } } - public void auditIpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{ + public void auditIpCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{ Properties props=this.getMsgProp(); //修改数据库审核状态信息 entity.setTableName(CfgIndexInfo.getTablename()); entity.setIsAudit(isAudit); + entity.setAuditorId(UserUtils.getUser().getId()); + entity.setAuditTime(new Date()); ipCfgDao.auditCfg(entity); + ToMaatBean maatBean = new ToMaatBean(); MaatCfg maatCfg = new MaatCfg(); List configCompileList = new ArrayList(); @@ -665,7 +683,7 @@ public class IpCfgService extends CrudService { maatBean.setAuditTime(entity.getAuditTime()); maatBean.setCreatorName(entity.getCurrentUser().getName()); maatBean.setVersion(Constants.MAAT_VERSION); - maatBean.setOpAction(Constants.INSERT_ACTION); + maatBean.setOpAction(opAction); //限速需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps if(entity.getAction().equals(Constants.RATELIMIT_ACTION)){ if(entity.getUserRegion1().equals("0")){//丢包率 diff --git a/src/main/resources/sql/201904011/add_save_and_audit.sql b/src/main/resources/sql/201904011/add_save_and_audit.sql new file mode 100644 index 000000000..50c9a3cd8 --- /dev/null +++ b/src/main/resources/sql/201904011/add_save_and_audit.sql @@ -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'); \ No newline at end of file diff --git a/src/main/resources/sql/truncate_tables.sql b/src/main/resources/sql/truncate_tables.sql index 5e221342f..21c1bb3a6 100644 --- a/src/main/resources/sql/truncate_tables.sql +++ b/src/main/resources/sql/truncate_tables.sql @@ -67,16 +67,13 @@ DELETE FROM ip_reuse_policy_cfg; DELETE FROM user_manage; #clear vpn DELETE FROM service_dict_info where item_type='5'; -#DNSҲҪ100ԲԷ101ʼ +#����DNS����������Ҳ��Ҫ����100�����Բ��Է��������������101��ʼ ALTER TABLE policy_group_info auto_increment = 101; -#asnŷ +#���asn�ŷ���� DELETE FROM asn_group_info; -#Ĭ϶̬IPַ +#Ĭ�϶�̬IP��ַ�� 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'; -DELETE FROM schedule_cfg; -DELETE FROM schedule_exce_log; -DELETE FROM schedule_exce_new; DELETE FROM sys_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 common_keyword_cfg; DELETE FROM pxy_obj_spoofing_ip_pool; +DELETE FROM schedule_cfg; +DELETE FROM schedule_exce_log; +DELETE FROM schedule_exce_new; - -#ʱıؽsqlڸ֮ɾؽ +#��ʱ����ı��ؽ�sql�����ڸ���֮���������������������ɾ���ؽ��� # In your Quartz properties file, you'll need to set # org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate # diff --git a/src/main/webapp/WEB-INF/include/excel/importModal.jsp b/src/main/webapp/WEB-INF/include/excel/importModal.jsp index 7de33313a..a7f64e253 100644 --- a/src/main/webapp/WEB-INF/include/excel/importModal.jsp +++ b/src/main/webapp/WEB-INF/include/excel/importModal.jsp @@ -225,12 +225,29 @@
- - + + + + + + + + + + + + + + +

diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag index 799361fa6..c211e589b 100644 --- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag +++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag @@ -116,6 +116,7 @@ function update(url){ return; } */ if($(checkboxes).filter(":checked").length==1){ + //TODO 生效配置可更改功能,在最后功能实现完成后打开【打开时确认来函和专项是否影响】 if(cked.val()==1){ top.$.jBox.tip("", ""); return; diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp index db5d7c5a3..8a75a1944 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp @@ -169,6 +169,8 @@ + + @@ -342,9 +344,23 @@
- + + + + + + + + + + + + + From 1f93d4f3b05d8b398827b3a2b26cc4bc808e677b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E5=86=AC=E6=A2=85?= Date: Fri, 12 Apr 2019 11:38:35 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E5=8F=91opCti?= =?UTF-8?q?on=E4=BF=AE=E6=94=B9=E4=B8=BAUPDATE=5FACTION?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/web/service/configuration/IpCfgService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/nis/web/service/configuration/IpCfgService.java b/src/main/java/com/nis/web/service/configuration/IpCfgService.java index e8c95eb9a..e23d84d49 100644 --- a/src/main/java/com/nis/web/service/configuration/IpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpCfgService.java @@ -275,7 +275,7 @@ public class IpCfgService extends CrudService { if(isValid==1) { entity.setIsAudit(1); entity.setIsValid(1); - auditIpCfg(entity, isValid,Constants.INSERT_ACTION); + auditIpCfg(entity, isValid,Constants.UPDATE_ACTION); } } } From 47029f0eaf250549d6235c90077dc070621fddb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E5=86=AC=E6=A2=85?= Date: Fri, 12 Apr 2019 15:52:13 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=85=A8=E9=87=8F=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E7=9A=84app=E7=AD=96=E7=95=A5=E5=92=8Capp=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=9A=84=E5=AD=90=E5=9F=9F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=BA=E4=BF=AE=E6=94=B9BUG=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=EF=BC=9B=20asn=20no=E5=A2=9E=E5=8A=A0digits=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/configuration/ConfigSynchronizationService.java | 4 ++-- src/main/webapp/WEB-INF/views/basics/asnGroupForm.jsp | 2 +- src/main/webapp/WEB-INF/views/cfg/ipaddr/asnForm.jsp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/nis/web/service/configuration/ConfigSynchronizationService.java b/src/main/java/com/nis/web/service/configuration/ConfigSynchronizationService.java index 62c02b554..86fde4c2f 100644 --- a/src/main/java/com/nis/web/service/configuration/ConfigSynchronizationService.java +++ b/src/main/java/com/nis/web/service/configuration/ConfigSynchronizationService.java @@ -720,7 +720,7 @@ public class ConfigSynchronizationService extends BaseService{ } if(isUpdateCfg) { 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(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) { - commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null); + commonPolicyDao.auditCfgBatch( tableName, entity,compileIds,null); } } } diff --git a/src/main/webapp/WEB-INF/views/basics/asnGroupForm.jsp b/src/main/webapp/WEB-INF/views/basics/asnGroupForm.jsp index add96f316..796103dc1 100644 --- a/src/main/webapp/WEB-INF/views/basics/asnGroupForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/asnGroupForm.jsp @@ -80,7 +80,7 @@ $(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/asnForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/asnForm.jsp index b68de47c5..182f8f97a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/asnForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/asnForm.jsp @@ -24,7 +24,7 @@ --%> - +
From 84f5646f8670c110b890ed162b7fbf990a266d9d Mon Sep 17 00:00:00 2001 From: zhangwenqing Date: Fri, 12 Apr 2019 19:10:21 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=AE=A1=E6=A0=B8=E4=B8=8D=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=92=8C=E5=88=A0=E9=99=A4=E6=93=8D=E4=BD=9C=20=E9=99=A4?= =?UTF-8?q?=E9=AB=98=E7=BA=A7=E5=8A=9F=E8=83=BD=E8=8F=9C=E5=8D=95=E4=B8=8B?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScheduleUpdateInterceptor.java | 1 + .../nis/web/controller/BaseController.java | 259 ++++++++++++++++-- .../configuration/AppCfgController.java | 23 +- .../BasicProtocolController.java | 15 +- .../EncryptedTunnelBehaviorController.java | 14 +- .../manipulation/DdosCfgController.java | 22 +- .../ntc/AvContentController.java | 39 ++- .../configuration/ntc/AvController.java | 24 +- .../configuration/ntc/BgpCfgController.java | 23 +- .../ntc/FileTransferCfgController.java | 62 +++-- .../configuration/ntc/IpController.java | 23 +- .../configuration/ntc/MailCfgController.java | 22 +- .../configuration/ntc/WebsiteController.java | 66 ++++- .../ntc/WhiteListController.java | 46 +++- .../proxy/CachePolicyController.java | 22 +- .../proxy/HttpRedirectPolicyController.java | 22 +- .../proxy/InterceptController.java | 13 +- .../dao/configuration/CommonPolicyDao.java | 4 + .../web/dao/configuration/CommonPolicyDao.xml | 12 + .../configuration/CommonPolicyService.java | 103 +++++++ .../resources/messages/message_en.properties | 4 +- .../messages/message_zh_CN.properties | 4 +- src/main/webapp/WEB-INF/tags/sys/delRow.tag | 241 ++++++++-------- 23 files changed, 832 insertions(+), 232 deletions(-) diff --git a/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java b/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java index 6a1d26d67..5557609bd 100644 --- a/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java +++ b/src/main/java/com/nis/persistence/interceptor/ScheduleUpdateInterceptor.java @@ -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.configuration.PxyObjKeyringDao.updatePxyObjTrustedCaCrl"); EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.CommonPolicyDao.auditCfgBatch"); + EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.CommonPolicyDao.deleteCfgBatch"); } /** * is_valid 字段名 diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index c3f22d280..59331ae96 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -131,6 +131,7 @@ import com.nis.util.Constants; import com.nis.util.DateUtils; import com.nis.util.DictUtils; import com.nis.util.JsonMapper; +import com.nis.util.Reflections; import com.nis.util.ServiceConfigTemplateUtil; import com.nis.util.StringUtil; import com.nis.util.excel.ExcelCsv; @@ -2816,10 +2817,10 @@ public class BaseController { BeanUtils.copyProperties(entity, searchAsnIpCfg); } + auditType = (Integer)Reflections.invokeGetter(entity, "isAudit"); - - //全部审核通过,只查询当前条件下的所有未审核的配置 - if(auditType.equals(1)) { + //全部审核通过,只查询当前条件下的所有未审核的配置 -批量审核通过/不通过 + if(auditType.equals(1) || auditType.equals(2)) { searchCfg.setIsValid(0); searchCfg.setIsAudit(0); searchAppCfg.setIsValid(0); @@ -2859,8 +2860,13 @@ public class BaseController { searchAsnIpCfg.setIsValid(0); searchAsnIpCfg.setIsAudit(0); - auditBatchCfg.setIsAudit(1); - auditBatchCfg.setIsValid(1); + if(auditType.equals(1)) { + auditBatchCfg.setIsAudit(1); + auditBatchCfg.setIsValid(1); + }else { + auditBatchCfg.setIsAudit(2); + auditBatchCfg.setIsValid(0); + } auditBatchCfg.setAuditTime(new Date()); auditBatchCfg.setAuditorId(UserUtils.getUser().getId()); }else { @@ -2916,12 +2922,11 @@ public class BaseController { functionId=auditBatchCfg.getFunctionId(); } List> serviceList = serviceTemplate.getServiceListByFunctionId(functionId); - for(Map service:serviceList){ - String tableNameXml = service.get("tableName").toString(); - String serviceTypeXml = service.get("serviceType").toString(); - String classNameXml = service.get("className").toString(); - String serviceIdXml = service.get("id").toString(); + 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字段 auditBatchCfg.setServiceId(Integer.valueOf(serviceIdXml)); auditBatchCfg.setTableName(tableNameXml); searchCfg.setServiceId(Integer.valueOf(serviceIdXml)); @@ -2962,6 +2967,7 @@ public class BaseController { searchAppSslCertCfg.setTableName(tableNameXml); if("1".equals(serviceTypeXml)){//maat类配置 + // 存放域配置类型 及 对应表名 List> cfgList = (List>) service.get("cfgList"); List> userRegionList = (List>) service.get("userRegionList"); if(!StringUtil.isEmpty(cfgList)) { @@ -2971,21 +2977,25 @@ public class BaseController { while(hasData){ page.setPageNo(1); page.setLastPage(false); - List list=getDataList(page,searchCfg,null,null,null); + List list = getDataList(page,searchCfg,null,null,null); // 通过ServiceId获取cfg_index_info主配置表数据 if(!StringUtil.isEmpty(list)){ //配置生效处理 复用全量下发 - if(auditBatchCfg.getIsValid().equals(1)) { - hasData=configSynchronizationService.auditNtcMaatData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true); - }else {//配置失效处理 批量处理 - List cfgIndexList=new ArrayList<>(); + if(auditBatchCfg.getIsAudit().equals(1)) { + hasData = configSynchronizationService.auditNtcMaatData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true); + }else { + List BaseCfgList=new ArrayList<>(); if(!StringUtil.isEmpty(list)) { for (CfgIndexInfo cfg : list) { BaseCfg baseCfg=new 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{ hasData = false; @@ -3001,9 +3011,9 @@ public class BaseController { List list=getDataList(page,null,null,searchDigestCfg,null); if(!StringUtil.isEmpty(list)){ //配置生效处理 复用全量下发 - if(auditBatchCfg.getIsValid().equals(1)) { + if(auditBatchCfg.getIsAudit().equals(1)) { hasData=configSynchronizationService.auditFileDigestData(cfgList, userRegionList, page, auditBatchCfg, list, hasData, true); - }else {//配置失效处理 批量处理 + }else { List baseCfgList=new ArrayList<>(); if(!StringUtil.isEmpty(list)) { for (FileDigestCfg cfg : list) { @@ -3012,7 +3022,11 @@ public class BaseController { 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{ hasData = false; @@ -3027,9 +3041,9 @@ public class BaseController { List list=getDataList(page,null,searchAppCfg,null,null); if(!StringUtil.isEmpty(list)){ //配置生效处理 复用全量下发 - if(auditBatchCfg.getIsValid().equals(1)) { + if(auditBatchCfg.getIsAudit().equals(1)) { hasData=configSynchronizationService.auditAppPolicyData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true); - }else {//配置失效处理 批量处理 + }else { List cfgAppList=new ArrayList<>(); if(!StringUtil.isEmpty(list)) { for (AppPolicyCfg cfg : list) { @@ -3038,7 +3052,11 @@ public class BaseController { 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{ hasData = false; @@ -3054,9 +3072,9 @@ public class BaseController { List list=getDataList(page,null,null,null,searchAppFeatureIndex); if(!StringUtil.isEmpty(list)){ //配置生效处理 复用全量下发 - if(auditBatchCfg.getIsValid().equals(1)) { + if(auditBatchCfg.getIsAudit().equals(1)) { hasData=configSynchronizationService.auditAppFeatureData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true); - }else {//配置失效处理 批量处理 + }else { List cfgFeatrureList=new ArrayList<>(); if(!StringUtil.isEmpty(list)) { for (AppFeatureIndex cfg : list) { @@ -3065,7 +3083,11 @@ public class BaseController { 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{ hasData = false; @@ -3085,7 +3107,8 @@ public class BaseController { List list=ddosCfgService.findPage(page, searchDdosIpCfg).getList(); if(!StringUtil.isEmpty(list)){ - if(auditBatchCfg.getIsValid().equals(1)) { + // 配置生效处理 + if(auditBatchCfg.getIsAudit().equals(1)) { hasData=configSynchronizationService.auditDdosMaatData(cfgList,userRegionList, page,auditBatchCfg,list,hasData,true); }else { @@ -3096,7 +3119,11 @@ public class BaseController { 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) { page.setPageNo(1); @@ -3324,7 +3351,181 @@ public class BaseController { 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> serviceList = serviceTemplate.getServiceListByFunctionId(functionId); + for(Map 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> cfgList = (List>) 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 list = getDataList(page,searchCfg,null,null,null); // 通过serviceId获取主配置表数据 + if(!StringUtil.isEmpty(list)){ + List 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 list = getDataList(page,null,null,searchDigestCfg,null); // 通过serviceId获取主配置表数据 + if(!StringUtil.isEmpty(list)){ + List 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 list = getDataList(page,null,searchAppCfg,null,null); // 通过serviceId获取主配置表数据 + if(!StringUtil.isEmpty(list)){ + List 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 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 list=ddosCfgService.findPage(page, searchDdosIpCfg).getList(); + if(!StringUtil.isEmpty(list)){ + List 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 ,CfgIndexInfo searchCfg diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index aaf5f874c..753e83022 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -41,6 +41,7 @@ import com.nis.domain.configuration.AppSslCertCfg; import com.nis.domain.configuration.AppTcpCfg; import com.nis.domain.configuration.AppTopicDomainCfg; import com.nis.domain.configuration.BaseStringCfg; +import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.configuration.WebsiteDomainTopic; @@ -305,8 +306,26 @@ public class AppCfgController extends BaseController { */ @RequestMapping(value = { "updateAppPolicyCfgValid" }) @RequiresPermissions(value = { "app:policy:config" }) - public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId) { - appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); + public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java b/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java index 7c42deb20..4f82aabc7 100644 --- a/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java +++ b/src/main/java/com/nis/web/controller/configuration/BasicProtocolController.java @@ -251,20 +251,23 @@ public class BasicProtocolController extends BaseController { */ @RequestMapping(value = { "updateValid" }) @RequiresPermissions(value = { "basicprotocol:config" }) - public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { + public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) { try { - appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); - addMessage(redirectAttributes, "success", "delete_success"); + if(!StringUtil.isEmpty(ids)) { + appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + Page searchPage = new Page(request, response, "a"); + deleteAll(searchPage, functionId, cfg); + } } catch (Exception e) { logger.error("基础协议信息保存失败", e); if (e instanceof MaatConvertException) { - e.printStackTrace(); addMessage(redirectAttributes, "error", "request_service_failed"); } else if (e instanceof CallExternalProceduresException) { addMessage(redirectAttributes, "error", "call_external_procedures_failed"); } else { - e.printStackTrace(); addMessage(redirectAttributes, "error", "delete_failed"); } } diff --git a/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java b/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java index 8c2666dfa..f685b7bd9 100644 --- a/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java +++ b/src/main/java/com/nis/web/controller/configuration/EncryptedTunnelBehaviorController.java @@ -26,6 +26,7 @@ import com.nis.domain.Page; import com.nis.domain.SysDataDictionaryItem; import com.nis.domain.configuration.AppPolicyCfg; import com.nis.domain.configuration.BaseStringCfg; +import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.specific.SpecificServiceCfg; @@ -270,10 +271,17 @@ public class EncryptedTunnelBehaviorController extends BaseController { */ @RequestMapping(value = { "updateValid" }) @RequiresPermissions(value = { "encryptedtunnelbehav:config" }) - public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { + public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) { try { - appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); + if (!StringUtil.isEmpty(ids)) { + appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(request, response, "a"); + deleteAll(searchPage, functionId, cfg); + } } catch (Exception e) { logger.error("加密隧道协议保存失败", e); if (e instanceof MaatConvertException) { diff --git a/src/main/java/com/nis/web/controller/configuration/manipulation/DdosCfgController.java b/src/main/java/com/nis/web/controller/configuration/manipulation/DdosCfgController.java index 73df9f61b..bc7e32882 100644 --- a/src/main/java/com/nis/web/controller/configuration/manipulation/DdosCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/manipulation/DdosCfgController.java @@ -87,8 +87,26 @@ public class DdosCfgController extends BaseController { @RequestMapping(value = { "/delete" }) @RequiresPermissions(value = { "ddos:ip:config" }) - public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) { - ddosCfgService.delete(isAudit, isValid, ids, functionId); + public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")DdosIpCfg cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + ddosCfgService.delete(isAudit, isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java index 66f128f2c..c340533e9 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java @@ -152,18 +152,22 @@ public class AvContentController extends BaseController { // 修改VOIP IP配置状态 @RequestMapping(value = { "/updateAvVoipValid" }) @RequiresPermissions(value = { "avVoip:config" }) - public String updateVoipValid(Integer isAudit, String compileIds, Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { + public String updateVoipValid(Integer isAudit, String compileIds, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { try { - avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId); - addMessage(redirectAttributes, "success", "delete_success"); + if (!StringUtil.isEmpty(ids)) { + avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(request, response, "a"); + deleteAll(searchPage, functionId, cfg); + } } catch (Exception e) { if (e instanceof MaatConvertException) { - e.printStackTrace(); logger.error("voip 信息审核失败", e); addMessage(redirectAttributes, "error", "request_service_failed"); } else { - e.printStackTrace(); logger.error("voip 信息审核失败", e); addMessage(redirectAttributes, "error", "delete_failed"); } @@ -627,9 +631,26 @@ public class AvContentController extends BaseController { // 修改CONTUrl例配置状态 @RequestMapping(value = { "/updateAvContUrlValid" }) @RequiresPermissions(value = { "avContUrl:config" }) - public String updateAvContUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { - avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId); + public String updateAvContUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java index c353daa68..9f8e57610 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java @@ -350,10 +350,26 @@ public class AvController extends BaseController { // 修改文件样例配置状态 @RequestMapping(value = { "/sample/updateAvFileSampleValid" }) - public String updateAvFileSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { - avCfgService.updateAvFileSampleValid(isAudit, isValid, ids); - addMessage(redirectAttributes, "success", "delete_success"); + public String updateAvFileSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AvFileSampleCfg cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + avCfgService.updateAvFileSampleValid(isAudit, isValid, ids); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java index 1f8bc8129..e3ea79869 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/BgpCfgController.java @@ -122,9 +122,26 @@ public class BgpCfgController extends BaseController { @RequestMapping(value = { "updateBgpCfgValid" }) @RequiresPermissions(value = { "other:bgp:config" }) - public String updateBgpCfgValid(Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { - bgpCfgService.updateBgpCfgValid(isValid, ids, functionId); + public String updateBgpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + bgpCfgService.updateBgpCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java index 36311bd3e..89c9dab21 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java @@ -150,19 +150,22 @@ public class FileTransferCfgController extends BaseController { */ @RequestMapping(value = { "updateFtpCfgValid" }) @RequiresPermissions(value = { "fileTransfer:ftp:config" }) - public String updateFtpCfgValid(Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { + public String updateFtpCfgValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { try { - fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId); - addMessage(redirectAttributes, "success", "delete_success"); + if(!StringUtil.isEmpty(ids)) { + fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(request, response, "a"); + deleteAll(searchPage, functionId, cfg); + } } catch (Exception e) { if (e instanceof MaatConvertException) { - e.printStackTrace(); - logger.info("ftp配置删除失败:" + e.getMessage()); - ; + logger.error("ftp配置删除失败:" + e.getMessage()); addMessage(redirectAttributes, "error", "request_service_failed"); } else { - e.printStackTrace(); logger.error("ftp配置删除失败", e); addMessage(redirectAttributes, "error", "delete_failed"); } @@ -303,9 +306,27 @@ public class FileTransferCfgController extends BaseController { @RequestMapping(value = { "updateFileDigestValid" }) @RequiresPermissions(value = { "fileTransfer:fileDigest:config" }) - public String updateFileDigestValid(Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { - fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId); + public String updateFileDigestValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")FileDigestCfg cfg) { + try { + if(!StringUtil.isEmpty(ids)) { + fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } @@ -483,19 +504,22 @@ public class FileTransferCfgController extends BaseController { @RequestMapping(value = { "updateP2pCfgValid" }) @RequiresPermissions(value = { "fileTransfer:p2p:config" }) - public String updateP2pCfgValid(Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { + public String updateP2pCfgValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { try { - fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId); - addMessage(redirectAttributes, "success", "delete_success"); + if(!StringUtil.isEmpty(ids)) { + fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(request, response, "a"); + deleteAll(searchPage, functionId, cfg); + } } catch (Exception e) { if (e instanceof MaatConvertException) { - e.printStackTrace(); - logger.info("P2P配置删除失败:" + e.getMessage()); - ; + logger.error("P2P配置删除失败:" + e.getMessage()); addMessage(redirectAttributes, "error", "request_service_failed"); } else { - e.printStackTrace(); logger.error("P2P配置删除失败", e); addMessage(redirectAttributes, "error", "delete_failed"); } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java index 77dd1c3f3..013b4a229 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java @@ -151,8 +151,27 @@ public class IpController extends BaseController{ } @RequestMapping(value = {"updateValid"}) @RequiresPermissions("iplist:config") - public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId) { - ipCfgService.updateIpCfgValid(isValid, ids, functionId); + public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + ipCfgService.updateIpCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } /** diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java index 1cfd0cb4a..fccecfab7 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java @@ -170,8 +170,26 @@ public class MailCfgController extends BaseController { @RequestMapping(value = { "updateMailCfgValid" }) @RequiresPermissions(value = { "mail:config" }) - public String updateMailCfgValid(Integer isValid, String ids, Integer functionId) { - mailCfgService.updateMailCfgValid(isValid, ids, functionId); + public String updateMailCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + mailCfgService.updateMailCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java index fa02a7b73..e359c93d2 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java @@ -208,8 +208,26 @@ public class WebsiteController extends BaseController { @RequestMapping(value = { "updateHttpCfgValid" }) @RequiresPermissions(value = { "website:http:config" }) - public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId) { - websiteCfgService.updateHttpCfgValid(isValid, ids, functionId); + public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + websiteCfgService.updateHttpCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } @@ -338,8 +356,26 @@ public class WebsiteController extends BaseController { @RequestMapping(value = { "updateSslCfgValid" }) @RequiresPermissions(value = { "website:ssl:config" }) - public String updateSslCfgValid(Integer isValid, String ids, Integer functionId) { - websiteCfgService.updateSslCfgValid(isValid, ids, functionId); + public String updateSslCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + websiteCfgService.updateSslCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } @@ -460,8 +496,26 @@ public class WebsiteController extends BaseController { @RequestMapping(value = { "updateDnsCfgValid" }) @RequiresPermissions(value = { "website:dns:config" }) - public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId) { - websiteCfgService.updateDnsCfgValid(isValid, ids, functionId); + public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + websiteCfgService.updateDnsCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java index c0c3983b8..0d36ba667 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java @@ -167,8 +167,28 @@ public class WhiteListController extends CommonController { @RequestMapping(value = { "updateIpValid" }) @RequiresPermissions(value = { "whitelist:ip:config" }) - public String updateIpCfgValid(Integer isValid, String ids, Integer functionId) { - ipCfgService.updateIpCfgValid(isValid, ids, functionId); + public String updateIpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + ipCfgService.updateIpCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } @@ -265,8 +285,26 @@ public class WhiteListController extends CommonController { @RequestMapping(value = { "domain/updateValid" }) @RequiresPermissions(value = { "whitelist:domain:config" }) - public String updateDomainValid(Integer isValid, String ids, Integer functionId) { - domainService.updateDomainCfgValid(isValid, ids, functionId); + public String updateDomainValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + domainService.updateDomainCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/CachePolicyController.java b/src/main/java/com/nis/web/controller/configuration/proxy/CachePolicyController.java index 87996d638..d77fec15f 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/CachePolicyController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/CachePolicyController.java @@ -157,8 +157,26 @@ public class CachePolicyController extends BaseController{ } @RequestMapping(value = {"delete"}) @RequiresPermissions(value={"cache:policy:config"}) - public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId){ - cachePolicyService.updateCachePolicyValid(isValid,ids,functionId); + public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg){ + try { + if (!StringUtil.isEmpty(ids)) { + cachePolicyService.updateCachePolicyValid(isValid,ids,functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } @RequestMapping(value = {"audit"}) diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java b/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java index 0f9630db6..98b037aa4 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/HttpRedirectPolicyController.java @@ -215,8 +215,26 @@ public class HttpRedirectPolicyController extends BaseController { @RequiresPermissions(value = { "control:httpBlock:config", "control:httpRedirect:config", "control:httpReplace:config", "control:httpMinit:config", "control:httpWhitelist:config" }, logical = Logical.OR) - public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) { - httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId); + public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { + try { + if (!StringUtil.isEmpty(ids)) { + httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + // 批量删除 + Page searchPage = new Page(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; } diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java index 820f03c81..46df8bd1f 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java @@ -209,11 +209,16 @@ public class InterceptController extends CommonController { } @RequestMapping(value = { "updateInterceptIpValid", "updateInterceptDomainValid", "updateInterceptIpPayloadValid" }) - public String updateInterceptIpValid(Integer isValid, String ids, Integer functionId, - RedirectAttributes redirectAttributes) { + public String updateInterceptIpValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes, + HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) { try { - interceptCfgService.updatInterceptValid(isValid, ids, functionId); - addMessage(redirectAttributes, "success", "delete_success"); + if(!StringUtil.isEmpty(ids)) { + interceptCfgService.updatInterceptValid(isValid, ids, functionId); + addMessage(redirectAttributes, "success", "delete_success"); + }else { + Page searchPage = new Page(request, response, "a"); + deleteAll(searchPage, functionId, cfg); + } } catch (Exception e) { logger.error("intercept ip delete failed", e); addMessage(redirectAttributes, "error", "delete_failed"); diff --git a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.java b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.java index 72e786fdf..f44ef07ea 100644 --- a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.java +++ b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.java @@ -41,4 +41,8 @@ public interface CommonPolicyDao { public List getCachePolicyUserRegionList(CachePolicyUserRegion entity); public List getCachePolicyByUserRegionList(@Param("ids")String ids); + + public void deleteCfgBatch(@Param("tableName")String tableName, + @Param("entity")BaseCfg entity, + @Param("compileIds")List compileIds); } diff --git a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml index 9a6ede3e4..aa444f749 100644 --- a/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/CommonPolicyDao.xml @@ -1013,5 +1013,17 @@ where a.CFG_ID in (${ids}) + + UPDATE ${tableName} + SET is_valid =-1,is_audit=0, + editor_id = #{entity.editorId,jdbcType=INTEGER}, + edit_time = #{entity.editTime,jdbcType=TIMESTAMP} + + AND compile_id IN + + #{compileId} + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/configuration/CommonPolicyService.java b/src/main/java/com/nis/web/service/configuration/CommonPolicyService.java index 999f7ef71..676b08bb1 100644 --- a/src/main/java/com/nis/web/service/configuration/CommonPolicyService.java +++ b/src/main/java/com/nis/web/service/configuration/CommonPolicyService.java @@ -306,4 +306,107 @@ public class CommonPolicyService extends CrudService> cfgList, Page page, BaseCfg entity, + List list, boolean hasData) { + + // 1.获取所有配置的编译ID + List 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 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 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> cfgList, Page page, BaseCfg entity, + List list, boolean hasData) { + // 1.获取所有配置的编译ID + List 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 m : cfgList){ + String tableName = m.get("tableName").toString(); + commonPolicyDao.deleteCfgBatch(tableName, entity, compileIds); + } + } + + // 4.判断是否是当前检索条件下最后一页数据 并返回结果 + page.setList(list); + if(page.isLastPage()){ + hasData = false; + } + return hasData; + } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 611155593..e14efc923 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1506,4 +1506,6 @@ protection_list_manage=Protection List Manage effective=Effective admin_user_warn=Admin User Warn interface_total=Interface Total -service_total=Service Total \ No newline at end of file +service_total=Service Total +unapproved_all=UnApprove all configurations! +delete_all=Delete all configurations! \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 6d6ba3e84..9c4775f86 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1504,4 +1504,6 @@ protection_list_manage=\u5185\u7f6e\u4fdd\u62a4\u540d\u5355\u7ba1\u7406 effective=\u6709\u6548 admin_user_warn=\u7ba1\u7406\u5458\u7528\u6237\u9884\u8b66 interface_total=\u754c\u9762\u603b\u91cf -service_total=\u670d\u52a1\u603b\u91cf \ No newline at end of file +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! \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag index c211e589b..7a1d5f09f 100644 --- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag +++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag @@ -62,6 +62,69 @@ $(document).ready(function() { $('#${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){ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox"); @@ -101,8 +164,18 @@ function del(url){ } } }else{ - top.$.jBox.tip("", ""); - return; + url = url+"&" + if(isBatch(url)) { + top.$.jBox.confirm("","",function(v,h,f){ + if(v=="ok"){ + $("#searchForm").attr("action",url); + page(); + } + }); + }else{ + top.$.jBox.tip("", ""); + return; + } } } //修改配置 @@ -155,89 +228,48 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox"); doAll(checkboxes,url); } }else{ - url=url+"&" - //配置批量下发 - 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 - ){ - top.$.jBox.confirm("","",function(v,h,f){ - if(v=="ok"){ - $("#searchForm").attr("action",url); - page(); - } - }); - }else{ - top.$.jBox.tip("", ""); - return; - } + url = url+"&" + //配置批量下发 + if(isBatch(url)){ + top.$.jBox.confirm("","",function(v,h,f){ + if(v=="ok"){ + $("#searchForm").attr("action",url); + page(); + } + }); + }else{ + top.$.jBox.tip("", ""); + return; + } } } //未通过 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(validateAllNoAudit(checkboxes)){ top.$.jBox.tip("", ""); return; - }else{ - doAll(checkboxes,url); - } - }else{ - top.$.jBox.tip("", ""); - return; + }else{ + doAll(checkboxes,url); } + + }else{ + url = url+"&" + //配置批量审核(未通过) + if(isBatch(url)){ + top.$.jBox.confirm("","",function(v,h,f){ + if(v=="ok"){ + $("#searchForm").attr("action",url); + page(); + } + }); + }else{ + top.$.jBox.tip("", ""); + return; + } + } } //配置取消 function cancelPassOpt(url){ @@ -302,69 +334,16 @@ function cancelPassOpt(url){ } }else{ - url=url+"&" + url = url+"&" //配置批量取消 - 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 - ){ + if(isBatch(url)){ top.$.jBox.confirm("","",function(v,h,f){ if(v=="ok"){ $("#searchForm").attr("action",url); page(); } }); - }else{ + }else{ top.$.jBox.tip("", ""); return; }