巡乐会抽奖接口提交.-heart_id 天津

This commit is contained in:
2025-09-10 16:35:06 +08:00
parent 8ee03a3958
commit 9c923b2c04
5 changed files with 15 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ class BlindBoxTurntableGift extends Model
/*
* 抽奖
*/
public function draw_gift($gift_bag_id, $user_id, $gift_user_ids,$num=1,$room_id=0){
public function draw_gift($gift_bag_id, $user_id, $gift_user_ids,$num=1,$room_id=0,$heart_id=0){
//获取盲盒配置
$bag_data = db::name("vs_gift_bag")->field('id,name,ext,periods')->where('id',$gift_bag_id)->find();
$ext = json_decode($bag_data['ext'],true);
@@ -157,7 +157,8 @@ class BlindBoxTurntableGift extends Model
'count' => $value['count'],
'gift_price' => $value['gift_price'],
'all_gift_price' => $value['gift_price'] * $value['count'],
'createtime' => time()
'createtime' => time(),
'heart_id' => $heart_id
]);
if (!$ret) {
db::rollback();
@@ -376,7 +377,8 @@ class BlindBoxTurntableGift extends Model
$give_gift_ext['gift_price'] = $value['gift_price'];
$give_gift_ext['all_gift_price'] = $value['all_gift_price'];
$give_gift_ext['is_draw_gift'] = 1;
$res = model('GiveGift')->give_gift($blind_box_turntable['user_id'], $value['gift_user_id'], $value['gift_id'], $value['count'],2,1, $blind_box_turntable['room_id'],0,0,$give_gift_ext);
// $res = model('GiveGift')->give_gift($blind_box_turntable['user_id'], $value['gift_user_id'], $value['gift_id'], $value['count'],2,1, $blind_box_turntable['room_id'],0,0,$give_gift_ext);
$res = model('Room')->room_gift($blind_box_turntable['user_id'], $value['gift_user_id'], $value['gift_id'], $value['count'], 2, $blind_box_turntable['room_id'], 0,$value['heart_id'],$give_gift_ext);
if (isset($res) && $res['code'] != 1) {
// return V(0, $res['msg']);
continue;