From 681267566b5644cadc7e450e23cbe777cfc21f51 Mon Sep 17 00:00:00 2001 From: lqmac Date: Mon, 9 Sep 2024 10:53:59 +0800 Subject: [PATCH] 1 --- app/admin/controller/Store.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/admin/controller/Store.php b/app/admin/controller/Store.php index d0338247..98526423 100644 --- a/app/admin/controller/Store.php +++ b/app/admin/controller/Store.php @@ -407,17 +407,17 @@ class Store extends Controller } $goods_ids = array_column($goods_list->toArray(), "goods_id"); // 分批每次导入20条 - $limit = 200; - // 根据商品总数量计算需要的队列任务数量 - $jobCount = \count($goods_ids) / $limit; - // 逐次发布队列任务 - for ($i = 0; $i < $jobCount; $i++) { - $data = array_slice($goods_ids, $i * $limit, $limit); - GoodsRealDeleteJob::dispatch([ - 'list' => $data, - ]); + // $limit = 200; + // // 根据商品总数量计算需要的队列任务数量 + // $jobCount = \count($goods_ids) / $limit; + // // 逐次发布队列任务 + // for ($i = 0; $i < $jobCount; $i++) { + // $data = array_slice($goods_ids, $i * $limit, $limit); + // GoodsRealDeleteJob::dispatch([ + // 'list' => $data, + // ]); - } + // } //删除商品sku GoodsSku::whereIn('goods_id', $goods_ids)->delete();