where('order_id', $order_id)->first(); if (empty($Ordermodel)) { return false; } // $odds_code = \App\Models\MoneyBuyMatch::where('batch_id',$Ordermodel->batch_id)->first(); $odds_code = \App\Models\MoneyBuyMatch::where('order_id',$order_id)->first(); $Ordermodel->odds_code = $odds_code->odds_code; $game_code = $Ordermodel->game_code; $match_id = $Ordermodel->match_id; switch ($game_code) { case 'zq': $model = new Stzqresult(); $models = new \App\Models\Stzqleagueresult(); break; case 'lq': $model = new Stlqresult(); $models = new \App\Models\Stlqleagueresult(); break; case 'bq': $model = new Stbqresult(); $models = new \App\Models\Stbqleagueresult(); break; default; $model = new Stwqresult(); $models = new \App\Models\Stwqleagueresult(); break; } $resultModel = $model->where([['match_id', '=', $match_id]])->first(); $resultsModel = $models->where([['lg_id', '=', $match_id]])->first(); if(empty($resultsModel)){ $resultsModel['result'] = ''; } //处理足球角球数据 $corner_ball_json = $resultModel->corner_ball; return [ 'order' => $Ordermodel, 'result' => $resultModel, 'results' => $resultsModel, ]; } //一段时间内的提现人数 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; } }