|
|
@@ -113,7 +113,8 @@ class Sports extends Controller{
|
|
|
//统计当前联赛下的联赛
|
|
|
$data['league'][$k]['game_code'] = $game_code;
|
|
|
$data['league'][$k]['code'] = "qt";
|
|
|
- $data['league'][$k]['count'] = lm($st_competition,'Sports')
|
|
|
+ $matchData = lm($st_competition,'Sports')
|
|
|
+ ->select($st_competition.'.id as match_id')
|
|
|
->where([[$st_competition.'.status','<',2]])
|
|
|
->where('lg_id',$v['lg_id'])
|
|
|
->where($where)
|
|
|
@@ -123,7 +124,11 @@ class Sports extends Controller{
|
|
|
[$st_competition.'.status','<',2],
|
|
|
[$st_competition.'.us_time','>',$this->commonFunction->qgmdate('Y-m-d H:i:s', '', -4)]
|
|
|
])
|
|
|
- ->count('*');
|
|
|
+ ->get()
|
|
|
+ ->toArray();
|
|
|
+ //===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
+ $matchNum = $this->commonFunction->Handle_Odds_Null($matchData,$getModels);
|
|
|
+ $data['league'][$k]['count'] = count($matchNum);
|
|
|
}
|
|
|
}
|
|
|
return $data;
|
|
|
@@ -134,10 +139,10 @@ class Sports extends Controller{
|
|
|
*/
|
|
|
public function data(){
|
|
|
$where = [];//球类额外条件
|
|
|
+ $zq[] = $this->Sports_info('zq',$where);
|
|
|
$lq[] = $this->Sports_info('lq',$where);
|
|
|
$wq[] = $this->Sports_info('wq',$where);
|
|
|
$bq[] = $this->Sports_info('bq',$where);
|
|
|
- $zq[] = $this->Sports_info('zq',$where);
|
|
|
$data = array_merge_recursive($zq,$lq,$bq,$wq);
|
|
|
Render($data,'1', lang('Tips','Sports')->get('success'));
|
|
|
}
|