From e0265dd2873bbef13477e751cfbef3d639fbda53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Mon, 13 Oct 2025 17:06:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=9C=80=E6=B1=82-=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E9=9C=80=E6=B1=82-=E7=9B=B2=E7=9B=92=E8=BD=AC=E7=9B=98?= =?UTF-8?q?=E8=B0=83=E9=80=9A=E7=9B=98-=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/BlindBoxTurntableGiftDrawWorld.php | 6 ++++-- application/cron/controller/RoomPan.php | 6 +----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/application/api/model/BlindBoxTurntableGiftDrawWorld.php b/application/api/model/BlindBoxTurntableGiftDrawWorld.php index 2491b83..57a5b09 100644 --- a/application/api/model/BlindBoxTurntableGiftDrawWorld.php +++ b/application/api/model/BlindBoxTurntableGiftDrawWorld.php @@ -762,7 +762,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model if(!$pan_xlh_id){ return ['code' => 0, 'msg' => '创建巡乐会失败!', 'data' => []]; } - db::name("vs_room")->where('id',$room_id)->setInc('xlh_periods');//修改巡乐会期数 + db::name("vs_gift_bag")->where('id',13)->setInc('periods');//修改巡乐会期数 } } private function updateAndPushXlhStatus($room_id, $xlh_ext, $currentXlhPeriodsNum){ @@ -990,7 +990,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model // 3. 检查巡乐会状态 $pan_xlh = db::name('vs_room_pan_xlh') - ->where(['periods' => $bag_data['periods'],"send_time"=>0]) + ->where(['periods' => $bag_data['periods']]) ->find(); if (empty($pan_xlh)) { return ['code' => 0, 'msg' => '未开始', 'data' => null]; @@ -1155,6 +1155,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model $last_update = end($main_prize_updates); db::name('vs_room_pan_xlh')->where('id', $pan_xlh['id'])->update([ 'user_id' => $last_update['user_id'], + 'room_id' => $room_id, 'pay_price' => $ext['xlh_box_price'], 'locking_gift_id' => $last_update['gift_id'], 'num' => $last_update['num'], @@ -1165,6 +1166,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model db::name('vs_room_pan_xlh_log')->insert([ 'xlh_id' => $pan_xlh['id'], 'user_id' => $last_update['user_id'], + 'room_id' => $room_id, 'num' => $last_update['num'], 'locking_end_time' => $last_update['end_time'], 'createtime' => time() diff --git a/application/cron/controller/RoomPan.php b/application/cron/controller/RoomPan.php index 56f35b3..afdb8eb 100644 --- a/application/cron/controller/RoomPan.php +++ b/application/cron/controller/RoomPan.php @@ -174,14 +174,10 @@ class RoomPan echo "处理发放记录失败 \n"; continue; } - db::name("vs_room")->where('id',$value['room_id'])->update([ - 'xlh_periods_num' => 0 - ]); //推送 $FromUserInfo = db::name('user')->field('nickname,avatar')->where(['id'=>$value['user_id']])->find(); - $room_name = db::name('vs_room')->where(['id'=>$value['room_id']])->value('room_name'); $gift_name = db::name('vs_gift')->where(['gid'=>$value['gift_id']])->value('gift_name'); - $text = $FromUserInfo['nickname'] . ' 用户在 ' . $room_name.' 房间巡乐会中 ' .$gift_name.'礼物 x ' .$value['num']." 已收入背包"; + $text = $FromUserInfo['nickname'] . ' 用户在巡乐会中 ' .$gift_name.'礼物 x ' .$value['num']." 已收入背包"; //推送礼物横幅 $push = new Push(0, $value['room_id']); $text_list_new = [