mirror of
https://github.com/v2board/v2board.git
synced 2025-04-15 22:22:38 +08:00
update: log record
This commit is contained in:
parent
607aa82f88
commit
91418caf04
@ -260,6 +260,7 @@ class ServerService
|
|||||||
|
|
||||||
public function log(int $userId, int $serverId, int $u, int $d, float $rate, string $method)
|
public function log(int $userId, int $serverId, int $u, int $d, float $rate, string $method)
|
||||||
{
|
{
|
||||||
|
if (($u + $d) < 10240) return true;
|
||||||
$timestamp = strtotime(date('Y-m-d H:0'));
|
$timestamp = strtotime(date('Y-m-d H:0'));
|
||||||
$serverLog = ServerLog::where('log_at', '>=', $timestamp)
|
$serverLog = ServerLog::where('log_at', '>=', $timestamp)
|
||||||
->where('log_at', '<', $timestamp + 3600)
|
->where('log_at', '<', $timestamp + 3600)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user