|
|
@@ -65,7 +65,9 @@ class GetmatchData {
|
|
|
case 'StMorningPlate'://早盘
|
|
|
//默认当天
|
|
|
if(empty($ret['match_date'])){
|
|
|
- $match_date = date("Y-m-d");
|
|
|
+ // $match_date = date("Y-m-d");
|
|
|
+ $match_date = '';
|
|
|
+
|
|
|
}else{
|
|
|
if($ret['match_date'] != 'other'){
|
|
|
$match_date = $ret['match_date'];
|
|
|
@@ -76,7 +78,7 @@ class GetmatchData {
|
|
|
$oddsTypeWhere = [
|
|
|
[$models['model_odds'].'.is_morningplate','=',1],
|
|
|
];
|
|
|
- $data = $this->getMorningPlate($source,$models,$where,$lg_id,$search,$match_date,$oddsTypeWhere);
|
|
|
+ $data = $this->getMorningPlate($source,$models,$where,$lg_id,$search,$match_date,$oddsTypeWhere,$ret['type_code'],$ret['game_code']);
|
|
|
break;
|
|
|
case 'StStringScene'://串场
|
|
|
$oddsTypeWhere = [
|
|
|
@@ -382,7 +384,7 @@ class GetmatchData {
|
|
|
/**
|
|
|
* 获取早盘数据
|
|
|
*/
|
|
|
- public function getMorningPlate($source,$models,$where,$lg_id=0,$search='',$time='',$oddsTypeWhere=''){
|
|
|
+ public function getMorningPlate($source,$models,$where,$lg_id=0,$search='',$time='',$oddsTypeWhere='',$type_code='',$game_code=''){
|
|
|
//获取model
|
|
|
$model_match = $models['model_match'];
|
|
|
$model_odds = $models['model_odds'];
|
|
|
@@ -395,7 +397,7 @@ class GetmatchData {
|
|
|
return $leagueData;
|
|
|
}
|
|
|
|
|
|
- $data = $this->getMatch($source,$models,$search,$where,$time);
|
|
|
+ $data = $this->getMatch($source,$models,$search,$where,$time,'',$type_code,$game_code);
|
|
|
return $data;
|
|
|
}
|
|
|
|
|
|
@@ -466,7 +468,7 @@ class GetmatchData {
|
|
|
/**
|
|
|
* 获取国家/洲 下联赛
|
|
|
*/
|
|
|
- public function getMatch($source,$models,$search,$where,$time='',$type_code=''){
|
|
|
+ public function getMatch($source,$models,$search,$where,$time='',$type_code='',$s_type_code='',$game_code=''){
|
|
|
//国家下所有联赛
|
|
|
$country = lm($models['model_league'],"Sports")
|
|
|
->leftjoin('st_area_country','st_area_country.id',$models['model_league'].'.country_id')
|
|
|
@@ -488,7 +490,7 @@ class GetmatchData {
|
|
|
->toArray();
|
|
|
|
|
|
if($type_code != 'StChampion'){//非冠军赛事
|
|
|
- $data = $this->getMatchNum($source,$country,$area,$models,$where,$search,$time);
|
|
|
+ $data = $this->getMatchNum($source,$country,$area,$models,$where,$search,$time,'',$s_type_code,$game_code);
|
|
|
}else{//冠军赛事
|
|
|
$data = $this->getMatchStChampionNum($source,$country,$area,$models,$where,$search,$time);
|
|
|
}
|
|
|
@@ -500,7 +502,7 @@ class GetmatchData {
|
|
|
* 获取联赛下赛事 数量
|
|
|
* 非冠军盘口
|
|
|
*/
|
|
|
- public function getMatchNum($source,$country,$area,$models,$where,$search,$time='',$type=0){
|
|
|
+ public function getMatchNum($source,$country,$area,$models,$where,$search,$time='',$type=0,$s_type_code='',$game_code=''){
|
|
|
$leagueData = lm($models['model_league'],'Sports')
|
|
|
->select('id as lg_id','name_chinese as league','country_id','area_id')
|
|
|
->where([[$models['model_league'].'.name_chinese','!=','']])
|
|
|
@@ -517,6 +519,10 @@ class GetmatchData {
|
|
|
$timeWhere[] = ['match_date',$time];
|
|
|
}
|
|
|
}
|
|
|
+ if($s_type_code == 'StMorningPlate' and $game_code !='zq'){
|
|
|
+ $timeWhere[] = ['match_date','>',date('Y-m-d',time())];
|
|
|
+ }
|
|
|
+
|
|
|
//获取赛事
|
|
|
$matchData = lm($models['model_match'],'Sports')
|
|
|
->select('id as match_id','lg_id')
|