送礼异步处理
This commit is contained in:
@@ -1023,13 +1023,13 @@ class GiveGift extends Model
|
||||
$is_first_gift = db::name('vs_give_gift')->where(['user_id'=>$uid])->count();
|
||||
if($is_first_gift == 1){
|
||||
//任务:7-第一次送礼
|
||||
model('Tasks')->tasks_complete($uid,7);
|
||||
model('api/Tasks')->tasks_complete($uid,7);
|
||||
}
|
||||
//查询是否第一次收礼
|
||||
$is_first_receive_gift = db::name('vs_give_gift')->where(['gift_user'=>$to_id])->count();
|
||||
if($is_first_receive_gift == 1){
|
||||
//任务:8-第一次收礼
|
||||
model('Tasks')->tasks_complete($to_id,8);
|
||||
model('api/Tasks')->tasks_complete($to_id,8);
|
||||
}
|
||||
|
||||
//查询收礼人和送礼人的师徒关系
|
||||
@@ -1040,13 +1040,13 @@ class GiveGift extends Model
|
||||
if($is_master){
|
||||
if(in_array($gid,$special_gift)){
|
||||
//任务:14-每日给师傅送一个特定的礼物
|
||||
model('Tasks')->tasks_complete($uid,14);
|
||||
model('api/Tasks')->tasks_complete($uid,14);
|
||||
//查询今天是否送过礼物了
|
||||
$is_today_gift = db::name('vs_give_gift')
|
||||
->where(['user_id'=>$uid,'gift_user'=>$to_id,'createtime' => ['>=',strtotime(date('Y-m-d'))],'gift_id' => ['in',$special_gift]])->count();
|
||||
if($is_today_gift <= 1){
|
||||
//任务:13-每日收到至少3个徒弟的特殊徐礼物
|
||||
model('Tasks')->tasks_complete($to_id,13);
|
||||
model('api/Tasks')->tasks_complete($to_id,13);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1066,15 +1066,15 @@ class GiveGift extends Model
|
||||
$room_type = db::name('vs_room')->where(['id' => $from_id])->value('type_id');
|
||||
if($room_type == 2){
|
||||
//任务:21-邀请徒弟在拍卖房停留(0/5)分钟,并送给徒弟(0/1 ,特殊礼物)
|
||||
model('Tasks')->tasks_complete($uid,21,2,$to_id);
|
||||
model('api/Tasks')->tasks_complete($uid,21,2,$to_id);
|
||||
}
|
||||
if($room_type == 9){
|
||||
//任务:22-邀请徒弟在点唱房点歌(0/1)首,并送给徒弟(0/1 ,特殊礼物)
|
||||
model('Tasks')->tasks_complete($uid,22,2,$to_id);
|
||||
model('api/Tasks')->tasks_complete($uid,22,2,$to_id);
|
||||
}
|
||||
if($room_type == 7) {
|
||||
//任务:23-邀请徒弟在交友房停留(0/5)分钟,并送给徒弟(0/1 ,特殊礼物)
|
||||
model('Tasks')->tasks_complete($uid, 23, 2,$to_id);
|
||||
model('api/Tasks')->tasks_complete($uid, 23, 2,$to_id);
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user