1.新增获取充值/提现配置接口/api/finance/depositWithdrawConfig
2.优化充值和提现方式
This commit is contained in:
@@ -29,7 +29,7 @@ final class GameRecordStatService
|
||||
|
||||
if ($status !== 4) {
|
||||
Db::name('game_record')->where('id', $recordId)->update([
|
||||
'platform_profit_amount' => '0.0000',
|
||||
'platform_profit_amount' => '0.00',
|
||||
'winner_user_count' => 0,
|
||||
'update_time' => $now,
|
||||
]);
|
||||
@@ -45,8 +45,8 @@ final class GameRecordStatService
|
||||
$resultNum = (int) $resultRaw;
|
||||
|
||||
$bets = Db::name('bet_order')->where('period_id', $recordId)->select()->toArray();
|
||||
$totalBet = '0.0000';
|
||||
$totalPayout = '0.0000';
|
||||
$totalBet = '0.00';
|
||||
$totalPayout = '0.00';
|
||||
$winnerUserIds = [];
|
||||
|
||||
foreach ($bets as $bet) {
|
||||
@@ -55,16 +55,16 @@ final class GameRecordStatService
|
||||
continue;
|
||||
}
|
||||
$tb = (string) ($bet['total_amount'] ?? '0');
|
||||
$totalBet = bcadd($totalBet, $tb, 4);
|
||||
$totalBet = bcadd($totalBet, $tb, 2);
|
||||
|
||||
if ($st === 2) {
|
||||
$payout = bcadd((string) ($bet['win_amount'] ?? '0'), (string) ($bet['jackpot_extra_amount'] ?? '0'), 4);
|
||||
$payout = bcadd((string) ($bet['win_amount'] ?? '0'), (string) ($bet['jackpot_extra_amount'] ?? '0'), 2);
|
||||
} else {
|
||||
$payout = self::estimatePayoutForBet($bet, $resultNum);
|
||||
}
|
||||
|
||||
$totalPayout = bcadd($totalPayout, $payout, 4);
|
||||
if (bccomp($payout, '0', 4) > 0) {
|
||||
$totalPayout = bcadd($totalPayout, $payout, 2);
|
||||
if (bccomp($payout, '0', 2) > 0) {
|
||||
$uid = (int) ($bet['user_id'] ?? 0);
|
||||
if ($uid > 0) {
|
||||
$winnerUserIds[$uid] = true;
|
||||
@@ -72,7 +72,7 @@ final class GameRecordStatService
|
||||
}
|
||||
}
|
||||
|
||||
$profit = bcsub($totalBet, $totalPayout, 4);
|
||||
$profit = bcsub($totalBet, $totalPayout, 2);
|
||||
|
||||
Db::name('game_record')->where('id', $recordId)->update([
|
||||
'platform_profit_amount' => $profit,
|
||||
@@ -96,12 +96,12 @@ final class GameRecordStatService
|
||||
$pickNumbers = [];
|
||||
}
|
||||
if (!in_array($resultNumber, array_map('intval', $pickNumbers), true)) {
|
||||
return '0.0000';
|
||||
return '0.00';
|
||||
}
|
||||
$total = (string) ($bet['total_amount'] ?? '0');
|
||||
$streak = (int) ($bet['streak_at_bet'] ?? 0);
|
||||
$odds = StreakWinReward::totalOddsMultiplierForStreakAtBet($streak);
|
||||
|
||||
return bcmul($total, $odds, 4);
|
||||
return bcmul($total, $odds, 2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user