修改房间类型 K歌房处理
This commit is contained in:
@@ -407,4 +407,13 @@ class Room extends BaseCom
|
|||||||
$reslut = model('Room')->room_online_list($room_id, $page, $limit);
|
$reslut = model('Room')->room_online_list($room_id, $page, $limit);
|
||||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//房间用户当前魅力值列表
|
||||||
|
public function room_user_charm_list()
|
||||||
|
{
|
||||||
|
$room_id = input('room_id', 0);
|
||||||
|
$user_id = input('user_id', '');
|
||||||
|
$reslut = model('Room')->room_user_charm_list($room_id, $user_id);
|
||||||
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1792,7 +1792,7 @@ class Room extends Model
|
|||||||
db::name('vs_room_pit')->where(['pit_number' =>['>',10]])->update(['status' => 2]);
|
db::name('vs_room_pit')->where(['pit_number' =>['>',10]])->update(['status' => 2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type == 1 || $type == 3 || $type == 4){
|
if($type == 1 || $type == 3 || $type == 4 || $type == 7){
|
||||||
//查询拍卖房的状态
|
//查询拍卖房的状态
|
||||||
$room_auction = db::name('vs_room_auction')->where(['room_id' => $room_id,'status' => 2])->select();
|
$room_auction = db::name('vs_room_auction')->where(['room_id' => $room_id,'status' => 2])->select();
|
||||||
if($room_auction){
|
if($room_auction){
|
||||||
@@ -2578,4 +2578,26 @@ class Room extends Model
|
|||||||
}
|
}
|
||||||
return $friend;
|
return $friend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//房间用户当前魅力值列表
|
||||||
|
public function room_user_charm_list($room_id, $user_id)
|
||||||
|
{
|
||||||
|
if($room_id == '' || $user_id == ''){
|
||||||
|
return ['code' => 0, 'msg' => '参数错误', 'data' => null];
|
||||||
|
}
|
||||||
|
$clear_time = db::name('vs_room_user_charm')->where(['room_id' => $room_id, 'user_id' => $user_id])->order('id', 'desc')->value('clear_time') ?? 0;
|
||||||
|
$list = db::name('vs_give_gift')->alias('a')
|
||||||
|
->join('user b', 'a.user_id=b.id')
|
||||||
|
->field('a.user_id,sum(a.total_price) as total_price,b.nickname,b.avatar,b.user_code')
|
||||||
|
->where(['a.from_id' => $room_id, 'a.gift_user' => $user_id, 'a.createtime' => ['>',$clear_time],'a.from' => 2])->group('a.user_id')->select();
|
||||||
|
if($list){
|
||||||
|
foreach ($list as $k=>$v){
|
||||||
|
$v['charm'] = $v['total_price'] * get_system_config_value('coin_charm_exp');
|
||||||
|
$v['icon'][0] = model('UserData')->user_wealth_icon($v['user_id']);//财富图标
|
||||||
|
$v['icon'][1] = model('UserData')->user_charm_icon($v['user_id']);//魅力图标
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ['code' => 1, 'msg' => '操作成功', 'data' => $list];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user