mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 17:31:49 +08:00 
			
		
		
		
	fix: stat
This commit is contained in:
		| @@ -25,7 +25,7 @@ class OrderController extends Controller | ||||
|         } | ||||
|         if ($request->input('is_commission')) { | ||||
|             $orderModel->where('invite_user_id', '!=', NULL); | ||||
|             $orderModel->whereIn('status', [3, 4]); | ||||
|             $orderModel->whereIn('status', '!=', [0, 2]); | ||||
|             $orderModel->where('commission_balance', '>', 0); | ||||
|         } | ||||
|         if ($request->input('id')) { | ||||
|   | ||||
| @@ -26,7 +26,7 @@ class StatController extends Controller | ||||
|             'data' => [ | ||||
|                 'month_income' => Order::where('created_at', '>=', strtotime(date('Y-m-1'))) | ||||
|                     ->where('created_at', '<', time()) | ||||
|                     ->whereIn('status', [3, 4]) | ||||
|                     ->whereIn('status', '!=', [0, 2]) | ||||
|                     ->sum('total_amount'), | ||||
|                 'month_register_total' => User::where('created_at', '>=', strtotime(date('Y-m-1'))) | ||||
|                     ->where('created_at', '<', time()) | ||||
| @@ -35,16 +35,16 @@ class StatController extends Controller | ||||
|                     ->count(), | ||||
|                 'commission_pendding_total' => Order::where('commission_status', 0) | ||||
|                     ->where('invite_user_id', '!=', NULL) | ||||
|                     ->where('status', [3, 4]) | ||||
|                     ->whereIn('status', '!=', [0, 2]) | ||||
|                     ->where('commission_balance', '>', 0) | ||||
|                     ->count(), | ||||
|                 'day_income' => Order::where('created_at', '>=', strtotime(date('Y-m-d'))) | ||||
|                     ->where('created_at', '<', time()) | ||||
|                     ->whereIn('status', [3, 4]) | ||||
|                     ->whereIn('status', '!=', [0, 2]) | ||||
|                     ->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'))) | ||||
|                     ->whereIn('status', [3, 4]) | ||||
|                     ->whereIn('status', '!=', [0, 2]) | ||||
|                     ->sum('total_amount') | ||||
|             ] | ||||
|         ]); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user