Browse Source

异常处理

彭俊 6 years ago
parent
commit
67586f5a89

+ 4 - 4
app/Models/MoneyBuyStr.php

@@ -390,14 +390,14 @@ class MoneyBuyStr extends BaseModel
     }
 
     //获取串式注单信息
-    public function strmatchs()
+    public function strmatchs($game_code)
     {
-        $match = \App\Models\MoneyBuyMatch::select('match_id', 'batch_id')->where('bet_type', 2)->get()->toArray();
-        $str = $this->select('order_id', 'batch_id')->get()->toArray();
+        $match = \App\Models\MoneyBuyMatch::select('match_id', 'order_id')->where('bet_type', 2)->where('game_code',$game_code)->get()->toArray();
+        $str = $this->select('order_id')->get()->toArray();
         for ($i = 0; $i < count($str); $i++) {
             $str[$i]['match_ids'] = array();
             for ($j = 0; $j < count($match); $j++) {
-                if ($str[$i]['batch_id'] == $match[$j]['batch_id']) {
+                if ($str[$i]['order_id'] == $match[$j]['order_id']) {
                     $str[$i]['match_ids'][] = $match[$j]['match_id'];
                 }
             }

+ 8 - 2
app/Models/SportsNoteList.php

@@ -140,8 +140,8 @@ class SportsNoteList extends BaseModel
                 //反水
                 $v->water_return = commonFunction::filter_by_value($water_return_money,'trade_id',$v->order_id)['money'];
                 //根据输赢 拼接结果金额  
-                //默认 结果为反水
-                $v->result = $v->water_return;
+                //默认 结果为0 
+                $v->result = 0;//$v->water_return;
                 if($contentData['result'] == '赢'){
                     //反水+预期中奖金额+投注金额
                     $v->result = $v->water_return + $v->money + $v->prize_money;
@@ -328,6 +328,12 @@ class SportsNoteList extends BaseModel
          
         }
 
+        //棒球
+        if($gameCode == 'bq'){
+            //得分最后一位数
+            $ScoreTitle_dfNum = commonFunction::checkstr($oddsName,'得分最后一位数');
+        }
+
         return $ScoreTitle;
     }
 

+ 1 - 1
app/Models/Stbqresult.php

@@ -22,7 +22,7 @@ class Stbqresult extends BaseModel {
         $newsim = new \App\Models\SportsNoteList();
         $simplex = $newsim->getsim('bq');
         $newstr = new \App\Models\MoneyBuyStr();
-        $str = $newstr->strmatchs();
+        $str = $newstr->strmatchs('bq');
         //print_r($str);exit;
         for ($i=0; $i < count($data); $i++) {
             $data[$i]->numsim = 0;

+ 1 - 1
app/Models/Stlqresult.php

@@ -19,7 +19,7 @@ class Stlqresult extends BaseModel
         $newsim = new \App\Models\SportsNoteList();
         $simplex = $newsim->getsim('lq');
         $newstr = new \App\Models\MoneyBuyStr();
-        $str = $newstr->strmatchs();
+        $str = $newstr->strmatchs('lq');
         //print_r($str);exit;
         for ($i=0; $i < count($data); $i++) {
             $data[$i]->numsim = 0;

+ 1 - 1
app/Models/Stwqresult.php

@@ -20,7 +20,7 @@ class Stwqresult extends Model
         $newsim = new \App\Models\SportsNoteList();
         $simplex = $newsim->getsim('wq');
         $newstr = new \App\Models\MoneyBuyStr();
-        $str = $newstr->strmatchs();
+        $str = $newstr->strmatchs('wq');
         //print_r($str);exit;
         for ($i=0; $i < count($data); $i++) {
             $data[$i]->numsim = 0;

+ 1 - 1
app/Models/Stzqresult.php

@@ -19,7 +19,7 @@ class Stzqresult extends BaseModel
         $newsim = new \App\Models\SportsNoteList();
         $simplex = $newsim->getsim('zq');
         $newstr = new \App\Models\MoneyBuyStr();
-        $str = $newstr->strmatchs();
+        $str = $newstr->strmatchs('zq');
         //print_r($str);exit;
         for ($i=0; $i < count($data); $i++) {
             $data[$i]->newstime = date("Y-m-d H:i:s");