改进
This commit is contained in:
parent
23c13c7185
commit
81455d1807
@ -45,6 +45,7 @@ public function handle()
|
||||
{
|
||||
//
|
||||
|
||||
$this->info('正在获取用户数量...');
|
||||
$users = User::count();
|
||||
$transactions = new Transaction();
|
||||
|
||||
@ -52,15 +53,25 @@ public function handle()
|
||||
$startOfYear = now()->startOfYear();
|
||||
$endOfYear = now()->endOfYear();
|
||||
|
||||
$this->info('正在获取交易记录...');
|
||||
$transactions = Transaction::where('type', 'payout')->whereBetween('created_at', [$startOfYear, $endOfYear])->count();
|
||||
|
||||
$this->info('正在获取主机数量...');
|
||||
$hosts = Host::count();
|
||||
|
||||
$this->info('正在获取工单数量...');
|
||||
$workOrders = WorkOrder::count();
|
||||
|
||||
$this->info('正在获取工单回复数量...');
|
||||
$replies = Reply::count();
|
||||
|
||||
$this->info('统计服务器...');
|
||||
$servers = Cache::get('servers', []);
|
||||
$servers = count($servers);
|
||||
|
||||
$this->info('完成。');
|
||||
|
||||
|
||||
$this->warn('用户数量: ' . $users);
|
||||
$this->warn('主机数量: ' . $hosts);
|
||||
$this->warn('服务器数量: ' . $servers);
|
||||
|
Loading…
Reference in New Issue
Block a user