房间火热值修改

This commit is contained in:
2025-09-16 22:02:40 +08:00
parent 4058aac058
commit 9ed77ba491
2 changed files with 6 additions and 6 deletions

View File

@@ -531,8 +531,7 @@ class GiveGift extends Model
//增加房间火热值hot_value
$gift_totalaa = $gift_total * get_system_config_value('coin_charm_exp');
//先记录在日志表里 再计划任务写到room表里
db::name('vs_room_hot_value_log')->insert( ['room_id' => $from_id, 'hot_value' => $gift_totalaa, 'createtime' => time()]);
db::name('vs_room')->where(['id' => $from_id])->inc('hot_value', $gift_totalaa)->inc('today_hot_value', $gift_totalaa)->update();
$roomtype = Db::name('vs_room')->where(['id' => $from_id])->value('type_id');
if($roomtype == 6){

View File

@@ -30,9 +30,9 @@ class PerformPerSecond
echo "pk发起10秒后无应答拒绝\n";
$this->pk_start_refuse();
echo "\n";
echo "房间火热值更新:\n";
$this->room_hot_update();
echo "\n";
// echo "房间火热值更新:\n";
// $this->room_hot_update();
// echo "\n";
}
@@ -182,10 +182,11 @@ class PerformPerSecond
}
if($hot_values['today_hot_value'] > $value['value']){
$hot_value = $hot_values['hot_value'];
$today_hot_value = $value['value'];
}
$res = db::name('vs_room')->where('id',$value['room_id'])->update([
'today_hot_value' => $value['value'],
'today_hot_value' => $today_hot_value,
'hot_value' => $hot_value,
'updatetime' => time()
]);