argument('order')) { $query->whereIn('id', explode(',', $id)); } $orders = $query->get(); $this->line('总数: ' . $orders->count()); $count = 0; foreach($orders as $order) { $profit = $service->incrementGrowthValue($order); if ($profit) { $count++; } } $this->info('符合要求: ' . $count); DB::commit(); } catch (Throwable $th) { DB::rollBack(); $this->line($th); } sleep(60); } } }