1
This commit is contained in:
parent
8a3325e083
commit
b3fdf26a52
@ -126,6 +126,7 @@ public class BusiProdController extends BaseController
|
|||||||
item.setFileType(FILE_TYPE_PRODUCT);
|
item.setFileType(FILE_TYPE_PRODUCT);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
busiProdNewService.setAmount(prodNewVO.getTenantId());
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,14 +99,17 @@ public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper, Bus
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 构建树结构(找出根节点)
|
// 构建树结构(找出根节点)
|
||||||
BusiCategory root = null;
|
// 找到所有根节点(parentId为null)
|
||||||
|
List<BusiCategory> roots = new ArrayList<>();
|
||||||
for (BusiCategory category : categoryList) {
|
for (BusiCategory category : categoryList) {
|
||||||
if (category.getParentId() == null) {
|
if (category.getParentId() == null) {
|
||||||
root = category;
|
roots.add(category);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 递归统计
|
// 遍历每个根节点,递归统计
|
||||||
calculateProdsAll(root, categoryList);
|
for (BusiCategory root : roots) {
|
||||||
|
calculateProdsAll(root, categoryList);
|
||||||
|
}
|
||||||
return categoryList;
|
return categoryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user