vali 6 years ago
parent
commit
a1cbc696ff
3 changed files with 35 additions and 21 deletions
  1. 19 0
      app/Logic/SettelementLogic.php
  2. 1 17
      app/Logic/WinfailLogic.php
  3. 15 4
      datainf/logic/HttpServerSettelement.php

+ 19 - 0
app/Logic/SettelementLogic.php

@@ -494,4 +494,23 @@ trait SettelementLogic
     }
 
 
+    private function getOrders($bet_type, $game_code, $match_id)
+    {
+        if ($bet_type == 1) {
+            $table = 'money_buy_simplex';
+            $ret = DB::table($table)->select('order_id')->where(['game_code' => $game_code, 'match_id' => $match_id])->get();
+        } else {
+            $table = 'money_buy_str';
+            $ret = DB::table($table)->select('order_id')->whereRaw(" batch_id in ( select batch_id  from  money_buy_match where match_id=$match_id and  game_code='$game_code' and bet_type=2 )")->get();
+        }
+        $return = [];
+        if ($ret) {
+            foreach ($ret as $val) {
+                $return[] = $val->order_id;
+            }
+        }
+        return implode(',', $return);
+    }
+
+
 }

+ 1 - 17
app/Logic/WinfailLogic.php

@@ -201,23 +201,7 @@ class WinfailLogic
         return $return;
     }
 
-    public function get_orderIds($bet_type, $game_code, $match_id)
-    {
-        if ($bet_type == 1) {
-            $table = 'money_buy_simplex';
-            $ret = DB::table($table)->select('order_id')->where(['game_code' => $game_code, 'match_id' => $match_id])->get();
-        } else {
-            $table = 'money_buy_str';
-            $ret = DB::table($table)->select('order_id')->whereRaw(" batch_id in ( select batch_id  from  money_buy_match where match_id=$match_id and  game_code='$game_code' and bet_type=2 )")->get();
-        }
-        $return = [];
-        if ($ret) {
-            foreach ($ret as $val) {
-                $return[] = $val->order_id;
-            }
-        }
-        return implode(',', $return);
-    }
+   
 
 
 }

+ 15 - 4
datainf/logic/HttpServerSettelement.php

@@ -306,11 +306,22 @@ class HttpServerSettelement
         return $ret;
     }
 
-    private function getOrders($bet_type, $game_type, $match_id)
+    private function getOrders($bet_type, $game_code, $match_id)
     {
-        $logic_obj = new WinfailLogic();
-        $ids = $logic_obj->get_orderIds($bet_type, $game_type, $match_id);
-        return $ids;
+        if ($bet_type == 1) {
+            $table = 'money_buy_simplex';
+            $ret = DB::table($table)->select('order_id')->where(['game_code' => $game_code, 'match_id' => $match_id])->get();
+        } else {
+            $table = 'money_buy_str';
+            $ret = DB::table($table)->select('order_id')->whereRaw(" batch_id in ( select batch_id  from  money_buy_match where match_id=$match_id and  game_code='$game_code' and bet_type=2 )")->get();
+        }
+        $return = [];
+        if ($ret) {
+            foreach ($ret as $val) {
+                $return[] = $val->order_id;
+            }
+        }
+        return implode(',', $return);
     }