From 939a34e77d0cde6e524cc58303b1d98fd90f1f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 9 Sep 2025 16:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=88=BF=E9=97=B4=E7=81=AB?= =?UTF-8?q?=E7=83=AD=E5=80=BC=20=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/GiveGift.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/application/api/model/GiveGift.php b/application/api/model/GiveGift.php index 999dbe4..eb9f9d8 100644 --- a/application/api/model/GiveGift.php +++ b/application/api/model/GiveGift.php @@ -575,19 +575,8 @@ class GiveGift extends Model //增加房间火热值hot_value $gift_totalaa = $gift_total * get_system_config_value('coin_charm_exp'); -// Db::name('vs_room') -// ->where(['id' => $from_id, 'apply_status' => 2]) -// ->inc('hot_value', $gift_totalaa) -// ->inc('today_hot_value', $gift_totalaa) -// ->update(); -// Db::name('vs_room')->where(['id'=>$from_id,'apply_status'=>2])->setInc('hot_value',$gift_totalaa); -// Db::name('vs_room')->where(['id'=>$from_id,'apply_status'=>2])->setInc('today_hot_value',$gift_totalaa); - $hot_value = db::name('vs_room')->where('id', $from_id)->field('id,hot_value,today_hot_value')->find(); - if($hot_value){ - $hhot_value = $hot_value['hot_value'] + $gift_totalaa; - $today_hot_value = $hot_value['today_hot_value'] + $gift_totalaa; - db::name('vs_room')->where('id', $hot_value['id'])->update(['hot_value' =>$hhot_value,'today_hot_value'=>$today_hot_value]); - } + //先记录在日志表里 再计划任务写到room表里 + db::name('vs_room_hot_value_log')->insert( ['room_id' => $from_id, 'hot_value' => $gift_totalaa, 'createtime' => time()]); $roomtype = Db::name('vs_room')->where(['id' => $from_id])->value('type_id'); if($roomtype == 6){