APP DNS admin和APP多用途标签配置域导出调整
This commit is contained in:
@@ -29,7 +29,7 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
|||||||
private static final long serialVersionUID = -8069201965300255275L;
|
private static final long serialVersionUID = -8069201965300255275L;
|
||||||
private static final String tableName="app_feature_index";
|
private static final String tableName="app_feature_index";
|
||||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
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 String appName;
|
||||||
private Integer specServiceId;
|
private Integer specServiceId;
|
||||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||||
|
|||||||
@@ -26,28 +26,64 @@ public class AppStringFeatureCfg extends BaseCfg<AppStringFeatureCfg> {
|
|||||||
private static final long serialVersionUID = 8677301658049443801L;
|
private static final long serialVersionUID = 8677301658049443801L;
|
||||||
private static final String tableName="app_string_feature_cfg";
|
private static final String tableName="app_string_feature_cfg";
|
||||||
@Expose
|
@Expose
|
||||||
|
@ExcelField(title="cfg_id",sort=0)
|
||||||
private Integer compileId;
|
private Integer compileId;
|
||||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||||
private Integer specServiceId;
|
private Integer specServiceId;
|
||||||
private String bytes;
|
private String bytes;
|
||||||
|
@ExcelField(title="URL",sort=201)
|
||||||
private String cfgKeywords;
|
private String cfgKeywords;
|
||||||
private String appName;
|
private String appName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表达式类型
|
||||||
|
*/
|
||||||
@Expose
|
@Expose
|
||||||
@ExcelField(title="expression_type")
|
@ExcelField(title="expression_type",dictType="EXPRESSION_TYPE",sort=202)
|
||||||
@SerializedName("exprType")
|
@SerializedName("exprType")
|
||||||
protected Integer exprType ;
|
protected Integer exprType ;
|
||||||
|
/**
|
||||||
|
* 匹配方式
|
||||||
|
*/
|
||||||
@Expose
|
@Expose
|
||||||
@ExcelField(title="match_method")
|
@ExcelField(title="match_method",dictType="MATCH_METHOD",sort=203)
|
||||||
@SerializedName("matchMethod")
|
@SerializedName("matchMethod")
|
||||||
protected Integer 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
|
@Expose
|
||||||
@ExcelField(title="whether_hexbinary")
|
|
||||||
@SerializedName("isHexbin")
|
@SerializedName("isHexbin")
|
||||||
protected Integer 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() {
|
public Integer getExprType() {
|
||||||
return exprType;
|
return exprType;
|
||||||
|
|||||||
@@ -301,45 +301,52 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||||
List<AppComplexFeatureCfg> keywordList=new ArrayList<AppComplexFeatureCfg>();
|
List<AppComplexFeatureCfg> keywordList=new ArrayList<AppComplexFeatureCfg>();
|
||||||
|
List<AppStringFeatureCfg> strList=new ArrayList<AppStringFeatureCfg>();
|
||||||
for (AppFeatureIndex cfg : page.getList()) {
|
for (AppFeatureIndex cfg : page.getList()) {
|
||||||
Map<String, List> maps=appMultiFeatureCfgService.exportFeature(cfg);
|
Map<String, List> 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"));
|
ipList.addAll(maps.get("APP_IP_RANGE"));
|
||||||
}
|
}
|
||||||
keywordList=replaceKeyList(keywordList);
|
|
||||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||||
if(entity.getFunctionId()!=564 && entity.getFunctionId()!=567 ){
|
if(entity.getFunctionId()!=564 && entity.getFunctionId()!=567 ){
|
||||||
|
keywordList=replaceKeyList(keywordList);
|
||||||
titleList.add("APP_IP_RANGE");
|
titleList.add("APP_IP_RANGE");
|
||||||
classMap.put("APP_IP_RANGE", IpPortCfg.class);
|
classMap.put("APP_IP_RANGE", IpPortCfg.class);
|
||||||
noExportMap.put("APP_IP_RANGE",ipPortInfoNoExport);
|
noExportMap.put("APP_IP_RANGE",ipPortInfoNoExport);
|
||||||
dataMap.put("APP_IP_RANGE", ipList);
|
dataMap.put("APP_IP_RANGE", ipList);
|
||||||
if(entity.getFunctionId()==563){
|
}
|
||||||
|
if(entity.getFunctionId()==563){
|
||||||
titleList.add("APP_PAYLOAD");
|
titleList.add("APP_PAYLOAD");
|
||||||
classMap.put("APP_PAYLOAD", AppComplexFeatureCfg.class);
|
classMap.put("APP_PAYLOAD", AppComplexFeatureCfg.class);
|
||||||
noExportMap.put("APP_PAYLOAD",appComplexNoExport);
|
noExportMap.put("APP_PAYLOAD",appComplexNoExport);
|
||||||
dataMap.put("APP_PAYLOAD", keywordList);
|
dataMap.put("APP_PAYLOAD", keywordList);
|
||||||
}else if(entity.getFunctionId()==565){
|
}else if(entity.getFunctionId()==565){
|
||||||
titleList.add("APP_HTTP");
|
titleList.add("APP_HTTP");
|
||||||
classMap.put("APP_HTTP", AppComplexFeatureCfg.class);
|
classMap.put("APP_HTTP", AppComplexFeatureCfg.class);
|
||||||
noExportMap.put("APP_HTTP",appComplexNoExport);
|
noExportMap.put("APP_HTTP",appComplexNoExport);
|
||||||
dataMap.put("APP_HTTP", keywordList);
|
dataMap.put("APP_HTTP", keywordList);
|
||||||
}else if(entity.getFunctionId()==566){
|
}else if(entity.getFunctionId()==566){
|
||||||
titleList.add("APP_SSL");
|
titleList.add("APP_SSL");
|
||||||
classMap.put("APP_SSL", AppComplexFeatureCfg.class);
|
classMap.put("APP_SSL", AppComplexFeatureCfg.class);
|
||||||
noExportMap.put("APP_SSL",appComplexNoExport);
|
noExportMap.put("APP_SSL",appComplexNoExport);
|
||||||
dataMap.put("APP_SSL", keywordList);
|
dataMap.put("APP_SSL", keywordList);
|
||||||
}else if(entity.getFunctionId()==564){
|
}else if(entity.getFunctionId()==564){
|
||||||
|
keywordList=replaceKeyList(keywordList);
|
||||||
titleList.add("APP_DNS");
|
titleList.add("APP_DNS");
|
||||||
classMap.put("APP_DNS", AppComplexFeatureCfg.class);
|
classMap.put("APP_DNS", AppComplexFeatureCfg.class);
|
||||||
noExportMap.put("APP_DNS",appComplexNoExport);
|
noExportMap.put("APP_DNS",appComplexNoExport);
|
||||||
dataMap.put("APP_DNS", keywordList);
|
dataMap.put("APP_DNS", keywordList);
|
||||||
}else if(entity.getFunctionId()==567){
|
}else if(entity.getFunctionId()==567){
|
||||||
|
strList=replaceFeatureList(strList);
|
||||||
appComplexNoExport=appComplexNoExport+"district,";
|
appComplexNoExport=appComplexNoExport+"district,";
|
||||||
titleList.add("APP_DK_GL");
|
titleList.add("APP_DK");
|
||||||
classMap.put("APP_DK_GL", AppComplexFeatureCfg.class);
|
classMap.put("APP_DK", AppStringFeatureCfg.class);
|
||||||
noExportMap.put("APP_DK_GL",appComplexNoExport);
|
noExportMap.put("APP_DK",appComplexNoExport);
|
||||||
dataMap.put("APP_DK_GL", keywordList);
|
dataMap.put("APP_DK", strList);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*}*/
|
/*}*/
|
||||||
@@ -361,4 +368,15 @@ public class AppFeatureCfgController extends BaseController {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<AppStringFeatureCfg> replaceFeatureList(List<AppStringFeatureCfg> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,8 +311,13 @@ public class AppMultiFeatureCfgService extends BaseService {
|
|||||||
public Map<String, List> exportFeature(AppFeatureIndex entity){
|
public Map<String, List> exportFeature(AppFeatureIndex entity){
|
||||||
Map<String, List> dataMap=new HashMap<String, List>();
|
Map<String, List> dataMap=new HashMap<String, List>();
|
||||||
List<AppIpCfg> ipRangeList = appMultiFeatureCfgDao.getAppIpRangeCfg(entity.getCompileId(),entity.getFunctionId());
|
List<AppIpCfg> ipRangeList = appMultiFeatureCfgDao.getAppIpRangeCfg(entity.getCompileId(),entity.getFunctionId());
|
||||||
List<AppComplexFeatureCfg> appKeyList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
if(entity.getFunctionId()!=567){
|
||||||
dataMap.put("APP_KEYWORDS", appKeyList);
|
List<AppComplexFeatureCfg> appKeyList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||||
|
dataMap.put("APP_KEYWORDS", appKeyList);
|
||||||
|
}else{
|
||||||
|
List<AppStringFeatureCfg> appKeyList = appMultiFeatureCfgDao.getAppStringFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||||
|
dataMap.put("APP_DK_GL", appKeyList);
|
||||||
|
}
|
||||||
dataMap.put("APP_IP_RANGE", ipRangeList);
|
dataMap.put("APP_IP_RANGE", ipRangeList);
|
||||||
return dataMap;
|
return dataMap;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user