ASN分组逻辑调整,配置使用ANS号对应组织的分组改为使用ANS号新增的唯一分组
(cherry picked from commit 5b49bf1d80)
This commit is contained in:
@@ -80,6 +80,7 @@ public class AsnGroupInfoService extends BaseService{
|
||||
entity.setCountry(country);
|
||||
|
||||
int groupId=0;
|
||||
int onlyGroupId=0;//用于ip地址中下发配置组号
|
||||
//新增
|
||||
if(entity.getGroupId()==null){
|
||||
|
||||
@@ -110,10 +111,18 @@ public class AsnGroupInfoService extends BaseService{
|
||||
}else {
|
||||
throw new MaatConvertException("Get asn group id failed");
|
||||
}
|
||||
//新增组号用于ip地址新增业务
|
||||
List<Integer> onlyGroupIds= ConfigServiceUtil.getId(2,1);
|
||||
if(onlyGroupIds.size()>0) {
|
||||
onlyGroupId=onlyGroupIds.get(0).intValue();
|
||||
}else {
|
||||
throw new MaatConvertException("Get asn group id failed");
|
||||
}
|
||||
Date createTime=new Date();
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setGroupId(groupId);
|
||||
entity.setOnlyGroupId(onlyGroupId);
|
||||
entity.setOrgGroupId(configGroupInfo.getGroupId());
|
||||
entity.setIsValid(0);
|
||||
//分组已被策略设定为下发全部域,则需要自动下发新增的asno
|
||||
@@ -193,13 +202,15 @@ public class AsnGroupInfoService extends BaseService{
|
||||
List srcList=new ArrayList<>();
|
||||
AsnKeywordCfg cfg=new AsnKeywordCfg();
|
||||
cfg.initDefaultValue();
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
// cfg.setGroupId(group.getGroupId());
|
||||
cfg.setGroupId(entity.getOnlyGroupId());// 用于ip地址 asn
|
||||
cfg.setCfgKeywords(entity.getAsnId().toString());
|
||||
cfg.setRegionId(entity.getRegionId());
|
||||
cfg.setCfgType(Constants.NTC_ASN_NUMBER);
|
||||
cfg.setAuditTime(new Date());
|
||||
srcList.add(cfg);
|
||||
srcMap.put(group.getGroupId(), srcList);
|
||||
// srcMap.put(group.getGroupId(), srcList);
|
||||
srcMap.put(entity.getOnlyGroupId(), srcList);// 用于ip地址 asn
|
||||
GroupReuseAddBean commonGroupBean=new GroupReuseAddBean();
|
||||
List<GroupReuseCfg> commonGroupList=new ArrayList<>();
|
||||
commonGroupList=convertCommonRegion(srcMap,commonGroupList,1,2,4);
|
||||
|
||||
Reference in New Issue
Block a user