refactor: 产品导出健壮性修改
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user