From 94cf096be46019e1dfd847c280b59744004da3bd Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 26 Jul 2019 10:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=9F=E6=B8=85=E7=A9=BA=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=EF=BC=8C=E5=BD=93=E4=BB=BB=E5=8A=A1=E6=98=AF=E6=9C=89?= =?UTF-8?q?=E6=95=88=E7=9A=84=E6=97=B6=E5=80=99=E5=88=A0=E9=99=A4=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=EF=BC=8C=E5=BD=93=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=98=AF=E6=9C=AA=E7=94=9F=E6=95=88=E7=8A=B6=E6=80=81=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=B9=9F=E8=A6=81=E5=88=A0=E9=99=A4=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/web/service/BaseService.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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())){