修复asn ip 导入未生效的IP也会下发的bug
This commit is contained in:
@@ -80,8 +80,12 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
}
|
}
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveAsnIpBatch(Map<String,List<AsnIpCfg>> cfgs,int total) {
|
public void saveAsnIpBatch(Map<String,List<AsnIpCfg>> cfgs,int total) {
|
||||||
|
//需要通过删除域接口删除的ip集合
|
||||||
List<AsnIpCfg> toDelAsnIpCfgs=Lists.newArrayList();
|
List<AsnIpCfg> toDelAsnIpCfgs=Lists.newArrayList();
|
||||||
|
//需要本地保存的IP集合
|
||||||
List<AsnIpCfg> toSaveAsnIpCfgs=Lists.newArrayList();
|
List<AsnIpCfg> toSaveAsnIpCfgs=Lists.newArrayList();
|
||||||
|
//需要通过新增域接口新增的ip集合
|
||||||
|
List<AsnIpCfg> toAddRegionAsnIpCfgs=Lists.newArrayList();
|
||||||
List<SysDataDictionaryItem> isImportAll=DictUtils.getDictList("IS_ASN_IP_IMPORT_ALL");
|
List<SysDataDictionaryItem> isImportAll=DictUtils.getDictList("IS_ASN_IP_IMPORT_ALL");
|
||||||
List<Integer> idList=ConfigServiceUtil.getId(3, total);
|
List<Integer> idList=ConfigServiceUtil.getId(3, total);
|
||||||
int ind=0;
|
int ind=0;
|
||||||
@@ -103,6 +107,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
cfg.setIsValid(Constants.VALID_NO);
|
cfg.setIsValid(Constants.VALID_NO);
|
||||||
else {
|
else {
|
||||||
cfg.setIsValid(Constants.VALID_YES);
|
cfg.setIsValid(Constants.VALID_YES);
|
||||||
|
toAddRegionAsnIpCfgs.add(cfg);
|
||||||
}
|
}
|
||||||
ind++;
|
ind++;
|
||||||
}
|
}
|
||||||
@@ -119,8 +124,8 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
|||||||
if(toDelAsnIpCfgs.size()>0) {
|
if(toDelAsnIpCfgs.size()>0) {
|
||||||
asnIPRegionSendToMaat(toDelAsnIpCfgs,Constants.VALID_NO);
|
asnIPRegionSendToMaat(toDelAsnIpCfgs,Constants.VALID_NO);
|
||||||
}
|
}
|
||||||
if(toSaveAsnIpCfgs.size()>0) {
|
if(toAddRegionAsnIpCfgs.size()>0) {
|
||||||
asnIPRegionSendToMaat(toSaveAsnIpCfgs,Constants.VALID_YES);
|
asnIPRegionSendToMaat(toAddRegionAsnIpCfgs,Constants.VALID_YES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user