where('server_id', $params['server_id']); } if (!empty($params['server_name'])) { $query->where('server_name', $params['server_name']); } if (!empty($params['game_id'])) { $query->where('game_id', $params['game_id']); } if (!empty($params['game_name'])) { $query->where('game_name', $params['game_name']); } if (isset($params['pay_status']) && $params['pay_status'] != -1) { $query->where('pay_status', $params['pay_status']); } if (isset($params['pay_way']) && $params['pay_way'] != -99) { $query->where('pay_way', $params['pay_way']); } if (!empty($params['pay_order_number'])) { $query->where('pay_order_number', $params['pay_order_number']); } if (!empty($params['user_account'])) { $query->where('user_account', $params['user_account']); } if (!empty($params['role_name'])) { $query->where('game_player_name', $params['game_player_name']); } return $query; } public function scopeSettleOrder($query, string $tableAlias = null) { $column = 'is_check'; if ($tableAlias) { $column = $tableAlias . '.' . $column; } return $query->where($column, 1); } }