收礼处理 礼物墙

This commit is contained in:
2026-01-14 23:28:22 +08:00
parent 3a8ccf4c35
commit abae40397c
2 changed files with 23 additions and 14 deletions

View File

@@ -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'));