房间用户列表
This commit is contained in:
@@ -1808,18 +1808,13 @@ class Room extends Model
|
||||
|
||||
$lists['on_pit'] = [];
|
||||
$lists['off_pit'] = [];
|
||||
$lists['count'] = db::name('vs_room_visitor')->where(['room_id' => $room_id])->count();
|
||||
$where = ['a.room_id' => $room_id];
|
||||
if ($page != 1) {
|
||||
$where['a.is_onpit'] = 1;//不在麦位上的用户
|
||||
$where['b.hide_status'] = 0;//非隐身用户
|
||||
}
|
||||
|
||||
$where = ['a.room_id' => $room_id];
|
||||
$lists['count'] = db::name('vs_room_visitor')->where($where)->count();
|
||||
$list = db::name('vs_room_visitor')->alias('a')
|
||||
->join('user b', 'a.user_id = b.id','left')
|
||||
->field('a.id,a.user_id,b.nickname,b.avatar,b.hide_status,a.is_onpit')
|
||||
->where($where)
|
||||
// ->order('a.is_onpit asc,a.id asc')
|
||||
->page($page, $limit)
|
||||
->select();
|
||||
if ($list) {
|
||||
@@ -1837,7 +1832,12 @@ class Room extends Model
|
||||
$v['pit_number'] = $role['pit_number'];
|
||||
|
||||
if ($page != 1) {
|
||||
$lists['off_pit'][] = $v;
|
||||
// $lists['off_pit'][] = $v;
|
||||
if ($v['is_onpit'] == 1) {//bu在麦位上的用户
|
||||
if($v['hide_status'] == 0){//非隐身用户
|
||||
$lists['off_pit'][] = $v;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($v['is_onpit'] == 1) {//bu在麦位上的用户
|
||||
if($v['hide_status'] == 0){//非隐身用户
|
||||
|
||||
Reference in New Issue
Block a user