mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 03:57:27 +08:00
perf: 优化节点后端获取用户用户列表接口响应速度,降低CPU使用资源
This commit is contained in:
@@ -163,7 +163,8 @@ class ServerService
|
||||
|
||||
public function getAvailableUsers($groupId)
|
||||
{
|
||||
return User::whereIn('group_id', $groupId)
|
||||
return \DB::table('v2_user')
|
||||
->whereIn('group_id', $groupId)
|
||||
->whereRaw('u + d < transfer_enable')
|
||||
->where(function ($query) {
|
||||
$query->where('expired_at', '>=', time())
|
||||
|
||||
Reference in New Issue
Block a user