临时提交
parent
a18fba8495
commit
6fcf05e04b
|
@ -99,7 +99,7 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
|
||||||
private Set<Group> deleteEmptyGroup(Set<Group> groupSet, Integer platformId) {
|
private Set<Group> deleteEmptyGroup(Set<Group> groupSet, Integer platformId) {
|
||||||
for (Group group : groupSet) {
|
for (Group group : groupSet) {
|
||||||
// 获取分组子节点
|
// 获取分组子节点
|
||||||
List<Group> children = platformChannelMapper.getShareChildrenGroup(group.getDeviceId(), platformId);
|
Set<Group> children = platformChannelMapper.queryShareChildrenGroup(group.getDeviceId(), platformId);
|
||||||
if (!children.isEmpty()) {
|
if (!children.isEmpty()) {
|
||||||
groupSet.remove(group);
|
groupSet.remove(group);
|
||||||
continue;
|
continue;
|
||||||
|
@ -112,11 +112,17 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
|
||||||
}
|
}
|
||||||
platformChannelMapper.removePlatformGroupById(group.getId(), platformId);
|
platformChannelMapper.removePlatformGroupById(group.getId(), platformId);
|
||||||
}
|
}
|
||||||
if (!groupSet.isEmpty()) {
|
if (groupSet.isEmpty()) {
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
Set<Group> parent = platformChannelMapper.queryShareParentGroupByGroupSet(groupSet, platformId);
|
||||||
|
if (parent.isEmpty()) {
|
||||||
|
return groupSet;
|
||||||
|
}else {
|
||||||
|
Set<Group> parentGroupSet = deleteEmptyGroup(parent, platformId);
|
||||||
|
groupSet.addAll(parentGroupSet);
|
||||||
|
return groupSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<Group> getAllGroup(Set<Group> groupList ) {
|
private Set<Group> getAllGroup(Set<Group> groupList ) {
|
||||||
|
|
Loading…
Reference in New Issue