Compare commits
No commits in common. "433677db9097003ad7f142cabb82543515980535" and "045ead8de4ca8e96ee8ff00fdd835c8ea0900472" have entirely different histories.
433677db90
...
045ead8de4
@ -126,7 +126,6 @@ public class BusiProdController extends BaseController
|
||||
item.setFileType(FILE_TYPE_PRODUCT);
|
||||
});
|
||||
}
|
||||
busiProdNewService.setAmount(prodNewVO.getTenantId());
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
@ -102,17 +102,14 @@ public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper, Bus
|
||||
}
|
||||
|
||||
// 构建树结构(找出根节点)
|
||||
// 找到所有根节点(parentId为null)
|
||||
List<BusiCategory> roots = new ArrayList<>();
|
||||
BusiCategory root = null;
|
||||
for (BusiCategory category : categoryList) {
|
||||
if (category.getParentId() == null) {
|
||||
roots.add(category);
|
||||
root = category;
|
||||
}
|
||||
}
|
||||
// 遍历每个根节点,递归统计
|
||||
for (BusiCategory root : roots) {
|
||||
// 递归统计
|
||||
calculateProdsAll(root, categoryList);
|
||||
}
|
||||
return categoryList;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user