房间小时榜 和房间流水
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
//房间补贴
|
||||
|
||||
Reference in New Issue
Block a user