mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 10:30:51 +08:00
- Implement Workerman-based `xboard:ws-server` for real-time node synchronization. - Support custom routes, outbounds, and certificate configurations via JSON. - Optimize scheduled tasks with `lazyById` to minimize memory footprint. - Enhance reactivity using Observers for `Plan`, `Server`, and `ServerRoute`. - Expand protocol support for `httpupgrade`, `h2`, and `mieru`.
54 lines
1.1 KiB
PHP
Executable File
54 lines
1.1 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Jobs\OrderHandleJob;
|
|
use App\Services\OrderService;
|
|
use Illuminate\Console\Command;
|
|
use App\Models\Order;
|
|
use App\Models\User;
|
|
use App\Models\Plan;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class CheckOrder extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'check:order';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = '订单检查任务';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function handle()
|
|
{
|
|
Order::whereIn('status', [Order::STATUS_PENDING, Order::STATUS_PROCESSING])
|
|
->orderBy('created_at', 'ASC')
|
|
->lazyById(200)
|
|
->each(function ($order) {
|
|
OrderHandleJob::dispatch($order->trade_no);
|
|
});
|
|
}
|
|
}
|