From 91b9a6bcefa8dd7e53cd2c647019acbd11f412fa Mon Sep 17 00:00:00 2001 From: lkddi Date: Sat, 28 Mar 2026 17:38:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E7=99=BE=E5=AE=B6?= =?UTF-8?q?=E4=B9=90=E6=8A=BC=E6=B3=A8=E9=9D=A2=E6=9D=BF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=8A=BC=E6=B3=A8=E4=BA=BA=E6=95=B0=EF=BC=8C=E4=BB=8A=E6=97=A5?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C=E4=BF=AE=E6=AD=A3=E9=87=91=E5=B8=81?= =?UTF-8?q?=E5=87=80=E6=94=B6=E7=9B=8A=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/UserCurrencyService.php | 3 ++- .../chat/partials/games/baccarat-panel.blade.php | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/Services/UserCurrencyService.php b/app/Services/UserCurrencyService.php index 06a8869..5ebabe8 100644 --- a/app/Services/UserCurrencyService.php +++ b/app/Services/UserCurrencyService.php @@ -136,9 +136,10 @@ class UserCurrencyService return UserCurrencyLog::query() ->whereDate('created_at', $date) ->where('currency', $currency) - ->where('amount', '>', 0) // 只统计正向 + // 计算净收益,包含正向与负向消耗 ->selectRaw('user_id, SUM(amount) as total') ->groupBy('user_id') + ->havingRaw('SUM(amount) > 0') // 只有今日净收益为正数才能上榜 ->orderByRaw('SUM(amount) DESC') ->limit($limit) ->get() diff --git a/resources/views/chat/partials/games/baccarat-panel.blade.php b/resources/views/chat/partials/games/baccarat-panel.blade.php index e6b22af..cc2e417 100644 --- a/resources/views/chat/partials/games/baccarat-panel.blade.php +++ b/resources/views/chat/partials/games/baccarat-panel.blade.php @@ -81,19 +81,28 @@
-
押大
+
+ 押大 + +
-
押小
+
+ 押小 + +
-
押豹子
+
+ 押豹子 + +