增加ssl配置功能
This commit is contained in:
@@ -267,13 +267,8 @@ public abstract class BaseService {
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,List> cfgConvert(List dstList,List srcList,Integer cfgType,BaseCfg baseCfg,List groupRelationList){
|
||||
GroupCfg group = new GroupCfg();
|
||||
group.setGroupId(ConfigServiceUtil.getId(2, 1).get(0));
|
||||
group.setCompileId(baseCfg.getCompileId());
|
||||
group.setAuditTime(baseCfg.getAuditTime());
|
||||
group.setIsValid(baseCfg.getIsValid());
|
||||
groupRelationList.add(group);
|
||||
Map<String,List> map = new HashMap();
|
||||
String regionValue = null;
|
||||
if(cfgType==1){
|
||||
List numRegionList = new ArrayList();
|
||||
Integer groupId = 0;
|
||||
@@ -281,12 +276,22 @@ public abstract class BaseService {
|
||||
BaseIpCfg baseIpCfg = (BaseIpCfg) srcList.get(i);
|
||||
IpCfg cfg = new IpCfg();
|
||||
BeanUtils.copyProperties(baseIpCfg, cfg);
|
||||
GroupCfg group = new GroupCfg();
|
||||
if(!cfg.getCfgType().equals(regionValue)){
|
||||
group.setGroupId(ConfigServiceUtil.getId(2, 1).get(0));
|
||||
group.setCompileId(baseCfg.getCompileId());
|
||||
group.setAuditTime(baseCfg.getAuditTime());
|
||||
group.setIsValid(baseCfg.getIsValid());
|
||||
groupRelationList.add(group);
|
||||
}
|
||||
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
cfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||
cfg.setAuditTime(baseCfg.getAuditTime());
|
||||
cfg.setIsValid(baseCfg.getIsValid());
|
||||
cfg = ipConvert(cfg,baseIpCfg);
|
||||
dstList.add(cfg);
|
||||
regionValue = cfg.getCfgType();
|
||||
//如果protocolId非空非零,需要构造数值型域配置
|
||||
if(baseIpCfg.getProtocolId()!=null && baseIpCfg.getProtocolId()!=0){
|
||||
if(groupId==0){//只构造一次配置分组
|
||||
@@ -313,18 +318,35 @@ public abstract class BaseService {
|
||||
|
||||
}else if(cfgType==2 || cfgType==3){
|
||||
for(int i=0;i<srcList.size();i++){
|
||||
GroupCfg group = new GroupCfg();
|
||||
StringCfg cfg = new StringCfg();
|
||||
BeanUtils.copyProperties(srcList.get(i), cfg);
|
||||
if(!cfg.getCfgType().equals(regionValue)){
|
||||
group.setGroupId(ConfigServiceUtil.getId(2, 1).get(0));
|
||||
group.setCompileId(baseCfg.getCompileId());
|
||||
group.setAuditTime(baseCfg.getAuditTime());
|
||||
group.setIsValid(baseCfg.getIsValid());
|
||||
groupRelationList.add(group);
|
||||
}
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
cfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||
cfg.setAuditTime(baseCfg.getAuditTime());
|
||||
cfg.setIsValid(baseCfg.getIsValid());
|
||||
dstList.add(cfg);
|
||||
regionValue = cfg.getCfgType();
|
||||
}
|
||||
}else if(cfgType==4){
|
||||
for(int i=0;i<srcList.size();i++){
|
||||
com.nis.domain.maat.MaatCfg.NumBoundaryCfg cfg = new com.nis.domain.maat.MaatCfg.NumBoundaryCfg();
|
||||
BeanUtils.copyProperties(srcList.get(i), cfg);
|
||||
GroupCfg group = new GroupCfg();
|
||||
if(!cfg.getCfgType().equals(regionValue)){
|
||||
group.setGroupId(ConfigServiceUtil.getId(2, 1).get(0));
|
||||
group.setCompileId(baseCfg.getCompileId());
|
||||
group.setAuditTime(baseCfg.getAuditTime());
|
||||
group.setIsValid(baseCfg.getIsValid());
|
||||
groupRelationList.add(group);
|
||||
}
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
cfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||
cfg.setAuditTime(baseCfg.getAuditTime());
|
||||
|
||||
Reference in New Issue
Block a user