diff --git a/app/Console/Commands/OrderTimeout.php b/app/Console/Commands/OrderTimeout.php index 4cfa82f..6a5eed9 100644 --- a/app/Console/Commands/OrderTimeout.php +++ b/app/Console/Commands/OrderTimeout.php @@ -66,12 +66,12 @@ class OrderTimeout extends Command Product::whereIn('id', explode(',', $v->product_ids))->increment('stock', $v->num); DB::commit(); + $min_id = $v->id; } catch (\Exception $exception) { DB::rollBack(); $this->line("订单ID {$v->id} 错误:" . $exception->getMessage()); } } - $min_id = $v->id; } }); $this->line('[' . date('Y-m-d H:i:s') . "] ID游标:$min_id ,等待下一个任务");