|
|
@@ -14,7 +14,7 @@ use datainf\lib\GlobConfigs;
|
|
|
use Illuminate\Database\Capsule\Manager as DB;
|
|
|
use swoole;
|
|
|
use App\Lib\Settlement\SettlementBase;
|
|
|
-
|
|
|
+use App\Http\Response\Response;
|
|
|
|
|
|
class HttpServerOnlySet
|
|
|
{
|
|
|
@@ -142,7 +142,7 @@ class HttpServerOnlySet
|
|
|
'bet_type' => $bettype,
|
|
|
'set_type' => $settype,
|
|
|
'order_id' => $order_id,
|
|
|
- 'game_code' => $nowBuyDatasMainModel->game_code,
|
|
|
+ 'game_code' => $game_code,
|
|
|
'match_id' => $match_id,
|
|
|
'simplexData' => $nowBuyDatasMainModel,
|
|
|
'matchDatas' => $this->PDatas['Money_buy_Match_array'][$batch_id],
|
|
|
@@ -452,19 +452,16 @@ class HttpServerOnlySet
|
|
|
|
|
|
$chuanNum = intval(substr($simplexData->str_type, 0, 1));
|
|
|
$lasPeilv = $settlementBase->stringComputing([$in_array, $chuanNum]);
|
|
|
- $money = floatPointDigit($this->BuyDatasMainModel->money * $lasPeilv);
|
|
|
+ $money = floatPointDigit($simplexData->money * $lasPeilv);
|
|
|
|
|
|
} else {
|
|
|
$money = $simplexData->money;
|
|
|
}
|
|
|
|
|
|
$this->PushSqlToArray(" update money_buy_str set settle_status=2 , game_status=1 , settlementTime='$newTime' , gain_money=$money where order_id = '$order_id'");
|
|
|
-
|
|
|
- $this->WriteOrAddSettlement($this->game_code, $this->match_id, $this->orderType, $order_id, $this->BuyDatasMainModel->account_identity, $money);
|
|
|
-
|
|
|
+ $this->WriteOrAddSettlement($game_code, $match_id, $bet_type, $order_id, $account_identity, $money);
|
|
|
$useraccident = $this->BuyDatasMainModel->account_identity;
|
|
|
$this->userMoneyTotal[$useraccident] = isset($this->account_identity[$useraccident]) ? $this->account_identity[$useraccident] + $money : $money;
|
|
|
-
|
|
|
$this->insertData($order_id, $money, $this->BuyDatasMainModel->account_identity, 2, $val->game_code, $this->BuyDatasMainModel->info_identity, $this->BuyDatasMainModel->money, $this->match_id, $account, $money_prize);
|
|
|
|
|
|
return true;
|
|
|
@@ -556,14 +553,15 @@ class HttpServerOnlySet
|
|
|
$userindentys = array_unique($userindentys);
|
|
|
|
|
|
if ($bettype == 1) {
|
|
|
- $ret = DB::table('money_buy_match')->where(['game_code' => $game_code, 'match_id' => $match_id])->whereIn('batch_id', $tmpbatchid)->get();
|
|
|
+ $ret = DB::table('money_buy_match')->where(['game_code' => $game_code, 'match_id' => $match_id, 'bet_type' => 1])->whereIn('batch_id', $tmpbatchid)->get();
|
|
|
} else {
|
|
|
- $ret = DB::table('money_buy_match')->where(['game_code' => $game_code])->whereIn('batch_id', $tmpbatchid)->get();
|
|
|
+ $ret = DB::table('money_buy_match')->where(['game_code' => $game_code, 'bet_type' => 2])->whereIn('batch_id', $tmpbatchid)->get();
|
|
|
}
|
|
|
foreach ($ret as $val) {
|
|
|
$this->PDatas['Money_buy_Match_array'][$val->batch_id][] = $val;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
$ret = DB::table('account_detailed')->whereIn('account_identity', $userindentys)->get();
|
|
|
foreach ($ret as $val) {
|
|
|
$this->PDatas['account_indentity_map_array'][$val->account_identity] = $val;
|