Compare commits

...

2 Commits

Author SHA1 Message Date
PQZ
433677db90 Merge branch 'master' of http://124.222.105.7:3000/dianliang/dl_site_system 2025-06-30 16:02:03 +08:00
PQZ
b3fdf26a52 1 2025-06-30 16:00:00 +08:00
2 changed files with 8 additions and 4 deletions

View File

@ -126,6 +126,7 @@ public class BusiProdController extends BaseController
item.setFileType(FILE_TYPE_PRODUCT);
});
}
busiProdNewService.setAmount(prodNewVO.getTenantId());
return success();
}

View File

@ -102,14 +102,17 @@ public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper, Bus
}
// 构建树结构找出根节点
BusiCategory root = null;
// 找到所有根节点parentId为null
List<BusiCategory> roots = new ArrayList<>();
for (BusiCategory category : categoryList) {
if (category.getParentId() == null) {
root = category;
roots.add(category);
}
}
// 递归统计
calculateProdsAll(root, categoryList);
// 遍历每个根节点递归统计
for (BusiCategory root : roots) {
calculateProdsAll(root, categoryList);
}
return categoryList;
}