where('order_id', $order_id)->first(); if (empty($Ordermodel)) { return false; } $game_code = $Ordermodel->game_code; $match_id = $Ordermodel->match_id; switch ($game_code) { case 'zq': $model = new Stzqresult(); break; case 'lq': $model = new Stlqresult(); break; case 'bq': $model = new Stbqresult(); break; default; $model = new Stwqresult(); break; } $resultModel = $model->where([['match_id', '=', $match_id]])->first(); return [ 'order' => $Ordermodel, 'result' => $resultModel, ]; } //一段时间内的提现人数 public function countUser($timearea) { $data = $this->select('account_identity')->where('money_buy_simplex.status', '<>', 4)->join('account','money_buy_simplex.account_identity', '=', 'account.identity')->where('account.status','<>','4')->where('account.user_type','1')->whereBetween('money_time', $timearea)->groupBy('account_identity')->get(); $data = $data->toArray(); return $data; } }