分组配置增加以ud_flag字段标识状态

This commit is contained in:
zhangwenqing
2019-06-05 17:49:39 +08:00
parent ad04b41d7a
commit f9768ab910
16 changed files with 86 additions and 37 deletions

View File

@@ -151,4 +151,30 @@ public class CommonGroupManageService extends BaseService{
return false;
}
/**
* 更新分组状态 policy_group_info ud_flag0无有效的域配置 1存在有效的域配置
* @param serviceGroupId
* @param groupType
*/
public void updateGroupStatus(String serviceGroupId, Integer groupType) {
/**
* void updateUdFlag(String groupIds, Integer udFlag, Integer groupType);
*/
Integer udFlag = 0;
if(groupType == 5) { // IP
List<IpCommCfg> list = ipCommGroupCfgDao.getCfgInfoByGroupIds(serviceGroupId);
if(list.size() > 0) {
udFlag = 1; // 可用
}
}else if(groupType == 7) { // URL
List<UrlCommCfg> list = urlCommGroupDao.getCfgInfoByGroupIds(serviceGroupId);
if(list.size() > 0) {
udFlag = 1;
}
}
commonGroupManageDao.updateGroupStatus(serviceGroupId, udFlag, groupType);
}
}