Compare commits

..

2 Commits

Author SHA1 Message Date
PQZ
702ccbc768 Merge branch 'master' of http://124.222.105.7:3000/dianliang/dl_site_system 2025-07-01 11:27:17 +08:00
PQZ
09a5c7da55 调整 2025-07-01 11:27:11 +08:00

View File

@ -93,13 +93,7 @@ public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper, Bus
if (categoryList == null || categoryList.isEmpty()) {
return categoryList;
}
// 构建id到节点的映射便于查找
Map<String, BusiCategory> idToCategory = new HashMap<>();
for (BusiCategory category : categoryList) {
idToCategory.put(category.getId(), category);
}
// 构建树结构找出根节点
// 找到所有根节点parentId为null
List<BusiCategory> roots = new ArrayList<>();
for (BusiCategory category : categoryList) {