|
|
@@ -723,7 +723,7 @@ class CommonFunction {
|
|
|
* @throws \Exception
|
|
|
* 获取不同状态下的 查询条件
|
|
|
*/
|
|
|
- function getState($type_code,$model_match = '',$game_code){
|
|
|
+ function getState($type_code,$model_match = '',$game_code, $p_code){
|
|
|
if($model_match == ''){
|
|
|
switch ($type_code){
|
|
|
case 'StRollBall'://滚球 正在进行
|
|
|
@@ -876,27 +876,40 @@ class CommonFunction {
|
|
|
|
|
|
break;
|
|
|
case 'StSoon'://即将 今日两小时内开始
|
|
|
- $where = [
|
|
|
- [$model_match.'.status','=','0'],
|
|
|
- [$model_match.'.match_date','=',date("Y-m-d")],
|
|
|
- [$model_match.'.match_time','<',date("H:i:s", strtotime("+2 hour"))],
|
|
|
- [$model_match.'.match_time','>',date("H:i:s", time())]
|
|
|
- /*
|
|
|
- [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
|
|
|
- */
|
|
|
- ];
|
|
|
+ if($p_code == 'kemp'){
|
|
|
+ $where = [
|
|
|
+ [$model_match.'.status','<','2']
|
|
|
+ ];
|
|
|
+ }else{
|
|
|
+ $where = [
|
|
|
+ [$model_match.'.status','=','0'],
|
|
|
+ [$model_match.'.match_date','=',date("Y-m-d")],
|
|
|
+ [$model_match.'.match_time','<',date("H:i:s", strtotime("+2 hour"))],
|
|
|
+ [$model_match.'.match_time','>',date("H:i:s", time())]
|
|
|
+ /*
|
|
|
+ [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
|
|
|
+ */
|
|
|
+ ];
|
|
|
+ }
|
|
|
break;
|
|
|
case 'StToday'://今日 今日未开始未结束
|
|
|
- $where = [
|
|
|
- [$model_match.'.status', '<', '2'],
|
|
|
- [$model_match.'.match_date','=',date("Y-m-d")],
|
|
|
- [$model_match.'.match_time','>',date("H:i:s", time())],
|
|
|
- /*
|
|
|
- [$model_match.'.utime','>',date("Y-m-d").' 00:00:00'],
|
|
|
- [$model_match.'.is_today','=',1],
|
|
|
- [$model_match.'.type', '=', '1'],
|
|
|
- */
|
|
|
- ];
|
|
|
+ if($p_code == 'kemp'){
|
|
|
+ $where = [
|
|
|
+ [$model_match.'.status', '<', '2'],
|
|
|
+ ];
|
|
|
+ }else{
|
|
|
+ $where = [
|
|
|
+ [$model_match.'.status', '<', '2'],
|
|
|
+ [$model_match.'.match_date','=',date("Y-m-d")],
|
|
|
+ [$model_match.'.match_time','>',date("H:i:s", time())],
|
|
|
+ /*
|
|
|
+ [$model_match.'.utime','>',date("Y-m-d").' 00:00:00'],
|
|
|
+ [$model_match.'.is_today','=',1],
|
|
|
+ [$model_match.'.type', '=', '1'],
|
|
|
+ */
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
case 'all'://所有赛事
|
|
|
$where = [
|
|
|
@@ -904,19 +917,25 @@ class CommonFunction {
|
|
|
];
|
|
|
break;
|
|
|
case 'StMorningPlate'://早盘
|
|
|
- //获取当天结束的时间戳
|
|
|
- $endTime = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1;
|
|
|
- $where = [
|
|
|
- [$model_match.'.status', '<', '2'],
|
|
|
- // [$model_match.'.is_morningplate','=',1],
|
|
|
- [$model_match.'.us_time','>',$this->qgmdate('Y-m-d H:i:s',$endTime , -4)],
|
|
|
- /*
|
|
|
- [$model_match.'.match_date','>',date("Y-m-d",time())],
|
|
|
- [$model_match.'.match_time','>',date("H:i:s", time())],
|
|
|
- [$model_match.'.type', '=', '2'],
|
|
|
- [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
|
|
|
- */
|
|
|
- ];
|
|
|
+ if($p_code == 'kemp'){
|
|
|
+ $where = [
|
|
|
+ [$model_match.'.status', '<', '2']
|
|
|
+ ];
|
|
|
+ }else{
|
|
|
+ //获取当天结束的时间戳
|
|
|
+ $endTime = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1;
|
|
|
+ $where = [
|
|
|
+ [$model_match.'.status', '<', '2'],
|
|
|
+ // [$model_match.'.is_morningplate','=',1],
|
|
|
+ [$model_match.'.us_time','>',$this->qgmdate('Y-m-d H:i:s',$endTime , -4)],
|
|
|
+ /*
|
|
|
+ [$model_match.'.match_date','>',date("Y-m-d",time())],
|
|
|
+ [$model_match.'.match_time','>',date("H:i:s", time())],
|
|
|
+ [$model_match.'.type', '=', '2'],
|
|
|
+ [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
|
|
|
+ */
|
|
|
+ ];
|
|
|
+ }
|
|
|
break;
|
|
|
case 'StStringScene'://串场 查询串场状态为1 开赛时间大于当前时间
|
|
|
$where = [
|