|
|
@@ -30,15 +30,6 @@ class RollingBall extends Controller{
|
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
|
|
|
-// $result =lm($model_match,"Sports")
|
|
|
-// ->join($model_result,$model_result.'.match_id',$model_match.'.id')
|
|
|
-// ->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
-// ->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time',$model_match.'.home_team',$model_match.'.guest_team','home_score','guest_score',$model_result.'.match_time','match_process')
|
|
|
-// ->where([[$model_league.'.name_chinese','!=','']])
|
|
|
-// ->where($where)
|
|
|
-// ->get()
|
|
|
-// ->toarray();
|
|
|
-
|
|
|
$result =lm($model_match,"Sports")
|
|
|
->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time',$model_match.'.home_team',$model_match.'.guest_team')
|
|
|
@@ -46,6 +37,8 @@ class RollingBall extends Controller{
|
|
|
->where($where)
|
|
|
->get()
|
|
|
->toarray();
|
|
|
+ //===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
+ $result = $this->commonFunction->Handle_Odds_Null($result,$models);
|
|
|
foreach ($result as $k=>$v){
|
|
|
$v['home_score'] = 0;
|
|
|
$v['guest_score'] = 0;
|
|
|
@@ -61,6 +54,7 @@ class RollingBall extends Controller{
|
|
|
'matchData'=>$result
|
|
|
];
|
|
|
|
|
|
+ dd($data);
|
|
|
return $data;
|
|
|
|
|
|
}
|
|
|
@@ -77,14 +71,6 @@ class RollingBall extends Controller{
|
|
|
$model_league = $models['model_league'];
|
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
-// $result =lm($model_match,"Sports")
|
|
|
-// ->join($model_result,$model_result.'.match_id',$model_match.'.id')
|
|
|
-// ->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
-// ->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time',$model_match.'.home_team',$model_match.'.guest_team','home_score','guest_score',$model_result.'.match_time','match_process')
|
|
|
-// ->where($where)
|
|
|
-// ->where([[$model_league.'.name_chinese','!=','']])
|
|
|
-// ->get()
|
|
|
-// ->toarray();
|
|
|
$result =lm($model_match,"Sports")
|
|
|
->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time',$model_match.'.home_team',$model_match.'.guest_team')
|
|
|
@@ -92,6 +78,9 @@ class RollingBall extends Controller{
|
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
|
->get()
|
|
|
->toarray();
|
|
|
+
|
|
|
+ //===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
+ $result = $this->commonFunction->Handle_Odds_Null($result,$models);
|
|
|
|
|
|
foreach ($result as $k=>$v){
|
|
|
$v['home_score'] = 0;
|
|
|
@@ -118,14 +107,6 @@ class RollingBall extends Controller{
|
|
|
$model_league = $models['model_league'];
|
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
-// $result =lm($model_match,"Sports")
|
|
|
-// ->join($model_result,$model_result.'.match_id',$model_match.'.id')
|
|
|
-// ->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
-// ->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time','home_player_name','guest_player_name','first_inning_score','second_inning_score','third_inning_score',$model_result.'.match_time','match_process')
|
|
|
-// ->where($where)
|
|
|
-// ->where([[$model_league.'.name_chinese','!=','']])
|
|
|
-// ->get()
|
|
|
-// ->toarray();
|
|
|
$result =lm($model_match,"Sports")
|
|
|
->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time',$model_match.'.home_team as home_player_name',$model_match.'.guest_team as guest_player_name')
|
|
|
@@ -134,6 +115,8 @@ class RollingBall extends Controller{
|
|
|
->get()
|
|
|
->toarray();
|
|
|
|
|
|
+ //===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
+ $result = $this->commonFunction->Handle_Odds_Null($result,$models);
|
|
|
foreach ($result as $k=>$v){
|
|
|
$v['first_inning_score'] = 0;
|
|
|
$v['second_inning_score'] = 0;
|
|
|
@@ -160,14 +143,7 @@ class RollingBall extends Controller{
|
|
|
$model_league = $models['model_league'];
|
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
-// $result =lm($model_match,"Sports")
|
|
|
-// ->join($model_result,$model_result.'.match_id',$model_match.'.id')
|
|
|
-// ->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
-// ->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time',$model_match.'.home_team',$model_match.'.guest_team','home_score','guest_score',$model_result.'.match_time','match_process')
|
|
|
-// ->where($where)
|
|
|
-// ->where([[$model_league.'.name_chinese','!=','']])
|
|
|
-// ->get()
|
|
|
-// ->toarray();
|
|
|
+
|
|
|
$result =lm($model_match,"Sports")
|
|
|
->join($model_league,$model_league.'.id',$model_match.'.lg_id')
|
|
|
->select($model_match.'.id as match_id',$model_match.'.tag','match_date as start_date',$model_match.'.match_time as start_time',$model_match.'.home_team',$model_match.'.guest_team')
|
|
|
@@ -176,6 +152,8 @@ class RollingBall extends Controller{
|
|
|
->get()
|
|
|
->toarray();
|
|
|
|
|
|
+ //===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
+ $result = $this->commonFunction->Handle_Odds_Null($result,$models);
|
|
|
foreach ($result as $k=>$v){
|
|
|
$v['home_score'] = 0;
|
|
|
$v['guest_score'] = 0;
|