收礼处理 礼物墙
This commit is contained in:
@@ -397,6 +397,17 @@ class GiveGift extends Model
|
||||
model('api/Tasks')->tasks_complete($to_id,8);
|
||||
}
|
||||
|
||||
//使用收礼用户 和礼物ID 查询礼物墙
|
||||
$gift_wall = db::name('user_gift_wall')->where(['user_id'=>$to_id,'gift_id'=>$gid])->find();
|
||||
if($gift_wall){
|
||||
db::name('user_gift_wall')->where(['id'=>$gift_wall['id']])->inc('count',$num)->update();
|
||||
$userIds = explode(',',$gift_wall['give_user_ids']);
|
||||
if(!in_array($uid,$userIds)){
|
||||
$userIds[] = $uid;
|
||||
db::name('user_gift_wall')->where(['id'=>$gift_wall['id']])->update(['give_user_ids'=>implode(',',$userIds)]);
|
||||
}
|
||||
}
|
||||
|
||||
//查询收礼人和送礼人的师徒关系
|
||||
//获取系统配置的特殊礼物
|
||||
$special_gift = explode(',',get_system_config_value('master_special_gift'));
|
||||
|
||||
Reference in New Issue
Block a user