diff --git a/src/main/java/com/nis/web/service/BaseService.java b/src/main/java/com/nis/web/service/BaseService.java index e985c5b9c..9bb6340f1 100644 --- a/src/main/java/com/nis/web/service/BaseService.java +++ b/src/main/java/com/nis/web/service/BaseService.java @@ -3318,7 +3318,7 @@ public abstract class BaseService { ScriberIdCommGroupDao scriberIdCommGroupDao=SpringContextHolder.getBean(ScriberIdCommGroupDao.class); DomainCommGroupDao domainCommGroupDao=SpringContextHolder.getBean(DomainCommGroupDao.class); CommonPolicyDao commonPolicyDao=SpringContextHolder.getBean(CommonPolicyDao.class); - SchedulerDao schedulerDao=SpringContextHolder.getBean(SchedulerDao.class); + //SchedulerDao schedulerDao=SpringContextHolder.getBean(SchedulerDao.class); AreaIpCfgDao areaIpCfgDao=SpringContextHolder.getBean(AreaIpCfgDao.class); Set ipDeletedGroups=new HashSet<>(); Set urlDeletedGroups=new HashSet<>(); @@ -3356,6 +3356,7 @@ public abstract class BaseService { realGroupIds.deleteCharAt(realGroupIds.toString().length()-1); } List toUpdateCfgIndexInfos=new ArrayList<>(); + List toDelSchedualCfgIndexInfos=new ArrayList<>(); List toCancelCfgIndexInfos=new ArrayList<>(); //没有 if(StringUtils.isBlank(realGroupIds.toString())){ @@ -3399,6 +3400,7 @@ public abstract class BaseService { cfgIndexInfo.setCommonGroupIds(""); if(cfgIndexInfo.getIsValid()==Constants.VALID_NO){//未生效,直接更新配置,不用下发 toUpdateCfgIndexInfos.add(cfgIndexInfo); + toDelSchedualCfgIndexInfos.add(cfgIndexInfo); }else{//生效,需要取消配置 cfgIndexInfo.setIsValid(Constants.VALID_NO); cfgIndexInfo.setIsAudit(Constants.AUDIT_NOT_YES); @@ -3597,22 +3599,22 @@ public abstract class BaseService { //查询定时任务,失效定时任务 if(ids.toString().length()>0){ ids.deleteCharAt(ids.toString().length()-1); - schedulerDao.inValidByCompileIds(ids.toString()); + commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename()); } } - if(toUpdateCfgIndexInfos.size()>0){ + if(toDelSchedualCfgIndexInfos.size()>0){ StringBuffer ids=new StringBuffer(); - for(CfgIndexInfo info:toUpdateCfgIndexInfos){ + for(CfgIndexInfo info:toDelSchedualCfgIndexInfos){ commonPolicyDao.updateCfgIndexCommonGroupIds(info); if(StringUtils.isBlank(info.getCommonGroupIds())){ ids.append(info.getCompileId()+","); } } //查询定时任务,失效定时任务 -// if(ids.toString().length()>0){ -// ids.deleteCharAt(ids.toString().length()-1); -// commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename()); -// } + if(ids.toString().length()>0){ + ids.deleteCharAt(ids.toString().length()-1); + commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename()); + } } //向maat发送配置 if(CollectionUtils.isNotEmpty(cancelMaatBean.getConfigCompileList())){