From 121fab31ea8d361bd4cd3ca83f3bcecd6fe00529 Mon Sep 17 00:00:00 2001 From: wangxin Date: Thu, 25 Jul 2019 16:34:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=9F=E6=95=88=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8F=AF=E6=B7=BB=E5=8A=A0=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/ObjectGroupService.java | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java b/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java index 98ea53c03..9f950177d 100644 --- a/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java +++ b/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java @@ -190,13 +190,6 @@ public class ObjectGroupService extends BaseService { logger.info("数据保存出错"); throw e; } - - if(isValid==1) { - entity.setIsAudit(1); - entity.setIsValid(1); - auditPolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION); - } - }else{ //处理公共分组 if(MapUtils.isNotEmpty(entity.getUserRegion())){ @@ -226,12 +219,6 @@ public class ObjectGroupService extends BaseService { areaIpCfgDao.saveAreaIpCfg(cfg); } } - - if(isValid==1) { - entity.setIsAudit(1); - entity.setIsValid(1); - auditPolicy(entity, entity.getIsAudit(), Constants.UPDATE_ACTION); - } } //更新UD_FLAG if(StringUtils.isNotBlank(oldCommonGroupIds)){ @@ -301,6 +288,17 @@ public class ObjectGroupService extends BaseService { } //处理定时任务 handelScheduleCfg(entity, entity.getIndexTable(), entity); + //修复已经生效的配置添加定时任务 + if(isValid==1) { + entity.setIsAudit(1); + entity.setIsValid(1); + if(entity.getCfgId()==null){ + auditPolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION); + }else{ + auditPolicy(entity, entity.getIsAudit(), Constants.UPDATE_ACTION); + } + + } } public CfgIndexInfo getObjGroupPolicyWithoutSubCfg(Long cfgId){ CfgIndexInfo entity = commonPolicyDao.getPolicyById(cfgId);