|
@@ -25,18 +25,35 @@ class RollingBall extends Controller{
|
|
|
$model_result = $models['model_result'];
|
|
$model_result = $models['model_result'];
|
|
|
$model_match = $models['model_match'];
|
|
$model_match = $models['model_match'];
|
|
|
$model_league = $models['model_league'];
|
|
$model_league = $models['model_league'];
|
|
|
|
|
+ $result_record = $models['model_result_record'];
|
|
|
|
|
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$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")
|
|
$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')
|
|
->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')
|
|
|
|
|
|
|
+ ->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')
|
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
|
|
+ foreach ($result as $k=>$v){
|
|
|
|
|
+ $v['home_score'] = 0;
|
|
|
|
|
+ $v['guest_score'] = 0;
|
|
|
|
|
+ $v['match_time'] = 0;
|
|
|
|
|
+ $v['match_process'] = '';
|
|
|
|
|
+
|
|
|
|
|
+ $result[$k] = $v;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'zq',
|
|
'game_code'=>'zq',
|
|
@@ -45,7 +62,6 @@ class RollingBall extends Controller{
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
return $data;
|
|
return $data;
|
|
|
-// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -61,22 +77,37 @@ class RollingBall extends Controller{
|
|
|
$model_league = $models['model_league'];
|
|
$model_league = $models['model_league'];
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$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")
|
|
$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')
|
|
->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')
|
|
|
|
|
|
|
+ ->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')
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
|
|
|
|
|
|
|
+ foreach ($result as $k=>$v){
|
|
|
|
|
+ $v['home_score'] = 0;
|
|
|
|
|
+ $v['guest_score'] = 0;
|
|
|
|
|
+ $v['match_time'] = 0;
|
|
|
|
|
+ $v['match_process'] = '';
|
|
|
|
|
+
|
|
|
|
|
+ $result[$k] = $v;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'lq',
|
|
'game_code'=>'lq',
|
|
|
'gameName'=>'篮球',
|
|
'gameName'=>'篮球',
|
|
|
'matchData'=>$result
|
|
'matchData'=>$result
|
|
|
];
|
|
];
|
|
|
return $data;
|
|
return $data;
|
|
|
-// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function wqrollingball(){
|
|
public function wqrollingball(){
|
|
@@ -87,22 +118,38 @@ class RollingBall extends Controller{
|
|
|
$model_league = $models['model_league'];
|
|
$model_league = $models['model_league'];
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$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")
|
|
$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')
|
|
->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')
|
|
|
|
|
|
|
+ ->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')
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
|
|
|
|
|
|
|
+ foreach ($result as $k=>$v){
|
|
|
|
|
+ $v['first_inning_score'] = 0;
|
|
|
|
|
+ $v['second_inning_score'] = 0;
|
|
|
|
|
+ $v['third_inning_score'] = 0;
|
|
|
|
|
+ $v['match_time'] = 0;
|
|
|
|
|
+ $v['match_process'] = '';
|
|
|
|
|
+
|
|
|
|
|
+ $result[$k] = $v;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'wq',
|
|
'game_code'=>'wq',
|
|
|
'gameName'=>'网球',
|
|
'gameName'=>'网球',
|
|
|
'matchData'=>$result
|
|
'matchData'=>$result
|
|
|
];
|
|
];
|
|
|
return $data;
|
|
return $data;
|
|
|
-// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function bqrollingball(){
|
|
public function bqrollingball(){
|
|
@@ -113,22 +160,38 @@ class RollingBall extends Controller{
|
|
|
$model_league = $models['model_league'];
|
|
$model_league = $models['model_league'];
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$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")
|
|
$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')
|
|
->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')
|
|
|
|
|
|
|
+ ->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')
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
->where([[$model_league.'.name_chinese','!=','']])
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
|
|
|
|
|
|
|
+ foreach ($result as $k=>$v){
|
|
|
|
|
+ $v['home_score'] = 0;
|
|
|
|
|
+ $v['guest_score'] = 0;
|
|
|
|
|
+ $v['match_time'] = 0;
|
|
|
|
|
+ $v['match_process'] = '';
|
|
|
|
|
+
|
|
|
|
|
+ $result[$k] = $v;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'bq',
|
|
'game_code'=>'bq',
|
|
|
'gameName'=>'棒球',
|
|
'gameName'=>'棒球',
|
|
|
'matchData'=>$result
|
|
'matchData'=>$result
|
|
|
];
|
|
];
|
|
|
return $data;
|
|
return $data;
|
|
|
-// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|