分组配置管理GroupName改为可手动输入

This commit is contained in:
zhangwenqing
2019-06-14 17:12:41 +08:00
parent 3aebe7d905
commit d245ef7dc4
33 changed files with 2384 additions and 357 deletions

View File

@@ -408,7 +408,7 @@ public class DictUtils {
/**
* 获取公共组字典缓存
*/
public static List<CommonGroupInfo> getCommonGroups(Integer groupType){
/*public static List<CommonGroupInfo> getCommonGroups(Integer groupType){
String dictKey = Constants.CACHE_IPGROUP_DICT;
if(groupType.equals(7)) {
dictKey = Constants.CACHE_URLGROUP_DICT;
@@ -436,6 +436,6 @@ public class DictUtils {
}
}
return null;
}
}*/
}

View File

@@ -470,17 +470,17 @@ public class ExportExcel {
commentStr="";
List<PolicyGroupInfo> list = null;
if(region.getFunctionId().equals(605)) {
list=policyGroupInfoDao.findPolicyGroupInfosByType(5);
list=policyGroupInfoDao.findPolicyGroupInfosByType(Constants.IP_OBJ_GROUP_TYPE);
}else if(region.getFunctionId().equals(606)) {
list=policyGroupInfoDao.findPolicyGroupInfosByType(7);
list=policyGroupInfoDao.findPolicyGroupInfosByType(Constants.URL_OBJ_GROUP_TYPE);
}else if(region.getFunctionId().equals(607)) {
list=policyGroupInfoDao.findPolicyGroupInfosByType(8);
list=policyGroupInfoDao.findPolicyGroupInfosByType(Constants.DOMAIN_OBJ_GROUP_TYPE);
}else if(region.getFunctionId().equals(608)) {
list=policyGroupInfoDao.findPolicyGroupInfosByType(9);
list=policyGroupInfoDao.findPolicyGroupInfosByType(Constants.SUBID_OBJ_GROUP_TYPE);
}
if(!StringUtil.isEmpty(list)){
for (PolicyGroupInfo policyGroupInfo : list) {
commentStr=commentStr+policyGroupInfo.getServiceGroupId()+""+policyGroupInfo.getGroupName()+"\n";
commentStr=commentStr+policyGroupInfo.getGroupName()+"\n";
index++;
}
}

View File

@@ -835,20 +835,7 @@ public class CheckIpFormatThread implements Callable<String>{
}
}
}
// IP公共组配置
if(regionDict.getFunctionId().equals(605)) {
Integer groupId = baseIpCfg.getGroupId();
if (groupId != null) {
CommonGroupInfo groupInfo = DictUtils.getCommonGroups(groupId, 5);
if (groupInfo == null) {
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("group_name"))+ ";");
}
}else {
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("group_name") + " ") + ";");
}
}
if (regionDict.getRegionType().equals(1)) {
boolean srcIpEmpty = false;
boolean destIpEmpty = false;

View File

@@ -132,41 +132,6 @@ public class CheckStringFormatThread implements Callable<String>{
}
// doLog属性检验
this.validDoLog(baseStringCfg,errInfo);
// URL、Domain、ScriberId公共组配置
if(regionDict.getFunctionId().equals(606)) {
Integer groupId = baseStringCfg.getGroupId();
if (groupId != null) {
CommonGroupInfo groupInfo = DictUtils.getCommonGroups(groupId, 7);
if (groupInfo == null) {
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("group_name"))+ ";");
}
}else {
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("group_name") + " ") + ";");
}
}
if(regionDict.getFunctionId().equals(607)) {
Integer groupId = baseStringCfg.getGroupId();
if (groupId != null) {
CommonGroupInfo groupInfo = DictUtils.getCommonGroups(groupId, 8);
if (groupInfo == null) {
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("group_name"))+ ";");
}
}else {
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("group_name") + " ") + ";");
}
}
if(regionDict.getFunctionId().equals(608)) {
Integer groupId = baseStringCfg.getGroupId();
if (groupId != null) {
CommonGroupInfo groupInfo = DictUtils.getCommonGroups(groupId, 9);
if (groupInfo == null) {
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("group_name"))+ ";");
}
}else {
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("group_name") + " ") + ";");
}
}
if (regionDict.getRegionType().equals(2)) {
if (regionDict.getFunctionId().equals(510) && "p2p_hash".equals(regionDict.getConfigServiceType())) {