|
|
@@ -126,6 +126,10 @@ class HttpServerSettelement
|
|
|
return $this->doWinFailse($request, $response, $paras);
|
|
|
}
|
|
|
|
|
|
+ if ($request_uri == 'WinFailOneOrder') {
|
|
|
+ return $this->WinFailOneOrder($request, $response, $paras);
|
|
|
+ }
|
|
|
+
|
|
|
if ($request_uri == 'Settelement') {
|
|
|
return $this->doSettelementIntoRedis($request, $response, $paras);
|
|
|
}
|
|
|
@@ -146,6 +150,55 @@ class HttpServerSettelement
|
|
|
return $tokenvel;
|
|
|
}
|
|
|
|
|
|
+ //对单个订单的赛事结果进行过手动更改的订单,单独进行输赢判断处理
|
|
|
+ private function WinFailOneOrder($request, $response, $paras)
|
|
|
+ {
|
|
|
+ $orderid = isset($paras['order_id']) ? $paras['order_id'] : '';
|
|
|
+ if (empty($orderid)) {
|
|
|
+ $data = Response::generate('', 10, $paras, 'order_id is empty');
|
|
|
+ $response->end($data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $orderInfo = DB::table('money_buy_simplex')->where(['order_id' => $orderid])->first();
|
|
|
+ if (empty($orderInfo)) {
|
|
|
+ $data = Response::generate('', 10, $paras, 'order info empty');
|
|
|
+ $response->end($data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if ($orderInfo->result_flag != 1) {
|
|
|
+ $data = Response::generate('', 10, $paras, 'result_flag !=1');
|
|
|
+ $response->end($data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ $match_datas = DB::table('money_buy_match')->where(['batch_id' => $orderInfo->batch_id, 'bet_type' => 1])->get();
|
|
|
+ if (count($match_datas) <= 0) {
|
|
|
+ $data = Response::generate('', 10, $paras, 'match info empty');
|
|
|
+ $response->end($data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $logic_obj = new WinfailLogic();
|
|
|
+ $result = $logic_obj->getCompResult($orderInfo->game_code, $orderInfo->match_id);
|
|
|
+ if (count($result) <= 0) {
|
|
|
+ $data = Response::generate('', 10, $paras, 'result empty');
|
|
|
+ $response->end($data);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ try {
|
|
|
+ $logic_obj->WinFailOneOrder($orderInfo, $match_datas, $result['0']);
|
|
|
+ $data = Response::generate('', 1, ['cost' => (microtime(true) - $request->server['request_time_float'])], 'succes ');
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ $data = Response::generate('', 10, '', $e->getMessage() . '--' . $e->getFile() . '--' . $e->getLine());
|
|
|
+ }
|
|
|
+
|
|
|
+ unset($logic_obj, $match_datas, $orderInfo);
|
|
|
+ $response->end($data);
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//胜负计算
|
|
|
private function doWinFailse($request, $response, $paras)
|
|
|
@@ -210,7 +263,7 @@ class HttpServerSettelement
|
|
|
|
|
|
try {
|
|
|
list($order_ids, $bettype, $settype, $game_code, $match_id, $change_status) = $tmp = $this->requestpara($request, $response, $paras);
|
|
|
-
|
|
|
+
|
|
|
if (empty($order_ids)) {
|
|
|
goto LABRETURN;
|
|
|
}
|