@php $total_count = $total_tz_amount = $total_fs_money = 0; @endphp
{{--
ID |
--}}
|
会员 |
游戏类型 |
接口 |
笔数 |
有效投注金额 |
返水等级 |
返水比例 |
返水金额 |
@if($gamerecords->count() && $data->count())
@foreach ($data as $item)
{{--
{{ $item->id }} |
--}}
@php
$tz_valid = $gamerecords->where('member_id',$item->id)->sum('validBetAmount');
$count = $gamerecords->where('member_id',$item->id)->count();
//$fs_level = \App\Models\FsLevel::where('quota','<',$tz_valid)->where('game_type',$params['gameType'])->orderBy('level','desc')->first();
$fs_level = \App\Models\FsLevel::where('lang',$item->lang)->memberMaxRate($item->id,$tz_valid,$params['gameType'])->first();
$fs_money = $fs_level ? sprintf("%.2f", $tz_valid * $fs_level->rate/100) : 0;
// 合计
$total_tz_amount += $fs_level ? $tz_valid : 0;
$total_count += $fs_level ? $count : 0;
$total_fs_money += $fs_money;
@endphp
@if($count && $fs_money)
|
{{ $item->name }} |
{{ config('platform.game_type')[$params['gameType']] }} |
{{ $params['api_name'] ?? '全部' }}
|
{{ $count }}
|
{{ $tz_valid }}
|
{{ $fs_level->name ?? '' }} |
{{ $fs_level->rate ?? 0 }}% |
|
@endif
@endforeach
@endif
|
总合计 |
|
{{ $total_count }} |
{{ $total_tz_amount }} |
|
{{ $total_fs_money }} |
{{--
总共 {{ $data->total() }} 条
{!! $data->appends($params)->render() !!}
--}}