refactor: 产品导出健壮性修改

This commit is contained in:
2025-02-18 10:52:46 +08:00
parent c902ed0081
commit d1739d10c8

View File

@@ -450,8 +450,10 @@ class Product
if (!$product_related->isEmpty()) {
$related = [];
foreach ($product_related as $item) {
if (!empty($item->product)) {
$related[$item['product_id']][] = $item->product->spu;
}
}
$products->each(function($product) use($related) {
if (empty($related[$product->id])) {
return;