修改 房间类型
This commit is contained in:
@@ -458,6 +458,7 @@ class RoomPit extends Model
|
||||
'a.status' => 0,
|
||||
];
|
||||
|
||||
//常规通道 type: 0普通通道,1优先通道
|
||||
$list['regular'] = db::name('vs_room_pit_apply')->alias('a')->join('user b','a.user_id = b.id')
|
||||
->where($where)->where('a.type',0)->field('a.user_id,a.rank_value,b.nickname,b.avatar')
|
||||
->order('a.rank_value desc')->select();
|
||||
@@ -483,6 +484,7 @@ class RoomPit extends Model
|
||||
//把特殊用户放在最前面
|
||||
array_unshift($list['special'],$special);
|
||||
}
|
||||
if($list['special']){
|
||||
foreach ($list['special'] as $k => $v){
|
||||
//查询用户的爵位
|
||||
$juewei = model('Nobility')->getUserNobilityInfo($v['user_id']);
|
||||
@@ -495,13 +497,13 @@ class RoomPit extends Model
|
||||
}
|
||||
}
|
||||
//先根据$v['jue_wei'] 下面的level 由大到小排序,再根据$v['rank_value'] 由大到小排序level
|
||||
usort($list['regular'], function($a, $b) {
|
||||
usort($list['special'], function($a, $b) {
|
||||
if ($a['jue_wei']['level'] == $b['jue_wei']['level']) {
|
||||
return $b['rank_value'] - $a['rank_value'];
|
||||
}
|
||||
return $b['jue_wei']['level'] - $a['jue_wei']['level'];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$list['gift_info'] = db::name('vs_room_pit_apply_help_gift')->where('room_id',$room_id)->find();
|
||||
if($list['gift_info']){
|
||||
|
||||
Reference in New Issue
Block a user