Ken vor 6 Stunden
Ursprung
Commit
dc34ce41f9
1 geänderte Dateien mit 14 neuen und 0 gelöschten Zeilen
  1. 14 0
      app/Http/Controllers/admin/Home.php

+ 14 - 0
app/Http/Controllers/admin/Home.php

@@ -34,6 +34,12 @@ class Home extends Controller
             $query->whereBetween('created_at', [$start, $end]);
             $query->whereBetween('created_at', [$start, $end]);
             $query1 = clone $query;
             $query1 = clone $query;
             $totalAmount = (float)$query1->where('type', 2)->sum('amount');
             $totalAmount = (float)$query1->where('type', 2)->sum('amount');
+
+
+            $query1 = clone $query;
+            $totalPending = (float)$query1->where('type', 2)->where('status', 0)->sum('amount');
+            $query1 = clone $query;
+            $totalProcessing = (float)$query1->where('type', 2)->where('status', 1)->sum('amount');
             $query1 = clone $query;
             $query1 = clone $query;
             $totalSuccess = (float)$query1->where('type', 2)->where('status', 2)->sum('amount');
             $totalSuccess = (float)$query1->where('type', 2)->where('status', 2)->sum('amount');
             $query1 = clone $query;
             $query1 = clone $query;
@@ -43,6 +49,10 @@ class Home extends Controller
             $query1 = clone $query;
             $query1 = clone $query;
             $rechargeRmbTotalAmount = (float)$query1->where('type', 1)->sum('amount');
             $rechargeRmbTotalAmount = (float)$query1->where('type', 1)->sum('amount');
             $query1 = clone $query;
             $query1 = clone $query;
+            $rechargeRmbTotalPending = (float)$query1->where('type', 1)->where('status', 0)->sum('amount');
+            $query1 = clone $query;
+            $rechargeRmbTotalProcessing = (float)$query1->where('type', 1)->where('status', 1)->sum('amount');
+            $query1 = clone $query;
             $rechargeRmbTotalSuccess = (float)$query1->where('type', 1)->where('status', 2)->sum('amount');
             $rechargeRmbTotalSuccess = (float)$query1->where('type', 1)->where('status', 2)->sum('amount');
             $query1 = clone $query;
             $query1 = clone $query;
             $rechargeRmbTotalFail = (float)$query1->where('type', 1)->where('status', 3)->sum('amount');
             $rechargeRmbTotalFail = (float)$query1->where('type', 1)->where('status', 3)->sum('amount');
@@ -79,6 +89,8 @@ class Home extends Controller
                     'total_amount' => $rechargeRmbTotalAmount,
                     'total_amount' => $rechargeRmbTotalAmount,
                     'total_success' => $rechargeRmbTotalSuccess,
                     'total_success' => $rechargeRmbTotalSuccess,
                     'total_fail' => $rechargeRmbTotalFail,
                     'total_fail' => $rechargeRmbTotalFail,
+                    'total_processing' => $rechargeRmbTotalProcessing,
+                    'total_pending' => $rechargeRmbTotalPending
                 ],
                 ],
 
 
                 'withdraw_usdt' => [
                 'withdraw_usdt' => [
@@ -90,6 +102,8 @@ class Home extends Controller
                     'total_fail' => $totalFail,
                     'total_fail' => $totalFail,
                     'total_success' => $totalSuccess,
                     'total_success' => $totalSuccess,
                     'total_amount' => $totalAmount,
                     'total_amount' => $totalAmount,
+                    'total_processing' => $totalProcessing,
+                    'total_pending' => $totalPending
                 ]
                 ]
 
 
             ];
             ];