diff --git a/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java b/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java index 634b736c5..a1b63b558 100644 --- a/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java +++ b/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java @@ -29,7 +29,7 @@ public class AppFeatureIndex extends BaseCfg { private static final long serialVersionUID = -8069201965300255275L; private static final String tableName="app_feature_index"; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code - @ExcelField(title="social_app",sort=2) + @ExcelField(title="social_app",sort=3) private String appName; private Integer specServiceId; private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code diff --git a/src/main/java/com/nis/domain/configuration/AppStringFeatureCfg.java b/src/main/java/com/nis/domain/configuration/AppStringFeatureCfg.java index 8cf3044ea..3a7943d1f 100644 --- a/src/main/java/com/nis/domain/configuration/AppStringFeatureCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppStringFeatureCfg.java @@ -26,28 +26,64 @@ public class AppStringFeatureCfg extends BaseCfg { private static final long serialVersionUID = 8677301658049443801L; private static final String tableName="app_string_feature_cfg"; @Expose + @ExcelField(title="cfg_id",sort=0) private Integer compileId; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; private String bytes; + @ExcelField(title="URL",sort=201) private String cfgKeywords; private String appName; + /** + * 表达式类型 + */ @Expose - @ExcelField(title="expression_type") + @ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=202) @SerializedName("exprType") protected Integer exprType ; - + /** + * 匹配方式 + */ @Expose - @ExcelField(title="match_method") + @ExcelField(title="match_method",dictType="MATCH_METHOD",sort=203) @SerializedName("matchMethod") protected Integer matchMethod ; - + /** + * 是否hex + */ + @ExcelField(title="is_hex",sort=204) + protected Integer isHex; + /** + * 是否hex + */ + @ExcelField(title="is_case_insenstive",sort=205) + protected Integer isCaseInsenstive; + /** + * 是否hex二进制 + */ @Expose - @ExcelField(title="whether_hexbinary") @SerializedName("isHexbin") protected Integer isHexbin; + + + + public Integer getIsHex() { + return isHex; + } + + public void setIsHex(Integer isHex) { + this.isHex = isHex; + } + + public Integer getIsCaseInsenstive() { + return isCaseInsenstive; + } + + public void setIsCaseInsenstive(Integer isCaseInsenstive) { + this.isCaseInsenstive = isCaseInsenstive; + } public Integer getExprType() { return exprType; diff --git a/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java index f7ee6a972..ccb280079 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java @@ -301,45 +301,52 @@ public class AppFeatureCfgController extends BaseController { noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport); List ipList=new ArrayList(); List keywordList=new ArrayList(); + List strList=new ArrayList(); for (AppFeatureIndex cfg : page.getList()) { Map maps=appMultiFeatureCfgService.exportFeature(cfg); - keywordList.addAll(maps.get("APP_KEYWORDS")); + if(entity.getFunctionId()!=567){ + keywordList.addAll(maps.get("APP_KEYWORDS")); + }else{ + strList.addAll(maps.get("APP_DK_GL")); + } ipList.addAll(maps.get("APP_IP_RANGE")); } - keywordList=replaceKeyList(keywordList); dataMap.put(entity.getMenuNameCode(), page.getList()); if(entity.getFunctionId()!=564 && entity.getFunctionId()!=567 ){ + keywordList=replaceKeyList(keywordList); titleList.add("APP_IP_RANGE"); classMap.put("APP_IP_RANGE", IpPortCfg.class); noExportMap.put("APP_IP_RANGE",ipPortInfoNoExport); dataMap.put("APP_IP_RANGE", ipList); - if(entity.getFunctionId()==563){ + } + if(entity.getFunctionId()==563){ titleList.add("APP_PAYLOAD"); classMap.put("APP_PAYLOAD", AppComplexFeatureCfg.class); noExportMap.put("APP_PAYLOAD",appComplexNoExport); dataMap.put("APP_PAYLOAD", keywordList); - }else if(entity.getFunctionId()==565){ + }else if(entity.getFunctionId()==565){ titleList.add("APP_HTTP"); classMap.put("APP_HTTP", AppComplexFeatureCfg.class); noExportMap.put("APP_HTTP",appComplexNoExport); dataMap.put("APP_HTTP", keywordList); - }else if(entity.getFunctionId()==566){ + }else if(entity.getFunctionId()==566){ titleList.add("APP_SSL"); classMap.put("APP_SSL", AppComplexFeatureCfg.class); noExportMap.put("APP_SSL",appComplexNoExport); dataMap.put("APP_SSL", keywordList); - }else if(entity.getFunctionId()==564){ + }else if(entity.getFunctionId()==564){ + keywordList=replaceKeyList(keywordList); titleList.add("APP_DNS"); classMap.put("APP_DNS", AppComplexFeatureCfg.class); noExportMap.put("APP_DNS",appComplexNoExport); dataMap.put("APP_DNS", keywordList); - }else if(entity.getFunctionId()==567){ + }else if(entity.getFunctionId()==567){ + strList=replaceFeatureList(strList); appComplexNoExport=appComplexNoExport+"district,"; - titleList.add("APP_DK_GL"); - classMap.put("APP_DK_GL", AppComplexFeatureCfg.class); - noExportMap.put("APP_DK_GL",appComplexNoExport); - dataMap.put("APP_DK_GL", keywordList); - } + titleList.add("APP_DK"); + classMap.put("APP_DK", AppStringFeatureCfg.class); + noExportMap.put("APP_DK",appComplexNoExport); + dataMap.put("APP_DK", strList); } /*}*/ @@ -361,4 +368,15 @@ public class AppFeatureCfgController extends BaseController { return list; } + public static List replaceFeatureList(List list){ + for (int i = 0; i < list.size(); i++) { + AppStringFeatureCfg base=(AppStringFeatureCfg)list.get(i); + base.setIsHex(base.getIsHexbin()); + base.setIsCaseInsenstive(base.getIsHexbin()); + base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," ")); + } + return list; + } + + } 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 7cb910206..f474bde23 100644 --- a/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppMultiFeatureCfgService.java @@ -311,8 +311,13 @@ public class AppMultiFeatureCfgService extends BaseService { public Map exportFeature(AppFeatureIndex entity){ Map dataMap=new HashMap(); List ipRangeList = appMultiFeatureCfgDao.getAppIpRangeCfg(entity.getCompileId(),entity.getFunctionId()); - List appKeyList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null); - dataMap.put("APP_KEYWORDS", appKeyList); + if(entity.getFunctionId()!=567){ + List appKeyList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null); + dataMap.put("APP_KEYWORDS", appKeyList); + }else{ + List appKeyList = appMultiFeatureCfgDao.getAppStringFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null); + dataMap.put("APP_DK_GL", appKeyList); + } dataMap.put("APP_IP_RANGE", ipRangeList); return dataMap; }