修复生效配置可添加定时任务

This commit is contained in:
wangxin
2019-07-25 16:34:40 +08:00
parent 0c639a2d30
commit 121fab31ea

View File

@@ -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);