vali 6 tahun lalu
induk
melakukan
f39c90c94f
3 mengubah file dengan 51 tambahan dan 4 penghapusan
  1. 18 0
      app/Logic/WinfailLogic.php
  2. 17 4
      datainf/logic/HttpServerSettelement.php
  3. 16 0
      readme.txt

+ 18 - 0
app/Logic/WinfailLogic.php

@@ -201,5 +201,23 @@ 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);
+    }
+
 
 }

+ 17 - 4
datainf/logic/HttpServerSettelement.php

@@ -267,16 +267,22 @@ class HttpServerSettelement
 
     private function requestpara($request, $response, $paras)
     {
-        $idoarr = explode(",", $paras['order_ids']);
-        $order_ids = array_map(function ($i) {
-            return strval($i);
-        }, $idoarr);
         $bettype = isset($paras['bettype']) ? $paras['bettype'] : 0;
         $settype = isset($paras['settype']) ? $paras['settype'] : 0;
         $game_code = isset($paras['game_code']) ? $paras['game_code'] : '';
         $match_id = isset($paras['match_id']) ? $paras['match_id'] : 0;
         $change_status = isset($paras['change_status']) ? $paras['change_status'] : 0;
 
+        if (empty($paras['order_ids'])) {
+            $idoarr = $this->getOrders($bettype, $game_code, $match_id);
+        } else {
+            $idoarr = explode(",", $paras['order_ids']);
+        }
+
+        $order_ids = array_map(function ($i) {
+            return strval($i);
+        }, $idoarr);
+
         if (intval($match_id) <= 0) {
             throw  new \Exception('赛事ID不能为空!');
             return;
@@ -300,6 +306,13 @@ class HttpServerSettelement
         return $ret;
     }
 
+    private function getOrders($bet_type, $game_type, $match_id)
+    {
+        $logic_obj = new WinfailLogic();
+        $ids = $logic_obj->get_orderIds($bet_type, $game_type, $match_id);
+        return $ids;
+    }
+
 
     private function Match_check($idsArray, $betType)
     {

+ 16 - 0
readme.txt

@@ -16,6 +16,22 @@ bootSetOnly.php  订单业务 服务启动脚本
 bootRedisToSql.php   订单业务之把redis库的sql语句批量执行 服务启动脚本
 
 
+cd  /home/swooleProV2/dataInterface/command
+
+ps -ef | grep  bootDbPoole | awk '{print $1}' | sort -n | head -n 1 |  xargs  kill
+php bootDbPoole.php
+
+ps -ef | grep  bootHttp | awk '{print $1}' | sort -n | head -n 1 |  xargs  kill
+php bootHttp.php
+
+ps -ef | grep  bootSetOnly | awk '{print $1}' | sort -n | head -n 1 |  xargs  kill
+php bootSetOnly.php
+
+ps -ef | grep  bootSettelementHttp | awk '{print $1}' | sort -n | head -n 1 |  xargs  kill
+php bootSettelementHttp.php
+
+ps -ef | grep  bootRedisToSql | awk '{print $1}' | sort -n | head -n 1 |  xargs  kill
+php bootRedisToSql.php