0) { $data = $this ->join('st_zq_competition','st_zq_competition.match_id','=','st_zq_bet.match_id') ->join('account_detailed','account_detailed.account_identity','=','st_zq_bet.account_identity') ->where($where) ->where('st_zq_bet.game_name', 'zq') ->where('st_zq_bet.type', $type) ->orderby('money_time','desc') ->paginate ($list); } else { $data = $this ->join('st_zq_competition','st_zq_competition.match_id','=','st_zq_bet.match_id') ->join('account_detailed','account_detailed.account_identity','=','st_zq_bet.account_identity') ->where('st_zq_bet.game_name', 'zq') ->where('st_zq_bet.type', $type) ->orderby('money_time','desc') ->paginate ($list); } if (!$data < 0) { return -2021052003; // } for($i=0;$istatus==1){ $data[$i]->status = '投注'; }else if($data[$i]->status==2){ $data[$i]->status = '追号'; }else if($data[$i]->status==4){ $data[$i]->status = '撤单'; } if($data[$i]->water_status==1){ $data[$i]->water_status = '未回水'; }else if($data[$i]->water_status==2){ $data[$i]->water_status = '已回水'; } if($data[$i]->settle_status==1){ $data[$i]->settle_status = '未结算'; }else if($data[$i]->settle_status==2){ $data[$i]->settle_status = '已结算'; } if($data[$i]->game_status==0){ $data[$i]->game_status = '待开奖'; }else if($data[$i]->game_status==1){ $data[$i]->game_status = '中奖'; }else if($data[$i]->game_status==2){ $data[$i]->game_status = '未中奖'; } if($data[$i]->member_type==1){ $data[$i]->member_type = '普通会员'; }else if($data[$i]->member_type==2){ $data[$i]->member_type = '超级会员'; } $data[$i]->match_id_order = ''.$data[$i]->match_id.'
'.$data[$i]->order_id; $data[$i]->home_guest = $data[$i]->home_team.' VS '.$data[$i]->guest_team; $data[$i]->match_time = '开赛:'.$data[$i]->match_date.' '.$data[$i]->match_time; $data[$i]->money_match_time = '投注:'.$data[$i]->money_time.'
'.$data[$i]->match_time; $league = DB::table('st_zq_league')->where('lg_id',$data[$i]->lg_id)->first(); if(!empty($league)){ $data[$i]->league = $league->name_chinese; }else{ $data[$i]->league = $data[$i]->lg_id; } $data[$i]->frozen_cash = $data[$i]->available_cash-$data[$i]->money.'.00'; $data[$i]->account = $data[$i]->available_cash.'
'.$data[$i]->account_name.'
'.$data[$i]->frozen_cash; $codes = json_decode($data[$i]->codes, true); $data[$i]->content = ''; for($j=0;$jwhere('odds_code',$odds_code)->first(); if(!empty($result)){ $odds_name = $result->odds_name; }else{ $odds_name = $odds_code; } $game = DB::table('st_game_type')->where('game_code',$data[$i]->game_name)->first(); $data[$i]->content = $data[$i]->content.$odds_name. '¥'.$codes[$j]['bet_amount'].'
'; $data[$i]->game = $game->game_name; } } return $data->toArray(); } //投注金额汇总统计 function MoneyCount($where = '',$type) { $data = array(); $data['all_money'] = $this->where('type',$type)->sum('money'); $data['all_prize_money'] = $this->where('type',$type)->sum('prize_money'); $data['alraedy_prize_money'] = $this->where('game_status','1')->where('type',$type)->sum('prize_money'); if (!empty($where) && is_array($where)) { $data['all_money'] = $this->where($where)->where('type',$type)->sum('money'); $data['all_prize_money'] = $this->where($where)->where('type',$type)->sum('prize_money'); $data['alraedy_prize_money'] = $this->where($where)->where('game_status','1')->where('type',$type)->sum('prize_money'); } return $data; } }