①协议由于数量增加,现改为字典
②增加邮件协议下发逻辑
This commit is contained in:
@@ -107,6 +107,12 @@ public class ObjectGroupService extends BaseService {
|
||||
}else if(entity.getAction().equals(16)){
|
||||
entity.setServiceId(17);
|
||||
}
|
||||
}else if("MAIL".equalsIgnoreCase(protocolType)){
|
||||
if(entity.getAction().equals(1)){
|
||||
entity.setServiceId(132);
|
||||
}else if(entity.getAction().equals(16)){
|
||||
entity.setServiceId(20);
|
||||
}
|
||||
}else if(StringUtils.isBlank(protocolType)){
|
||||
if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){
|
||||
if(entity.getAction().equals(1)){
|
||||
@@ -585,6 +591,7 @@ public class ObjectGroupService extends BaseService {
|
||||
StringBuffer groupIds=new StringBuffer();
|
||||
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(functionId);
|
||||
Map<String,String> dicts=DictUtils.getDictMap("OBJ_GROUP_PROTOCOL");
|
||||
for (ObjGroupCfg c : list) {
|
||||
if(!StringUtil.isBlank(c.getCommonGroupIds())) {
|
||||
Map<String,String> groupIdMap=ConfigConvertUtil.gsonFromJson(c.getCommonGroupIds(),Map.class);
|
||||
@@ -600,12 +607,8 @@ public class ObjectGroupService extends BaseService {
|
||||
c.setActionCode(msgProp.getProperty("action_"+service.getActionCode(),"action_"+service.getActionCode()));
|
||||
}
|
||||
}
|
||||
if(c.getUserRegion1().equalsIgnoreCase("https")){
|
||||
c.setUserRegion1("HTTPS");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("http")){
|
||||
c.setUserRegion1("HTTP");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("intercept")){
|
||||
c.setUserRegion1(msgProp.getProperty("intercept","intercept"));
|
||||
if(dicts.containsKey(c.getUserRegion1())){
|
||||
c.setUserRegion1(msgProp.getProperty(dicts.get(c.getUserRegion1()),dicts.get(c.getUserRegion1())));
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(groupIds.toString())){
|
||||
@@ -653,7 +656,7 @@ public class ObjectGroupService extends BaseService {
|
||||
List<ObjGroupCfg> list = commonPolicyDao.getObjGroupPagedList(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos=new ArrayList<>();
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
||||
|
||||
Map<String,String> dicts=DictUtils.getDictMap("OBJ_GROUP_PROTOCOL");
|
||||
for (ObjGroupCfg c : list) {
|
||||
if(StringUtils.isNotBlank(c.getCommonGroupIds())) {
|
||||
Map<String,String> groupIdMap=ConfigConvertUtil.gsonFromJson(c.getCommonGroupIds(),Map.class);
|
||||
@@ -669,12 +672,8 @@ public class ObjectGroupService extends BaseService {
|
||||
c.setActionCode(msgProp.getProperty("action_"+service.getActionCode(),"action_"+service.getActionCode()));
|
||||
}
|
||||
}
|
||||
if(c.getUserRegion1().equalsIgnoreCase("https")){
|
||||
c.setUserRegion1("HTTPS");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("http")){
|
||||
c.setUserRegion1("HTTP");
|
||||
}else if(c.getUserRegion1().equalsIgnoreCase("intercept")){
|
||||
c.setUserRegion1(msgProp.getProperty("intercept","intercept"));
|
||||
if(dicts.containsKey(c.getUserRegion1())){
|
||||
c.setUserRegion1(msgProp.getProperty(dicts.get(c.getUserRegion1()),dicts.get(c.getUserRegion1())));
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(groupIds.toString())){
|
||||
|
||||
Reference in New Issue
Block a user