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