|
@@ -25,45 +25,25 @@ class RollingBall extends Controller{
|
|
|
$model_result = $models['model_result'];
|
|
$model_result = $models['model_result'];
|
|
|
$model_match = $models['model_match'];
|
|
$model_match = $models['model_match'];
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-// $result = lm($model_result,'Sports')
|
|
|
|
|
-// ->leftjoin($model_match,$model_match.'.match_id',$model_result.'.match_id')
|
|
|
|
|
-// ->select($model_result.'.match_id',$model_result.'.home_team',$model_result.'.guest_team',$model_result.'.status',$model_result.'.home_score',$model_result.'.guest_score',$model_match.'.match_date as start_date',$model_match.'.match_time as start_time',$model_result.'.match_time',$model_result.'.match_process')
|
|
|
|
|
-// ->where('status',1)
|
|
|
|
|
-// ->orderby('match_time','desc')
|
|
|
|
|
-// ->get()->toArray();
|
|
|
|
|
-
|
|
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
|
|
|
|
|
$result =lm($model_match,"Sports")
|
|
$result =lm($model_match,"Sports")
|
|
|
- ->leftjoin($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
|
|
|
|
+ ->join($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
->select($model_match.'.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.'.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_match.'.source',$this->source['source'])
|
|
->where($model_match.'.source',$this->source['source'])
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
|
|
|
|
|
- $da = [];
|
|
|
|
|
-
|
|
|
|
|
-// foreach ($result as $key =>$item){
|
|
|
|
|
-// if($item['match_process'] ==""){
|
|
|
|
|
-// $mark = substr($item['match_time'],0,strrpos($item['match_time'],":"));
|
|
|
|
|
-// if((int)$mark < 45){
|
|
|
|
|
-// $item['match_process'] = '上半场';
|
|
|
|
|
-// }else{
|
|
|
|
|
-// $item['match_process'] = '下半场';
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// $da[$key]= $item;
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'zq',
|
|
'game_code'=>'zq',
|
|
|
'gameName'=>'足球',
|
|
'gameName'=>'足球',
|
|
|
'matchData'=>$result
|
|
'matchData'=>$result
|
|
|
];
|
|
];
|
|
|
- Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
|
|
+
|
|
|
|
|
+ return $data;
|
|
|
|
|
+// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -80,26 +60,20 @@ class RollingBall extends Controller{
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
$result =lm($model_match,"Sports")
|
|
$result =lm($model_match,"Sports")
|
|
|
- ->leftjoin($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
|
|
|
|
+ ->join($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
->select($model_match.'.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.'.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_match.'.source',$this->source['source'])
|
|
->where($model_match.'.source',$this->source['source'])
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-// $lq = lm($model_result,'Sports')
|
|
|
|
|
-// ->select('id','home_team','guest_team','home_score','guest_score','status','match_score','update_time','match_time','match_process')
|
|
|
|
|
-// ->where('status','1')
|
|
|
|
|
-// ->orderby('update_time','desc')
|
|
|
|
|
-// ->get()->toArray();
|
|
|
|
|
-
|
|
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'lq',
|
|
'game_code'=>'lq',
|
|
|
'gameName'=>'篮球',
|
|
'gameName'=>'篮球',
|
|
|
'matchData'=>$result
|
|
'matchData'=>$result
|
|
|
];
|
|
];
|
|
|
- Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
|
|
+ return $data;
|
|
|
|
|
+// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function wqrollingball(){
|
|
public function wqrollingball(){
|
|
@@ -111,24 +85,20 @@ class RollingBall extends Controller{
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
$result =lm($model_match,"Sports")
|
|
$result =lm($model_match,"Sports")
|
|
|
- ->leftjoin($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
|
|
|
|
+ ->join($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
->select($model_match.'.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.'.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($model_match.'.source',$this->source['source'])
|
|
->where($model_match.'.source',$this->source['source'])
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
|
|
|
|
|
-// $wq = lm($model_result,'Sports')
|
|
|
|
|
-// ->select('id','host_player_name','guest_player_name','status','first_inning_score','second_inning_score','third_inning_score','update_time','match_time','match_process')
|
|
|
|
|
-// ->where('status','1')
|
|
|
|
|
-// ->orderby('update_time','desc')
|
|
|
|
|
-// ->get()->toArray();
|
|
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'wq',
|
|
'game_code'=>'wq',
|
|
|
'gameName'=>'网球',
|
|
'gameName'=>'网球',
|
|
|
'matchData'=>$result
|
|
'matchData'=>$result
|
|
|
];
|
|
];
|
|
|
- Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
|
|
+ return $data;
|
|
|
|
|
+// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function bqrollingball(){
|
|
public function bqrollingball(){
|
|
@@ -140,24 +110,39 @@ class RollingBall extends Controller{
|
|
|
//获取 滚球查询条件
|
|
//获取 滚球查询条件
|
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
$where = $this->commonFunction->getState('StRollBall',$model_match);
|
|
|
$result =lm($model_match,"Sports")
|
|
$result =lm($model_match,"Sports")
|
|
|
- ->leftjoin($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
|
|
|
|
+ ->join($model_result,$model_result.'.match_id',$model_match.'.match_id')
|
|
|
->select($model_match.'.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.'.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_match.'.source',$this->source['source'])
|
|
->where($model_match.'.source',$this->source['source'])
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
-// $bq = lm($model_result,'Sports')
|
|
|
|
|
-// ->select('id','home_team','guest_team','home_score','guest_score','status','match_score','update_time','match_time','match_process')
|
|
|
|
|
-// ->where('status','1')
|
|
|
|
|
-// ->orderby('update_time','desc')
|
|
|
|
|
-// ->get()->toArray();
|
|
|
|
|
|
|
|
|
|
$data = [
|
|
$data = [
|
|
|
'game_code'=>'bq',
|
|
'game_code'=>'bq',
|
|
|
'gameName'=>'棒球',
|
|
'gameName'=>'棒球',
|
|
|
'matchData'=>$result
|
|
'matchData'=>$result
|
|
|
];
|
|
];
|
|
|
- Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
|
|
+ return $data;
|
|
|
|
|
+// Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取所有球类滚球
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getRollingBall(){
|
|
|
|
|
+ $zqRollingBall = $this->zqrollingball();
|
|
|
|
|
+ $lqRollingBall = $this->lqrollingball();
|
|
|
|
|
+ $wqRollingBall = $this->wqrollingball();
|
|
|
|
|
+ $bqRollingBall = $this->bqrollingball();
|
|
|
|
|
|
|
|
|
|
+ $data = [
|
|
|
|
|
+ 'zqData' =>$zqRollingBall,
|
|
|
|
|
+ 'lqData' =>$lqRollingBall,
|
|
|
|
|
+ 'wqData' =>$wqRollingBall,
|
|
|
|
|
+ 'bqData' =>$bqRollingBall,
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ Render($data, '1', lang('Tips','Sports')->get('success'));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|