房间小时榜 和房间流水

This commit is contained in:
2026-01-15 05:44:45 +08:00
parent f24de31a92
commit 6f82b130c0
2 changed files with 25 additions and 21 deletions

View File

@@ -330,7 +330,7 @@ class Room extends Model
//今日流水
//金币与魅力比例
$ratio = get_system_config_value('coin_charm_exp');
$v['today_profit'] = $this->get_room_today_profit($v['room_id']) * $ratio;
$v['today_profit'] = db::name('room_daily_income')->where('room_id', $v['room_id'])->value('income')?? 0 * $ratio;
}
//关注数
$v['follow_num'] = db::name('user_follow')->where('follow_id', $v['room_id'])->where('type', 2)->count();
@@ -411,10 +411,10 @@ class Room extends Model
{
$today_start_time = strtotime(date('Y-m-d'));
$today_end_time = $today_start_time + 86400;
return Db::name('vs_user_money_log')
return Db::name('user_earnings_log')
->where(['room_id' => $room_id,'user_id' => $user_id,'change_type' =>19])
->whereBetween('createtime', [$today_start_time, $today_end_time])
->sum('change_value');
->sum('earnings');
}
//房间补贴