分组配置增加以ud_flag字段标识状态
This commit is contained in:
@@ -151,4 +151,30 @@ public class CommonGroupManageService extends BaseService{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新分组状态 policy_group_info ud_flag:0(无有效的域配置) 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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user