|
@@ -38,7 +38,7 @@ class MatchListWeb extends Controller{
|
|
|
try {
|
|
try {
|
|
|
if(empty($type) ){
|
|
if(empty($type) ){
|
|
|
throw new \Exception(Render([], '10001', lang('Tips','Sports')->get('PARAM_ERROR')));
|
|
throw new \Exception(Render([], '10001', lang('Tips','Sports')->get('PARAM_ERROR')));
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
//如果有lg_id,则将其转为数组
|
|
//如果有lg_id,则将其转为数组
|
|
|
if(!empty($lg_ids)){
|
|
if(!empty($lg_ids)){
|
|
|
if(strstr($lg_ids,',') != false){
|
|
if(strstr($lg_ids,',') != false){
|
|
@@ -135,7 +135,7 @@ class MatchListWeb extends Controller{
|
|
|
foreach ($game as $k=>$v) {
|
|
foreach ($game as $k=>$v) {
|
|
|
if ($v['game_code'] != 'gj') {
|
|
if ($v['game_code'] != 'gj') {
|
|
|
//获取各球类下父级玩法赛事数量
|
|
//获取各球类下父级玩法赛事数量
|
|
|
- $oddsCodeNum[$k] = $this->getMatchData($type,$v['game_code'],'');
|
|
|
|
|
|
|
+ $oddsCodeNum[$k] = $this->getMatchData($type,$v['game_code'],'','','',$search);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -197,17 +197,17 @@ class MatchListWeb extends Controller{
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
}else{
|
|
}else{
|
|
|
$matchData = lm($models['model_league'],"Sports")
|
|
$matchData = lm($models['model_league'],"Sports")
|
|
|
- ->join($model_match,$model_match.'.lg_id',$models['model_league'].'.id')
|
|
|
|
|
- ->select($select)
|
|
|
|
|
- ->where($where)//状态条件
|
|
|
|
|
- ->where($timeWhere)//时间条件
|
|
|
|
|
- ->where(function($query)use ($model_match,$search){//追加 球队搜索
|
|
|
|
|
- $query->where($model_match.'.home_team','like','%'.$search.'%')
|
|
|
|
|
- ->orWhere(function($query)use ($model_match,$search) {
|
|
|
|
|
- $query->where($model_match . '.guest_team', 'like', '%' . $search . '%');
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- ->get()->toArray();
|
|
|
|
|
|
|
+ ->join($model_match,$model_match.'.lg_id',$models['model_league'].'.id')
|
|
|
|
|
+ ->select($select)
|
|
|
|
|
+ ->where($where)//状态条件
|
|
|
|
|
+ ->where($timeWhere)//时间条件
|
|
|
|
|
+ ->where(function($query)use ($model_match,$search){//追加 球队搜索
|
|
|
|
|
+ $query->where($model_match.'.home_team','like','%'.$search.'%')
|
|
|
|
|
+ ->orWhere(function($query)use ($model_match,$search) {
|
|
|
|
|
+ $query->where($model_match . '.guest_team', 'like', '%' . $search . '%');
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ ->get()->toArray();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//不是冠军,则验证赛事赔率
|
|
//不是冠军,则验证赛事赔率
|