Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -3325,50 +3325,53 @@ class Room extends Model
|
||||
if(!$room_ids){
|
||||
return 0;
|
||||
}
|
||||
|
||||
//获取徒弟是否在房间内
|
||||
$roomId = db::name('vs_room_visitor')->where('user_id',$user_id)->order('id desc')->value('room_id');
|
||||
if($roomId){
|
||||
//在上面获取 一个随义的id
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
//在上面获取 一个随义的id
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
// //获取徒弟是否在房间内
|
||||
// $roomId = db::name('vs_room_visitor')->where('user_id',$user_id)->order('id desc')->value('room_id');
|
||||
// if($roomId){
|
||||
//
|
||||
// }else{
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
}
|
||||
if($task_id == 22){
|
||||
//拍卖 且有人有热度
|
||||
//点歌 且有人有热度
|
||||
$room_ids = db::name('vs_room')->alias('a')->join('vs_room_visitor b','a.id = b.room_id','right')
|
||||
->where(['a.type_id' => 9,'a.room_status' => 1,'a.today_hot_value' => ['>',0],'b.user_id' => ['<>',0]])
|
||||
->column('a.id');
|
||||
if(!$room_ids){
|
||||
return 0;
|
||||
}
|
||||
//在上面获取 一个随义的id
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
//获取徒弟是否在房间内
|
||||
$roomId = db::name('vs_room_visitor')->where('user_id',$user_id)->order('id desc')->value('room_id');
|
||||
if($roomId){
|
||||
//在上面获取 一个随义的id
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
// $roomId = db::name('vs_room_visitor')->where('user_id',$user_id)->order('id desc')->value('room_id');
|
||||
// if($roomId){
|
||||
//
|
||||
// }else{
|
||||
// return 0;
|
||||
// }
|
||||
}
|
||||
if($task_id == 23){
|
||||
//拍卖 且有人有热度
|
||||
//互娱 且有人有热度
|
||||
$room_ids = db::name('vs_room')->alias('a')->join('vs_room_visitor b','a.id = b.room_id','right')
|
||||
->where(['a.type_id' => 7,'a.room_status' => 1,'a.today_hot_value' => ['>',0],'b.user_id' => ['<>',0]])
|
||||
->column('a.id');
|
||||
if(!$room_ids){
|
||||
return 0;
|
||||
}
|
||||
|
||||
//在上面获取 一个随义的id
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
//获取徒弟是否在房间内
|
||||
$roomId = db::name('vs_room_visitor')->where('user_id',$user_id)->order('id desc')->value('room_id');
|
||||
if($roomId){
|
||||
//在上面获取 一个随义的id
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
// $roomId = db::name('vs_room_visitor')->where('user_id',$user_id)->order('id desc')->value('room_id');
|
||||
// if($roomId){
|
||||
//
|
||||
// }else{
|
||||
// return 0;
|
||||
// }
|
||||
}
|
||||
if(in_array($task_id, [7,8,13,14,18,19,20])){
|
||||
//抽奖
|
||||
|
||||
Reference in New Issue
Block a user