|
|
@@ -32,13 +32,15 @@ class Home extends Controller
|
|
|
$totalFail = (float)$query->where($where)->whereBetween('created_at', [$start, $end])->where('status', 3)->sum('amount');
|
|
|
|
|
|
$query = Withdraw::query();
|
|
|
- $usdTotalAmount = (float)$query->whereBetween('created_at', [$start, $end])->sum('amount');
|
|
|
+ $usdTotalAmount = (float)$query->whereBetween('created_at', [$start, $end])->sum('amount');
|
|
|
+ $usdTotalSuccess = (float)$query->where('status',1)->whereBetween('created_at', [$start, $end])->sum('amount');
|
|
|
+ $usdTotalFail = (float)$query->where('status',2)->whereBetween('created_at', [$start, $end])->sum('amount');
|
|
|
|
|
|
|
|
|
$result = [
|
|
|
'withdraw_usdt' => [
|
|
|
- 'total_fail' => $totalFail,
|
|
|
- 'total_success' => $totalSuccess,
|
|
|
+ 'total_fail' => $usdTotalFail,
|
|
|
+ 'total_success' => $usdTotalSuccess,
|
|
|
'total_amount' => $usdTotalAmount,
|
|
|
],
|
|
|
'withdraw_rmb' => [
|