ASN修改审核不通过BUG:审核不通过也下发服务端了,错误使用isValid
This commit is contained in:
@@ -441,7 +441,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditIpBatch(Map<Long,List<AsnIpCfg>> data,Integer isValid) {
|
||||
public void auditIpBatch(Map<Long,List<AsnIpCfg>> data,Integer isAudit) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
final SqlSession batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
try{
|
||||
@@ -471,7 +471,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
if(isValid==Constants.VALID_YES) {//审核通过
|
||||
if(isAudit == Constants.AUDIT_YES) {//审核通过
|
||||
if(asnGroupInfo.getIsValid()==0) {//ans组未下发过,下发编译配置
|
||||
asnGroupInfo.setIsValid(1);
|
||||
asnGroupInfo.setEditorId(UserUtils.getUser().getId());
|
||||
@@ -499,7 +499,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(isValid);
|
||||
maatCfg.setIsValid(Constants.VALID_YES);
|
||||
// 设置ASN自定义域
|
||||
String userRegion = "ASN_ID=AS" + asnIpCfgs.get(0).getUserRegion1();
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
@@ -518,11 +518,11 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
}else if(asnGroupInfo.getIsValid()==1){//已经下发过,走分组复用
|
||||
asnGroupInfo.setIssuedIPs(issuedNum+0l);
|
||||
asnGroupInfoDao.update(asnGroupInfo);
|
||||
asnIPRegionSendToMaat(asnIpCfgs,isValid);
|
||||
asnIPRegionSendToMaat(asnIpCfgs,Constants.VALID_YES);
|
||||
}else {
|
||||
throw new RuntimeException("asnGroupInfo isValid value is "+asnGroupInfo.getIsValid());
|
||||
}
|
||||
}else if(isValid==Constants.VALID_NO) {//取消审核通过
|
||||
}else if(isAudit == Constants.AUDIT_NOT_YES) {//取消审核通过
|
||||
asnGroupInfo.setIssuedIPs(0L-issuedNum);
|
||||
asnGroupInfoDao.update(asnGroupInfo);
|
||||
//已经下发过的,调用分组复用配置删除接口
|
||||
@@ -545,7 +545,7 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
// //调用服务接口下发配置
|
||||
// ToMaatResult result = ConfigServiceUtil.put(json,3);
|
||||
// logger.info("ASN IP域删除配置响应信息:"+result.getMsg());
|
||||
asnIPRegionSendToMaat(asnIpCfgs,isValid);
|
||||
asnIPRegionSendToMaat(asnIpCfgs,Constants.VALID_NO);
|
||||
//如果一个asn组下没有IP了,修改有效状态
|
||||
//if(hasValidAsnIp(asn)) {
|
||||
// asnGroupInfo.setIsValid(0);
|
||||
@@ -554,8 +554,6 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
|
||||
// asnGroupInfoDao.updateValid(asnGroupInfo);
|
||||
//}
|
||||
|
||||
}else {
|
||||
throw new RuntimeException("isValid value is "+isValid);
|
||||
}
|
||||
//});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user