清空所有域以后引用组的定时任务删除

This commit is contained in:
wangxin
2019-06-19 11:13:41 +08:00
parent 46fd30e443
commit 5f7eb1ec43
3 changed files with 24 additions and 0 deletions

View File

@@ -3558,13 +3558,31 @@ public abstract class BaseService {
}
//需要更新的cfg_index_info数据库更新
if(toCancelCfgIndexInfos.size()>0){
StringBuffer ids=new StringBuffer();
for(CfgIndexInfo info:toCancelCfgIndexInfos){
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(toUpdateCfgIndexInfos.size()>0){
StringBuffer ids=new StringBuffer();
for(CfgIndexInfo info:toUpdateCfgIndexInfos){
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());
}
}
//向maat发送配置