vali 6 年之前
父節點
當前提交
8744256f23
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      app/Logic/WinfailLogic.php

+ 6 - 5
app/Logic/WinfailLogic.php

@@ -215,13 +215,13 @@ class WinfailLogic
         $AdapterObj = $this->getAdapterObj($game_code);
         $AdapterObj = $this->getAdapterObj($game_code);
         $RefClass = new  \ReflectionClass($AdapterObj);
         $RefClass = new  \ReflectionClass($AdapterObj);
 
 
-        $fun1 = $orderInfo->odds_code;
-        $fun2 = $orderInfo->p_code;
-
         $result = json_decode($orderInfo->single_result, true);
         $result = json_decode($orderInfo->single_result, true);
         $winorfalsedef = ['result' => 2, 'matchResult' => 'noRuleOrError'];
         $winorfalsedef = ['result' => 2, 'matchResult' => 'noRuleOrError'];
 
 
         foreach ($matchArray as $matchModel) {
         foreach ($matchArray as $matchModel) {
+            $fun1 = $matchModel->odds_code;
+            $fun2 = $matchModel->p_code;
+            
             $mid = $matchModel->id;
             $mid = $matchModel->id;
             try {
             try {
                 if ($RefClass->hasMethod($fun1)) {
                 if ($RefClass->hasMethod($fun1)) {
@@ -229,10 +229,11 @@ class WinfailLogic
                 } elseif ($RefClass->hasMethod($fun2)) {
                 } elseif ($RefClass->hasMethod($fun2)) {
                     $winorfalse = $AdapterObj->$fun2($matchModel, $result, []);
                     $winorfalse = $AdapterObj->$fun2($matchModel, $result, []);
                 }
                 }
-            } catch (\Exception $e) {
 
 
+            } catch (\Exception $e) {
+                echo 'excetption: ' . print_r([$order_id, $e->getMessage(), $e->getFile(), $e->getLine()], true) . "\n";
             }
             }
-
+            echo 'winforret: ' . print_r($winorfalse, true) . "\n";
             if (!isset($winorfalse['result']) || !isset($winorfalse['matchResult']) || !in_array($winorfalse['result'], [-1, 1, 2, 3, 4])) {
             if (!isset($winorfalse['result']) || !isset($winorfalse['matchResult']) || !in_array($winorfalse['result'], [-1, 1, 2, 3, 4])) {
                 $winorfalse = $winorfalsedef;
                 $winorfalse = $winorfalsedef;
             }
             }