瀏覽代碼

update: fix stat

tokumeikoi 2 年之前
父節點
當前提交
6503664fcc
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      app/Http/Controllers/Admin/StatController.php

+ 2 - 0
app/Http/Controllers/Admin/StatController.php

@@ -48,9 +48,11 @@ class StatController extends Controller
                     ->whereNotIn('status', [0, 2])
                     ->sum('total_amount'),
                 'commission_month_payout' => Order::where('actual_commission_balance' ,'!=', NULL)
+                    ->where('created_at', '>=', strtotime(date('Y-m-1')))
                     ->where('created_at', '<', time())
                     ->sum('actual_commission_balance'),
                 'commission_last_month_payout' => Order::where('actual_commission_balance' ,'!=', NULL)
+                    ->where('created_at', '>=', strtotime('-1 month', strtotime(date('Y-m-1'))))
                     ->where('created_at', '<', strtotime(date('Y-m-1')))
                     ->sum('actual_commission_balance'),
             ]