From 326a819f722a038174cdb5d12d5e308f84971cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Mon, 15 Dec 2025 15:42:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8A-bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/adminapi/controller/Withdrawal.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/application/adminapi/controller/Withdrawal.php b/application/adminapi/controller/Withdrawal.php index 15c707f2..c4e3e888 100644 --- a/application/adminapi/controller/Withdrawal.php +++ b/application/adminapi/controller/Withdrawal.php @@ -104,15 +104,27 @@ class Withdrawal extends adminApi //统计 //待审核数量 - $wait_num = db::name('vs_user_withdrawal')->where('status',1)->count(); + $wait_num = db::name('vs_user_withdrawal')->where('a.status',1) + ->alias('a') + ->join('user b', 'a.user_id = b.id', 'left') + ->where($where) + ->count(); //今日提现 $today_money = db::name('vs_user_withdrawal')->whereIn('status',[2,6])->whereTime('createtime', 'today')->sum('money'); //昨日提现 $yesterday_money = db::name('vs_user_withdrawal')->whereIn('status',[2,6])->whereTime('createtime', 'yesterday')->sum('money'); //已完成提现总额 - $complete_money = db::name('vs_user_withdrawal')->whereIn('status',[2,6])->sum('money'); + $complete_money = db::name('vs_user_withdrawal')->whereIn('a.status',[2,6]) + ->alias('a') + ->join('user b', 'a.user_id = b.id', 'left') + ->where($where) + ->sum('money'); //手续费收入 - $server_money = db::name('vs_user_withdrawal')->whereIn('status',[2,6])->sum('server_money'); + $server_money = db::name('vs_user_withdrawal')->whereIn('a.status',[2,6]) + ->alias('a') + ->join('user b', 'a.user_id = b.id', 'left') + ->where($where) + ->sum('server_money'); //提现总额 $total_money = $complete_money+$server_money;