Skip to content

Commit 53cd2ab

Browse files
author
zhangjiangbin
committed
修正当前在线数量不准确问题
1 parent 9012482 commit 53cd2ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Controllers/AdminController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public function nodeList(Request $request)
359359
$nodeList = SsNode::query()->paginate(10)->appends($request->except('page'));
360360
foreach ($nodeList as &$node) {
361361
// 在线人数
362-
$last_log_time = time() - 1800; // 10分钟内
362+
$last_log_time = time() - 600; // 10分钟内
363363
$online_log = SsNodeOnlineLog::query()->where('node_id', $node->id)->where('log_time', '>=', $last_log_time)->orderBy('id', 'desc')->first();
364364
$node->online_users = empty($online_log) ? 0 : $online_log->online_user;
365365

0 commit comments

Comments
 (0)