fix: 잠시동안 KVStorage에서 소문자만 쓴다고 가정

This commit is contained in:
2022-04-25 00:48:00 +09:00
parent acd5a4096d
commit 889c524049
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ switch ($admin['tnmt_type']) {
throw new \RuntimeException('Invalid tnmt_type'); throw new \RuntimeException('Invalid tnmt_type');
} }
$bettingID = $gameStor->lastTournamentBettingID ?? 0; $bettingID = $gameStor->last_tournament_betting_id ?? 0;
$myBet = []; $myBet = [];
$globalBet = []; $globalBet = [];
+1 -1
View File
@@ -59,7 +59,7 @@ switch ($admin['tnmt_type']) {
} }
$bettingID = $gameStor->lastTournamentBettingID ?? 0; $bettingID = $gameStor->last_tournament_betting_id ?? 0;
if ($bettingID != 0) { if ($bettingID != 0) {
$betting = $bettingID != 0 ? new Betting($bettingID) : null; $betting = $bettingID != 0 ? new Betting($bettingID) : null;
$info = $betting->getInfo(); $info = $betting->getInfo();
+7 -7
View File
@@ -9,7 +9,7 @@ function processTournament()
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'tnmt_auto', 'tnmt_time', 'lastTournamentBettingID']); $admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'tnmt_auto', 'tnmt_time', 'last_tournament_betting_id']);
$now = new \DateTime(); $now = new \DateTime();
$offset = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp(); $offset = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp();
@@ -94,7 +94,7 @@ function processTournament()
startBetting($type, $unit); startBetting($type, $unit);
break; break;
case 6: //베팅중 case 6: //베팅중
$bettingID = $admin['lastTournamentBettingID']; $bettingID = $admin['last_tournament_betting_id'];
$betting = new Betting($bettingID); $betting = new Betting($bettingID);
$betting->closeBetting(); $betting->closeBetting();
$tnmt = 7; $tnmt = 7;
@@ -380,7 +380,7 @@ function startTournament($auto, $type)
$gameStor->tnmt_time = (new \DateTimeImmutable())->add(new \DateInterval("PT{$unit}M"))->format('Y-m-d H:i:s'); $gameStor->tnmt_time = (new \DateTimeImmutable())->add(new \DateInterval("PT{$unit}M"))->format('Y-m-d H:i:s');
$gameStor->tournament = 1; $gameStor->tournament = 1;
$gameStor->tnmt_type = $type; $gameStor->tnmt_type = $type;
$gameStor->lastTournamentBettingID = 0; $gameStor->last_tournament_betting_id = 0;
$gameStor->phase = 0; $gameStor->phase = 0;
$db->update('general', [ $db->update('general', [
@@ -481,7 +481,7 @@ function startBetting($type, $unit)
$betting = new Betting($bettingID); $betting = new Betting($bettingID);
$gameStor->lastTournamentBettingID = $bettingID; $gameStor->last_tournament_betting_id = $bettingID;
$betGold = Util::valueFit(floor((3 + $year - $startyear) * 0.334) * 10, 10); $betGold = Util::valueFit(floor((3 + $year - $startyear) * 0.334) * 10, 10);
@@ -1029,7 +1029,7 @@ function setGift($tnmt_type, $tnmt, $phase)
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['year', 'month', 'develcost', 'lastTournamentBettingID']); $admin = $gameStor->getValues(['year', 'month', 'develcost', 'last_tournament_betting_id']);
$resultHelper = []; $resultHelper = [];
@@ -1186,7 +1186,7 @@ function setGift($tnmt_type, $tnmt, $phase)
} }
//당첨칸에 베팅한 사람들만 //당첨칸에 베팅한 사람들만
$bettingID = $gameStor->lastTournamentBettingID; $bettingID = $gameStor->last_tournament_betting_id;
$betting = new Betting($bettingID); $betting = new Betting($bettingID);
$betting->giveReward([$winner['no']]); $betting->giveReward([$winner['no']]);
} }
@@ -1205,7 +1205,7 @@ function setRefund()
], 'no IN %li', $generalIDList); ], 'no IN %li', $generalIDList);
//베팅금 환수 //베팅금 환수
$bettingID = $gameStor->lastTournamentBettingID ?? 0; $bettingID = $gameStor->last_tournament_betting_id ?? 0;
if (!$bettingID == 0) { if (!$bettingID == 0) {
$betting = new Betting($bettingID); $betting = new Betting($bettingID);
if (!$betting->getInfo()->finished) { if (!$betting->getInfo()->finished) {