vali před 6 roky
rodič
revize
0a6a5cab15

+ 9 - 9
datainf/logic/HttpServerOnlySet.php

@@ -113,9 +113,9 @@ class HttpServerOnlySet
         $this->userMoneyTotal = [];
 
         try {
-            list($order_ids, $bettype, $settype, $game_code, $match_id, $change_status) = $this->requestpara($paras);
+            list($order_ids, $bettype, $settype, $game_code, $match_id, $change_status, $is_manual) = $this->requestpara($paras);
 
-            if (!$this->DataPre($order_ids, $bettype, $settype, $game_code, $match_id, $change_status)) {
+            if (!$this->DataPre($order_ids, $bettype, $settype, $game_code, $match_id, $change_status, $is_manual)) {
                 goto LABDOLAST;
                 throw new  \Exception('没找到订单信息', 110);
             }
@@ -144,7 +144,7 @@ class HttpServerOnlySet
                     'game_code' => $game_code,
                     'match_id' => $match_id,
                     'simplexData' => $nowBuyDatasMainModel,
-                    'matchDatas' => $this->PDatas['Money_buy_Match_array'][$batch_id],
+                    'matchDatas' => $this->PDatas['Money_buy_Match_array'][$order_id],
                     'settelementMidDataID' => isset($this->PDatas['settlement_middle_detail_array'][$bettype][$order_id]) ? $this->PDatas['settlement_middle_detail_array'][$bettype][$order_id]->id : 0,
                     'account' => $this->PDatas['account_map_array'][$account_indent]->account,
                     'money_prize' => isset($this->PDatas['money_prize_map'][$order_id]) ? $this->PDatas['money_prize_map'][$order_id]->id : 0
@@ -540,12 +540,12 @@ class HttpServerOnlySet
 
 
     //数据预批量获取
-    private function DataPre($order_ids, $bettype, $settype, $game_code, $match_id, $change_status)
+    private function DataPre($order_ids, $bettype, $settype, $game_code, $match_id, $change_status, $is_manual)
     {
 
         if ($bettype == 1) {
             $moneytable = 'money_buy_simplex';
-            $ret = DB::table('money_buy_simplex')->where(['game_code' => $game_code, 'match_id' => $match_id])->whereIn('order_id', $order_ids)->get();
+            $ret = DB::table('money_buy_simplex')->where(['game_code' => $game_code, 'match_id' => $match_id, 'is_manual' => $is_manual])->whereIn('order_id', $order_ids)->get();
         } else {
             $moneytable = 'money_buy_str';
             $ret = DB::table('money_buy_str')->whereIn('order_id', $order_ids)->get();
@@ -563,16 +563,16 @@ class HttpServerOnlySet
             $userindentys[] = $val->account_identity;
         }
 
-        $tmpbatchid = array_unique($tmpbatchid);
+        //$tmpbatchid = array_unique($tmpbatchid);
         $userindentys = array_unique($userindentys);
 
         if ($bettype == 1) {
-            $ret = DB::table('money_buy_match')->where(['game_code' => $game_code, 'match_id' => $match_id, 'bet_type' => 1])->whereIn('batch_id', $tmpbatchid)->get();
+            $ret = DB::table('money_buy_match')->where(['game_code' => $game_code, 'match_id' => $match_id, 'bet_type' => 1])->whereIn('order_id', $orderarr)->get();
         } else {
-            $ret = DB::table('money_buy_match')->where(['game_code' => $game_code, 'bet_type' => 2])->whereIn('batch_id', $tmpbatchid)->get();
+            $ret = DB::table('money_buy_match')->where(['game_code' => $game_code, 'bet_type' => 2])->whereIn('order_id', $orderarr)->get();
         }
         foreach ($ret as $val) {
-            $this->PDatas['Money_buy_Match_array'][$val->batch_id][] = $val;
+            $this->PDatas['Money_buy_Match_array'][$val->order_id][] = $val;
         }
 
 

+ 7 - 8
datainf/logic/HttpServerSettelement.php

@@ -278,8 +278,7 @@ class HttpServerSettelement
     private function doSettelementIntoRedis($request, $response, $paras)
     {
         try {
-            list($order_ids, $bettype, $settype, $game_code, $match_id, $change_status) = $tmp = $this->requestpara($request, $response, $paras);
-
+            list($order_ids, $bettype, $settype, $game_code, $match_id, $change_status, $is_manual) = $tmp = $this->requestpara($request, $response, $paras);
 
             if (empty($order_ids)) {
                 goto LABRETURN;
@@ -304,7 +303,7 @@ class HttpServerSettelement
             $redis = new \Redis();
             foreach ($PageOrder_ids_1 as $p_order_ids) {
                 $nowchange_status = ($i == 1) ? $change_status : 0;
-                $data = json_encode(['ids' => $p_order_ids, 'bettype' => $bettype, 'settype' => $settype, 'game_code' => $game_code, 'match_id' => $match_id, 'change_status' => $nowchange_status], 256);
+                $data = json_encode(['ids' => $p_order_ids, 'bettype' => $bettype, 'settype' => $settype, 'game_code' => $game_code, 'match_id' => $match_id, 'change_status' => $nowchange_status, 'is_manual' => $is_manual], 256);
                 //go(function () use ($data, $redisconfig) {
                 // $redis = new Swoole\Coroutine\Redis();
                 $ret = $redis->connect($redisconfig['host'], $redisconfig['port']);
@@ -340,13 +339,13 @@ class HttpServerSettelement
 
         }
 
-
     }
 
     private function requestpara($request, $response, $paras)
     {
         $bettype = isset($paras['bettype']) ? $paras['bettype'] : 0;
         $settype = isset($paras['settype']) ? $paras['settype'] : 0;
+        $is_manaue = isset($paras['is_manual']) ? $paras['is_manual'] : 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;
@@ -378,17 +377,17 @@ class HttpServerSettelement
             throw  new \Exception('结算参数错误', 1111);
         }
 
-        $ret = [$order_ids, $bettype, $settype, $game_code, $match_id, $change_status];
+        $ret = [$order_ids, $bettype, $settype, $game_code, $match_id, $change_status, $is_manaue];
 
-        unset($bettype, $idoarr, $settype, $game_code, $match_id, $change_status);
+        unset($bettype, $idoarr, $settype, $game_code, $match_id, $change_status, $is_manaue);
         return $ret;
     }
 
-    private function getOrders($bet_type, $game_code, $match_id)
+    private function getOrders($bet_type, $game_code, $match_id, $is_manual)
     {
         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();
+            $ret = DB::table($table)->select('order_id')->where(['game_code' => $game_code, 'match_id' => $match_id, 'is_manual' => $is_manual])->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();