每日任务 练歌房
This commit is contained in:
@@ -3383,6 +3383,18 @@ class Room extends Model
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
}
|
||||
|
||||
if($task_id == 33){
|
||||
//练歌:type= 1 label =2
|
||||
$room_ids = db::name('vs_room')->alias('a')->join('vs_room_visitor b','a.id = b.room_id','right')
|
||||
->where(['a.type_id' => 1,'a.label_id' => 2,'a.room_status' => 1,'b.user_id' => ['<>',0]])
|
||||
->column('a.id');
|
||||
if(!$room_ids){
|
||||
return 0;
|
||||
}
|
||||
//在上面获取 一个随义的id
|
||||
return $room_ids[array_rand($room_ids)];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user