首页搜索
This commit is contained in:
@@ -37,23 +37,34 @@ class Xintiao extends BaseCom
|
||||
//任务:20-每日在线时长 15 分钟
|
||||
model('Tasks')->tasks_complete($user_id,20);
|
||||
|
||||
|
||||
//获取房间的类型
|
||||
$room_type = db::name('vs_room')->where(['id' => $room_id])->value('type_id');
|
||||
//查询徒弟是否是首签的徒弟 sign_user_type:被签用户的类型:0-首次被签,1-签约过期,2-违约签
|
||||
$uid = db::name('vs_user_sign')
|
||||
->where(['sign_user_id' => $user_id,'sign_user_type' => 0,'end_time' => ['>',time()]])->value('parent_user_id');
|
||||
if($room_type == 2 && $uid){
|
||||
//任务:21-邀请徒弟在拍卖房停留(0/5)分钟,并送给徒弟(0/1 ,特殊礼物)
|
||||
model('Tasks')->tasks_complete($uid, 21, 1);
|
||||
$user_sign = db::name('vs_user_sign')
|
||||
->where(['sign_user_id' => $user_id,'sign_user_type' => 0,'end_time' => ['>',time()]])->field('parent_user_id,sign_user_id')->select();
|
||||
if($user_sign){
|
||||
foreach ($user_sign as $v){
|
||||
if($room_type == 2){
|
||||
//查询徒弟在不在房间
|
||||
$is_room = db::name('vs_room_visitor')
|
||||
->where(['user_id' => $v['sign_user_id'], 'room_id' => $room_id])->find();
|
||||
if($is_room){
|
||||
//任务:21-邀请徒弟在拍卖房停留(0/5)分钟,并送给徒弟(0/1 ,特殊礼物)
|
||||
model('Tasks')->tasks_complete($v['parent_user_id'], 21, 1,$v['sign_user_id']);
|
||||
}
|
||||
}
|
||||
if($room_type == 7){
|
||||
//查询徒弟在不在房间
|
||||
$is_room = db::name('vs_room_visitor')
|
||||
->where(['user_id' => $v['sign_user_id'], 'room_id' => $room_id])->find();
|
||||
if($is_room){
|
||||
//任务:23-邀请徒弟在交友房停留(0/5)分钟,并送给徒弟(0/1 ,特殊礼物)
|
||||
model('Tasks')->tasks_complete($v['parent_user_id'], 23, 1,$v['sign_user_id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($room_type == 7 && $uid){
|
||||
//任务:23-邀请徒弟在交友房停留(0/5)分钟,并送给徒弟(0/1 ,特殊礼物)
|
||||
model('Tasks')->tasks_complete($uid, 23, 1);
|
||||
}
|
||||
|
||||
|
||||
return V(1, '成功', null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user