房间用户列表
This commit is contained in:
@@ -1890,6 +1890,8 @@ class Room extends Model
|
||||
// 偏移量计算:(页码-1)*每页数量 - 麦上用户数量
|
||||
// 因为第一页包含了麦上用户,所以从第二页开始需要调整偏移量
|
||||
$offset = ($page - 1) * $limit - $onPitCount;
|
||||
// 添加这行代码确保偏移量不会为负数
|
||||
$offset = max(0, $offset);
|
||||
|
||||
$offPitUser = db::name('vs_room_visitor')->alias('a')
|
||||
->join('user b', 'a.user_id = b.id')
|
||||
|
||||
Reference in New Issue
Block a user