diff --git a/src/main/java/com/nis/domain/configuration/template/P2pIpTemplate.java b/src/main/java/com/nis/domain/configuration/template/P2pIpTemplate.java index 06a9a390a..ae2223d4c 100644 --- a/src/main/java/com/nis/domain/configuration/template/P2pIpTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/P2pIpTemplate.java @@ -8,13 +8,13 @@ import com.nis.util.excel.ExcelField; */ public class P2pIpTemplate extends IpAllTemplate { - private String userRegion1; + private String userRegion2; @ExcelField(title="p2p_ip_config_type",dictType="P2P_IP_TYPE",align=2,sort=2) - public String getUserRegion1() { - return userRegion1; + public String getUserRegion2() { + return userRegion2; } - public void setUserRegion1(String userRegion1) { - this.userRegion1 = userRegion1; + public void setUserRegion2(String userRegion2) { + this.userRegion2 = userRegion2; } } diff --git a/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java b/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java index a7cc17803..f714c0d72 100644 --- a/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java +++ b/src/main/java/com/nis/util/excel/thread/CheckIpFormatThread.java @@ -198,11 +198,11 @@ public class CheckIpFormatThread implements Callable{ //p2p ip if (regionDict.getFunctionId().equals(510) && "p2p_ip".equals(regionDict.getConfigServiceType())) { // P2p // IP - String userRegion1 = baseIpCfg.getUserRegion1(); + String userRegion2 = baseIpCfg.getUserRegion2(); List ipTypes = DictUtils.getDictList("P2P_IP_TYPE"); boolean has = false; for (SysDataDictionaryItem type : ipTypes) { - if (type.getItemCode().equals(userRegion1)) { + if (type.getItemCode().equals(userRegion2)) { has = true; break; } 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 b99f225bc..cd2e48d35 100644 --- a/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/FileTransferCfgDao.xml @@ -24,6 +24,11 @@ + + + + + @@ -161,7 +166,8 @@ a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT, a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME, a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY, - a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.do_log + a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.do_log, + a.user_region1,a.user_region2,a.user_region3,a.user_region4,a.user_region5 a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port @@ -337,26 +343,31 @@ SELECT LAST_INSERT_ID() insert into cfg_index_info( - CFG_DESC, - ACTION, - IS_VALID, - IS_AUDIT, - CREATOR_ID, - CREATE_TIME, - EDITOR_ID, - EDIT_TIME, - AUDITOR_ID, - AUDIT_TIME, - SERVICE_ID, - REQUEST_ID, - COMPILE_ID, - IS_AREA_EFFECTIVE, - CLASSIFY, - ATTRIBUTE, - LABLE, - AREA_EFFECTIVE_IDS, - function_id, - do_log + CFG_DESC, + ACTION, + IS_VALID, + IS_AUDIT, + CREATOR_ID, + CREATE_TIME, + EDITOR_ID, + EDIT_TIME, + AUDITOR_ID, + AUDIT_TIME, + SERVICE_ID, + REQUEST_ID, + COMPILE_ID, + IS_AREA_EFFECTIVE, + CLASSIFY, + ATTRIBUTE, + LABLE, + AREA_EFFECTIVE_IDS, + function_id, + do_log, + user_region1, + user_region2, + user_region3, + user_region4, + user_region5 )values ( #{cfgDesc,jdbcType=VARCHAR}, #{action,jdbcType=INTEGER}, @@ -377,7 +388,12 @@ #{lable,jdbcType=VARCHAR}, #{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}, - #{doLog,jdbcType=INTEGER} + #{doLog,jdbcType=INTEGER}, + #{userRegion1,jdbcType=VARCHAR}, + #{userRegion2,jdbcType=VARCHAR}, + #{userRegion3,jdbcType=VARCHAR}, + #{userRegion4,jdbcType=VARCHAR}, + #{userRegion5,jdbcType=VARCHAR} ) @@ -799,13 +815,8 @@ cfg_region_code, expr_type, match_method, - is_hexbin, - user_region1, - user_region2, - user_region3, - user_region4, - user_region5 - )values ( + is_hexbin + )values ( #{cfgDesc,jdbcType=VARCHAR}, #{action,jdbcType=INTEGER}, 0, @@ -830,12 +841,7 @@ #{cfgRegionCode,jdbcType=INTEGER}, #{exprType,jdbcType=INTEGER}, #{matchMethod,jdbcType=INTEGER}, - #{isHexbin,jdbcType=INTEGER}, - #{userRegion1,jdbcType=VARCHAR}, - #{userRegion2,jdbcType=VARCHAR}, - #{userRegion3,jdbcType=VARCHAR}, - #{userRegion4,jdbcType=VARCHAR}, - #{userRegion5,jdbcType=VARCHAR} + #{isHexbin,jdbcType=INTEGER} ) 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 599961893..b8478c3ea 100644 --- a/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/FileTransferCfgService.java @@ -693,13 +693,12 @@ public class FileTransferCfgService extends CrudService dataMap=new HashMap(); List ipPortList = fileTransferCfgDao.getIpPortList(entity); for (int i = 0; i < ipPortList.size(); i++) { - ipPortList.get(i).setUserRegion1(DictUtils.getDictLabel("P2P_IP_TYPE",ipPortList.get(i).getUserRegion1())); + ipPortList.get(i).setUserRegion1(DictUtils.getDictLabel("P2P_IP_TYPE",entity.getUserRegion2())); } List hashList = fileTransferCfgDao.getP2pHashList(entity); for (int i = 0; i < hashList.size(); i++) { BaseStringCfg base =hashList.get(i); - if(!StringUtil.isEmpty(base.getUserRegion1())) - base.setUserRegion1(DictUtils.getDictLabel("P2P_HASH_TYPE",base.getUserRegion1())); + base.setUserRegion1(DictUtils.getDictLabel("P2P_HASH_TYPE",entity.getUserRegion1())); } List keywordList = fileTransferCfgDao.getP2pKeywordList(entity); List subscribeIdList = fileTransferCfgDao.getP2pSubscribeidList(entity); @@ -751,8 +750,7 @@ public class FileTransferCfgService extends CrudService0){ + userRegion += Constants.P2P_IP_TYPE_USER_REGION_KEY+"="+entity.getUserRegion2(); + } + //存在hash域 + if(entity != null && entity.getP2pHashList() != null && entity.getP2pHashList().size() >0){ + if(!StringUtil.isEmpty(userRegion) && !StringUtil.isEmpty(entity.getUserRegion1())){ + userRegion = userRegion+Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"="+entity.getUserRegion1(); + }else if(!StringUtil.isEmpty(entity.getUserRegion1())){ + userRegion += Constants.P2P_HASH_TYPE_USER_REGION_KEY+"="+entity.getUserRegion1(); + } + } + //存在IP域 + /*if(entity != null && entity.getIpPortList() != null && entity.getIpPortList().size() >0){ IpPortCfg ipport=entity.getIpPortList().get(0); ipport.setUserRegion1(StringUtil.isEmpty(ipport.getUserRegion1()) ? "":ipport.getUserRegion1()); userRegion += Constants.P2P_IP_TYPE_USER_REGION_KEY+"="+ipport.getUserRegion1(); @@ -1021,7 +1029,7 @@ public class FileTransferCfgService extends CrudService
- - +
-
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pSubList.jsp index 495f37d02..829491f4f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pSubList.jsp @@ -112,7 +112,7 @@ @@ -139,7 +139,7 @@
diff --git a/src/main/webapp/WEB-INF/views/cfg/ipCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipCfgForm.jsp index 77d0bc3b2..d6bf08376 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipCfgForm.jsp @@ -38,14 +38,14 @@
- - +
-
+