pref: Enhance TrafficFetch Performance and Optimize Code Structure

This commit is contained in:
xboard
2024-11-29 19:22:12 +08:00
parent 0e9739af0b
commit f86ccae28c
2 changed files with 11 additions and 28 deletions

View File

@@ -196,7 +196,7 @@ class ServerService
// 获取可用的用户列表
public static function getAvailableUsers($groupId): Collection
{
return \DB::table('v2_user')
return User::toBase()
->whereIn('group_id', $groupId)
->whereRaw('u + d < transfer_enable')
->where(function ($query) {