소스 검색

追加推送 5/8

彭俊 6 년 전
부모
커밋
d07384e7aa

+ 5 - 0
Application/Api/Controller/BetOrder.php

@@ -259,6 +259,11 @@ class Betorder extends BaseController{
             $msg = '第'.$num.'条'.lang('Errors','Api')->get('error-5103');
             Render([], '5103',$msg);
         }
+        $info = $info->toarray();
+        if($info['status'] == 2){
+            $msg = '第'.$num.'条'.lang('Errors','Api')->get('error-5108');
+            Render([], '5108',$msg);
+        }
         return $info;
     }
 

+ 1 - 0
Application/Api/Model/AccountDetail.php

@@ -90,6 +90,7 @@ class AccountDetail extends Model {
         if (move_uploaded_file($img['tmp_name'], $filePath . $imgName . ".png")) {
             $updateWhere['account_identity'] = $userInfo['identity'];
             $oldImg = lm('Account_detailed', 'commons') -> accountDetailed(['img_url'], $updateWhere);
+            // 删除以前的文件
             unlink(ROOT_PATH . $oldImg -> img_url);
             lm('Account_detailed', 'commons') -> updateDetailed($updateWhere, ['img_url' => $imgPath]);
         } else {

+ 6 - 1
Application/Sports/Controller/MatchList.php

@@ -775,9 +775,14 @@ class  MatchList extends Controller {
                 $matchData->match_score = $result->match_score;
 
             }
+
+            //赛事已结束
+            if($matchData->status ==2){
+                $oddsData = [];
+            }
             //查询当前联赛下的赛事
             $league = [];
-            if($status != 1){
+            if($oddsType != 'StRollBall'){
                 $league = lm($model_match,'Sports')
                     ->select('match_id','home_team','guest_team')
                     ->where($this->source)

+ 3 - 2
Biz/Game/GameLogic.php

@@ -240,8 +240,9 @@ class GameLogic
             'userame' => $this->wagetnModel->agent_pre.$this->paras['username'],
             'gametype' =>  isset($this->paras['gametype']) ?  trim(  $this->paras['gametype'] ) : '',
             'gamekind' =>  isset($this->paras['gamekind']) ?  trim(  $this->paras['gamekind'] ) : '',
-            'iframe' =>  isset($this->paras['iframe']) ?  trim(  $this->paras['iframe'] ) : -1 ,
+            'iframe' =>  isset($this->paras['iframe']) ?  intval(trim(  $this->paras['iframe'] )) : -1 ,
             'platformname' =>  isset($this->paras['platformname']) ?  trim(  $this->paras['platformname'] ) : '',
+            'lang' =>  isset($this->paras['lang']) ?  trim(  $this->paras['lang'] ) : '',
             'ip'=> GETIP(),
         ];
         $model = new Wagent_clientgame_logModel();
@@ -290,7 +291,7 @@ class GameLogic
     //获取某人体育游戏的统计数据
     public  function   getMoneyBuyData($account,$databegin,$dataend){
         $db = $GLOBALS['DB'] ;
-        $ret1 = $db->select("select  count(id) as counts,sum(money) as money, sum(prize_money) as  money_buy   from  money_buy  where account_name=:account and  status in (1,2) and  money_time>=:timebegin and money_time<=:timeend  group by account_name ;",['account'=>$account,'timebegin'=>$databegin,'timeend'=>$dataend]);
+        $ret1 = $db->select("select  count(id) as counts,sum(money) as money, sum(prize_money) as  money_buy   from  money_buy_simplex  where account_name=:account and  status in (1,2) and  money_time>=:timebegin and money_time<=:timeend  group by account_name ;",['account'=>$account,'timebegin'=>$databegin,'timeend'=>$dataend]);
         $ret2 = $db->select("select  count(id) as counts,sum(money) as money, sum(prize_money) as  money_buy   from  money_buy_str  where account_name=:account and  status in (1,2) and  money_time>=:timebegin and money_time<=:timeend  group by account_name ;",['account'=>$account,'timebegin'=>$databegin,'timeend'=>$dataend]);
 
         $ret = ['counts'=>0,'money'=>0,'prize_money'=>0] ;

+ 7 - 2
Biz/Game/SportbetRecordLogic.php

@@ -36,9 +36,14 @@ class SportbetRecordLogic
 
 
     public  function  dorun(){
-        $buyModel = lm("Money_buy",'Commons')->where(['order_id'=>$this->vendorid,'settle_status'=>$this->isjs])->first();
+        $buyModel = lm("Money_buy_simplex",'Commons')->where(['order_id'=>$this->vendorid,'settle_status'=>$this->isjs])->first();
 
-        if ( !$buyModel ) { return  false; }
+        if ( empty($buyModel) ) {
+            $buyModel = lm("Money_buy_str",'Commons')->where(['order_id'=>$this->vendorid,'settle_status'=>$this->isjs])->first();
+            if (empty($buyModel)){
+                return  false;
+            }
+        }
         $this->buyModel = $buyModel ;
 
 

+ 6 - 2
Biz/Match/GetmatchData.php

@@ -187,6 +187,7 @@ class GetmatchData {
                 }
                 $c_s = array_slice($zu['concede_size'],0,4);//让球/大小 前四条 放入
                 $capot = $zu['capot'];//独赢
+                $capot = [$capot[0],$capot[2],$capot[1]];//排序
 
                 $data[$k]['matchData'][$kk]['oddsData'] = [$c_s,$capot];
             }
@@ -236,6 +237,7 @@ class GetmatchData {
                 ->where($source)
                 ->where($model_match.'.lg_id',$v['lg_id'])
                 ->where($where)
+                ->orderBy('match_time','asc')
                 ->get()
                 ->toarray();
         }
@@ -829,7 +831,6 @@ class GetmatchData {
      * 获取所有即将开赛 数据
      */
     public function getAllSoon($source,$where){
-
         $game = lm('GameType', 'Sports')->select('id','game_name','game_code','game_ico_url')->where('status',1)->get()->toArray();
 
         $data=[];
@@ -841,7 +842,9 @@ class GetmatchData {
                     ->select('match_id','home_team','guest_team','match_time')
                     ->where($source)
                     ->where($where)
-//                    ->limit(6)
+                    ->orderBy('match_time','asc')
+
+                    //                    ->limit(6)
                     ->get()->toArray();
                 $matchNum = count($matchData);
 
@@ -853,6 +856,7 @@ class GetmatchData {
                 }
 
                 if($matchNum > 0){
+//                    $matchData = array_multisort(array_column($matchData,'wait_time'),SOTR_ASC,$matchData);
                     $data[$item['game_code']]['matchData'] = $matchData;
                     $data[$item['game_code']]['matchNum'] = $matchNum;
                     $data[$item['game_code']]['gameName'] = $item['game_name'];