mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 01:11:46 +08:00 
			
		
		
		
	update: fix stat
This commit is contained in:
		| @@ -78,14 +78,16 @@ class V2boardStatistics extends Command | |||||||
|  |  | ||||||
|     private function statServer() |     private function statServer() | ||||||
|     { |     { | ||||||
|         $startAt = strtotime(date('Y-m-d')); |         $endAt = strtotime(date('Y-m-d')); | ||||||
|  |         $startAt = strtotime('-1 day', $endAt); | ||||||
|         $statistics = ServerLog::select([ |         $statistics = ServerLog::select([ | ||||||
|             'server_id', |             'server_id', | ||||||
|             'method as server_type', |             'method as server_type', | ||||||
|             DB::raw("sum(u) as u"), |             DB::raw("sum(u) as u"), | ||||||
|             DB::raw("sum(d) as d"), |             DB::raw("sum(d) as d"), | ||||||
|         ]) |         ]) | ||||||
|             ->where('log_at', $startAt) |             ->where('log_at', '>=', $startAt) | ||||||
|  |             ->where('log_at', '<', $endAt) | ||||||
|             ->groupBy('server_id', 'method') |             ->groupBy('server_id', 'method') | ||||||
|             ->get() |             ->get() | ||||||
|             ->toArray(); |             ->toArray(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user