From 360fdd574a19fbda5ac3f53daa63ad4fefe3c905 Mon Sep 17 00:00:00 2001 From: wangxin Date: Wed, 3 Jul 2019 15:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=96=E7=95=A5=E7=BB=84=E5=8A=A0=E5=85=A5BG?= =?UTF-8?q?P=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/configuration/ObjectGroupService.java | 6 ++++++ src/main/resources/service/service_config.xml | 12 ++++++------ src/main/resources/sql/20190701/obj_protocol.sql | 3 ++- src/main/webapp/WEB-INF/views/cfg/objgroup/form.jsp | 6 +++--- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java b/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java index 915eabd18..c55e64aba 100644 --- a/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java +++ b/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java @@ -125,6 +125,12 @@ public class ObjectGroupService extends BaseService { }else if(entity.getAction().equals(16)){ entity.setServiceId(21); } + }else if("BGP".equalsIgnoreCase(protocolType)){ + if(entity.getAction().equals(1)){ + entity.setServiceId(143); + }else if(entity.getAction().equals(16)){ + entity.setServiceId(31); + } }else if(StringUtils.isBlank(protocolType)){ if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){ if(entity.getAction().equals(1)){ diff --git a/src/main/resources/service/service_config.xml b/src/main/resources/service/service_config.xml index f2df1291e..8276910e3 100644 --- a/src/main/resources/service/service_config.xml +++ b/src/main/resources/service/service_config.xml @@ -106,14 +106,14 @@ - + - + - + - + @@ -437,6 +437,6 @@ - - + + \ No newline at end of file diff --git a/src/main/resources/sql/20190701/obj_protocol.sql b/src/main/resources/sql/20190701/obj_protocol.sql index 5be23d138..dd3d1f544 100644 --- a/src/main/resources/sql/20190701/obj_protocol.sql +++ b/src/main/resources/sql/20190701/obj_protocol.sql @@ -5,4 +5,5 @@ INSERT INTO`sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `i INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'mail', 'mail', '邮件协议', 4, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL'; INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'intercept', 'intercept', 'HTTPS拦截', 3, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL'; INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'https', 'HTTPS', 'HTTPS协议', 2, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL'; -INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'http', 'HTTP', 'HTTP协议', 1, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL'; \ No newline at end of file +INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'http', 'HTTP', 'HTTP协议', 1, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL'; +INSERT INTO `sys_data_dictionary_item`(`item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) select 'bgp', 'BGP', 'BGP协议', 7, 1, 1, sn.id from `sys_data_dictionary_name` sn where sn.mark='OBJ_GROUP_PROTOCOL'; \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/objgroup/form.jsp b/src/main/webapp/WEB-INF/views/cfg/objgroup/form.jsp index 12995535e..2f42f5bee 100644 --- a/src/main/webapp/WEB-INF/views/cfg/objgroup/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/objgroup/form.jsp @@ -38,7 +38,7 @@ $(function(){ $(".domainGroup").addClass("hidden").addClass("disabled"); $(".subscribeIdGroup").removeClass("hidden").removeClass("disabled"); $(".urlGroup").removeClass("hidden").removeClass("disabled"); - }else if("${_cfg.userRegion1}"==""){ + }else if("${_cfg.userRegion1}"==""||"${_cfg.userRegion1}"=="bgp"){ $(".domainGroup").addClass("hidden").addClass("disabled"); $(".subscribeIdGroup").addClass("hidden").addClass("disabled"); $(".urlGroup").addClass("hidden").addClass("disabled"); @@ -104,7 +104,7 @@ $(function(){ $(".domainGroup").addClass("hidden").addClass("disabled"); //处理do_log $(".doLog").removeClass("hidden"); - }else if(""==$(this).val()){ + }else if(""==$(this).val()||"bgp"==$(this).val()){ $(".urlGroup").addClass("hidden").addClass("disabled"); $(".subscribeIdGroup").addClass("hidden").addClass("disabled"); $(".domainGroup").addClass("hidden").addClass("disabled"); @@ -161,7 +161,7 @@ $(function(){ top.$.jBox.tip("", ""); return; }else{ - if(($("[name='userRegion1']").val()=="http"||$("[name='userRegion1']").val()=="mail"||$("[name='userRegion1']").val()=="dns"||$("[name='userRegion1']").val()=="ftp")&&ipGroupLen>0){ + if(($("[name='userRegion1']").val()=="http"||$("[name='userRegion1']").val()=="mail"||$("[name='userRegion1']").val()=="dns"||$("[name='userRegion1']").val()=="ftp"||$("[name='userRegion1']").val()=="bgp")&&ipGroupLen>0){ if(grouplen>7){ top.$.jBox.tip("", ""); return;