支持清理异常业务分组节点,使通道可被挂载

This commit is contained in:
lin
2025-03-14 15:32:03 +08:00
parent 4dce850aea
commit 867d1bfb9b
7 changed files with 371 additions and 5 deletions

View File

@@ -93,4 +93,8 @@ public interface IGbChannelService {
PageInfo<CommonGBChannel> queryListByCivilCodeForUnusual(int page, int count, String query, Boolean online, Integer channelType);
void clearChannelCivilCode(Boolean all, List<Integer> channelIds);
PageInfo<CommonGBChannel> queryListByParentForUnusual(int page, int count, String query, Boolean online, Integer channelType);
void clearChannelParent(Boolean all, List<Integer> channelIds);
}

View File

@@ -768,10 +768,33 @@ public class GbChannelServiceImpl implements IGbChannelService {
List<Integer> channelIdsForClear;
if (all != null && all) {
channelIdsForClear = commonGBChannelMapper.queryAllForUnusual();
channelIdsForClear = commonGBChannelMapper.queryAllForUnusualCivilCode();
}else {
channelIdsForClear = channelIds;
}
commonGBChannelMapper.removeCivilCodeByChannelIds(channelIdsForClear);
}
@Override
public PageInfo<CommonGBChannel> queryListByParentForUnusual(int page, int count, String query, Boolean online, Integer channelType) {
PageHelper.startPage(page, count);
if (query != null) {
query = query.replaceAll("/", "//")
.replaceAll("%", "/%")
.replaceAll("_", "/_");
}
List<CommonGBChannel> all = commonGBChannelMapper.queryListByParentForUnusual(query, online, channelType);
return new PageInfo<>(all);
}
@Override
public void clearChannelParent(Boolean all, List<Integer> channelIds) {
List<Integer> channelIdsForClear;
if (all != null && all) {
channelIdsForClear = commonGBChannelMapper.queryAllForUnusualParent();
}else {
channelIdsForClear = channelIds;
}
commonGBChannelMapper.removeParentIdByChannelIds(channelIdsForClear);
}
}