|
|
@@ -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();
|