26号之前的asn ip导入版本,区分ipv4和ipv6,v4和v6互不影响

This commit is contained in:
duandongmei
2019-01-29 09:22:33 +06:00
parent 32d4ad3cd7
commit 2abffe2e34
5 changed files with 42 additions and 35 deletions

View File

@@ -377,7 +377,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
return asnIpCfgDao.getByIds(ids);
}
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void deleteByAsnNo(List<Long> asnNoList) {
public void deleteByAsnNo(List<Long> asnNoList,Integer ipType) {
// for(Long asnNo:asnNoList) {
// int result=0;
// do {
@@ -397,7 +397,8 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
}
int result=0;
do {
result=asnIpCfgDao.deleteByAsnId(asnNoStr.toString().substring(0,asnNoStr.toString().length()-1));
//result=asnIpCfgDao.deleteByAsnId(asnNoStr.toString().substring(0,asnNoStr.toString().length()-1));
result=asnIpCfgDao.deleteByAsnIdAndIpType(asnNoStr.toString().substring(0,asnNoStr.toString().length()-1),ipType);
}while(result>0);
//剔除
asnNoList.subList(0, pointsDataLimit).clear();
@@ -410,7 +411,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
}
int result=0;
do {
result=asnIpCfgDao.deleteByAsnId(asnNoStr.toString().substring(0,asnNoStr.toString().length()-1));
result=asnIpCfgDao.deleteByAsnIdAndIpType(asnNoStr.toString().substring(0,asnNoStr.toString().length()-1),ipType);
}while(result>0);
asnNoList.clear();
}
@@ -422,7 +423,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
}
int result=0;
do {
result=asnIpCfgDao.deleteByAsnId(asnNoStr.toString().substring(0,asnNoStr.toString().length()-1));
result=asnIpCfgDao.deleteByAsnIdAndIpType(asnNoStr.toString().substring(0,asnNoStr.toString().length()-1),ipType);
}while(result>0);
asnNoList.clear();
}