百家乐后台统计:新增会员输掉金币总数卡片
This commit is contained in:
@@ -113,6 +113,8 @@ class GameHistoryController extends Controller
|
||||
'total_rounds' => BaccaratRound::query()->where('status', 'settled')->count(),
|
||||
'total_bets' => BaccaratBet::query()->count(),
|
||||
'total_payout' => (int) BaccaratRound::query()->where('status', 'settled')->sum('total_payout'),
|
||||
// 会员实际输掉的金币:所有已结算落败注单的押注金额合计
|
||||
'total_lost' => (int) BaccaratBet::query()->where('status', 'lost')->sum('amount'),
|
||||
'result_dist' => BaccaratRound::query()
|
||||
->where('status', 'settled')
|
||||
->select('result', \Illuminate\Support\Facades\DB::raw('count(*) as cnt'))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
|
||||
{{-- 统计卡片 --}}
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
<div class="grid grid-cols-2 md:grid-cols-5 gap-4">
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="text-2xl font-bold text-indigo-600">{{ number_format($summary['total_rounds']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">历史总局数</div>
|
||||
@@ -31,6 +31,10 @@
|
||||
<div class="text-2xl font-bold text-emerald-600">{{ number_format($summary['total_payout']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">累计派奖金币</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm border border-red-100 p-5">
|
||||
<div class="text-2xl font-bold text-red-600">{{ number_format($summary['total_lost']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">会员输掉金币</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="text-sm font-bold text-gray-700 mb-2">结果分布</div>
|
||||
<div class="space-y-1">
|
||||
|
||||
Reference in New Issue
Block a user