Browse Source

fix: stat

Tokumeikoi 4 years ago
parent
commit
ebce59a0d1
2 changed files with 4 additions and 4 deletions
  1. 3 3
      app/Http/Controllers/Admin/StatController.php
  2. 1 1
      config/app.php

+ 3 - 3
app/Http/Controllers/Admin/StatController.php

@@ -29,16 +29,16 @@ class StatController extends Controller
                     ->count(),
                 'commission_pendding_total' => Order::where('commission_status', 0)
                     ->where('invite_user_id', '!=', NULL)
-                    ->where('status', 3)
+                    ->where('status', [3, 4])
                     ->where('commission_balance', '>', 0)
                     ->count(),
                 'day_income' => Order::where('created_at', '>=', strtotime(date('Y-m-d')))
                     ->where('created_at', '<', time())
-                    ->where('status', 3)
+                    ->where('status', [3, 4])
                     ->sum('total_amount'),
                 'last_month_income' => Order::where('created_at', '>=', strtotime('-1 month', strtotime(date('Y-m-1'))))
                     ->where('created_at', '<', strtotime(date('Y-m-1')))
-                    ->where('status', 3)
+                    ->where('status', [3, 4])
                     ->sum('total_amount')
             ]
         ]);

+ 1 - 1
config/app.php

@@ -236,5 +236,5 @@ return [
     | The only modification by laravel config
     |
     */
-    'version' => '1.4'
+    'version' => '1.4.1'
 ];