1.优化game_config

2.备份MySQL数据库
This commit is contained in:
2026-04-28 15:50:16 +08:00
parent 9bc439ea5e
commit a033bf47b6
9 changed files with 1324 additions and 1 deletions

View File

@@ -60,7 +60,8 @@ class Game extends MobileBase
'bet_config' => [
'pick_max_number_count' => $this->getPickMaxNumberCount(),
'chips' => ['1.00', '5.00', '10.00', '25.00', '50.00', '100.00'],
'single_number_max_bet' => $this->getConfigValue('single_number_max_bet', '500.00'),
'min_bet_per_number' => $this->getConfigValue('min_bet_per_number', '0.0100'),
'max_bet_per_number' => $this->getConfigValue('max_bet_per_number', '10000.0000'),
],
'dictionary' => $items,
'user_snapshot' => [
@@ -154,6 +155,17 @@ class Game extends MobileBase
return $this->mobileError(1003, 'Invalid parameter value');
}
$singleAmount = bcadd($singleBetAmount, '0', 2);
$minPer = trim((string) $this->getConfigValue('min_bet_per_number', '0.0100'));
$maxPer = trim((string) $this->getConfigValue('max_bet_per_number', '10000.0000'));
if (!is_numeric($minPer) || bccomp($minPer, '0', 4) <= 0) {
$minPer = '0.0100';
}
if (!is_numeric($maxPer) || bccomp($maxPer, $minPer, 4) < 0) {
$maxPer = '10000.0000';
}
if (bccomp($singleAmount, $minPer, 4) < 0 || bccomp($singleAmount, $maxPer, 4) > 0) {
return $this->mobileError(1003, 'Bet amount out of range');
}
$numberCount = (string) count($numbers);
$totalAmount = bcmul($singleAmount, $numberCount, 2);