(1)doLog切换改为和service id相同界面的doLog切换一致

(2)serviceId设置改为在jsp页面进行
(3)fns.tld调整错误的函数返回值
This commit is contained in:
wangxin
2019-07-10 17:03:11 +08:00
parent 377cca923c
commit ef04251ef1
6 changed files with 191 additions and 134 deletions

View File

@@ -437,5 +437,24 @@ public class DictUtils {
}
return null;
}*/
public static Map<Integer,Object> getObjGroupListServiceDicts(Integer functionId){
Map<Integer,Object> dictMap=new HashMap<>();
List<Map<String,Object>> templateList= ServiceConfigTemplateUtil.getServiceListByFunctionId(functionId);
StringBuffer buf=new StringBuffer();
for(Map<String,Object> temp:templateList){
if(temp.containsKey("serviceIds")){
String serviceIds= temp.get("serviceIds").toString();
buf.append(serviceIds).append(",");
}
}
List<FunctionServiceDict> serviceDicts=getFunctionServiceDictList();
for(FunctionServiceDict dict:serviceDicts){
for(String serviceId:buf.toString().split(",")){
if(StringUtils.isNotBlank(serviceId)&&dict.getServiceId().toString().equals(serviceId)){
dictMap.put(Integer.parseInt(serviceId),dict);
}
}
}
return dictMap;
}
}

View File

@@ -2,6 +2,7 @@ package com.nis.web.controller.configuration;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.basics.PolicyGroupInfo;
import com.nis.domain.configuration.BaseCfg;

View File

@@ -92,78 +92,78 @@ public class ObjectGroupService extends BaseService {
}
entity.setIsValid(0);
entity.setIsAudit(0);
//设置service_id
if("HTTPS".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(592);
}else if(entity.getAction().equals(16)){
entity.setServiceId(576);
}
}else if("INTERCEPT".equalsIgnoreCase(protocolType)){
entity.setServiceId(512);
}else if("HTTP".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(129);
}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("DNS".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(130);
}else if(entity.getAction().equals(16)){
entity.setServiceId(18);
}
}else if("FTP".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(133);
}else if(entity.getAction().equals(16)){
entity.setServiceId(21);
}
}else if("BGP".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(143);
}else if(entity.getAction().equals(16)){
entity.setServiceId(31);
}
}else if("SSL".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(131);
}else if(entity.getAction().equals(16)){
entity.setServiceId(19);
}
}else if("P2P".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(146);
}else if(entity.getAction().equals(16)){
entity.setServiceId(34);
}
}else if("streaming_media".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(151);
}else if(entity.getAction().equals(16)){
entity.setServiceId(39);
}
}else if("voip".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(150);
}else if(entity.getAction().equals(16)){
entity.setServiceId(38);
}
}else if(StringUtils.isBlank(protocolType)){
if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){
if(entity.getAction().equals(1)){
entity.setServiceId(128);
}else if(entity.getAction().equals(16)){
entity.setServiceId(16);
}
}
}
//设置service_id 改为从jsp页面获取
// if("HTTPS".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(592);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(576);
// }
// }else if("INTERCEPT".equalsIgnoreCase(protocolType)){
// entity.setServiceId(512);
// }else if("HTTP".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(129);
// }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("DNS".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(130);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(18);
// }
// }else if("FTP".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(133);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(21);
// }
// }else if("BGP".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(143);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(31);
// }
// }else if("SSL".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(131);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(19);
// }
// }else if("P2P".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(146);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(34);
// }
// }else if("streaming_media".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(151);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(39);
// }
// }else if("voip".equalsIgnoreCase(protocolType)){
// if(entity.getAction().equals(1)){
// entity.setServiceId(150);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(38);
// }
// }else if(StringUtils.isBlank(protocolType)){
// if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){
// if(entity.getAction().equals(1)){
// entity.setServiceId(128);
// }else if(entity.getAction().equals(16)){
// entity.setServiceId(16);
// }
// }
// }
if(entity.getCfgId()==null){
Integer compileId = 0;
try {