fix: 베팅 관련 사소한 버그 수정
- 베팅이 없을 경우 - 베팅 동시 신청
This commit is contained in:
@@ -39,7 +39,7 @@ class Bet extends \sammo\BaseAPI
|
|||||||
|
|
||||||
public function getRequiredSessionMode(): int
|
public function getRequiredSessionMode(): int
|
||||||
{
|
{
|
||||||
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
|
return static::REQ_GAME_LOGIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
|
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ class GetBettingDetail extends \sammo\BaseAPI
|
|||||||
{
|
{
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|
||||||
increaseRefresh("국가베팅장", 1);
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
$bettingID = $this->args['betting_id'];
|
$bettingID = $this->args['betting_id'];
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class GetBettingList extends \sammo\BaseAPI
|
|||||||
$me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,penalty,permission FROM general WHERE owner=%i', $userID);
|
$me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,penalty,permission FROM general WHERE owner=%i', $userID);
|
||||||
$con = checkLimit($me['con']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
return "접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 갱신 가능 시각 : {$me['turntime']})";
|
return "접속 제한중입니다.";
|
||||||
}
|
}
|
||||||
|
|
||||||
$bettingList = [];
|
$bettingList = [];
|
||||||
@@ -47,6 +47,17 @@ class GetBettingList extends \sammo\BaseAPI
|
|||||||
$bettingList[$item->id]['totalAmount'] = 0;
|
$bettingList[$item->id]['totalAmount'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
|
|
||||||
|
if(!$bettingList){
|
||||||
|
return [
|
||||||
|
'result' => true,
|
||||||
|
'bettingList' => $bettingList,
|
||||||
|
'year' => $year,
|
||||||
|
'month' => $month,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
$bettingIDList = array_keys($bettingList);
|
$bettingIDList = array_keys($bettingList);
|
||||||
// XXX: query cache만 믿고 sum을 하는 짓을 벌여도 되는가?
|
// XXX: query cache만 믿고 sum을 하는 짓을 벌여도 되는가?
|
||||||
foreach ($db->queryAllLists(
|
foreach ($db->queryAllLists(
|
||||||
@@ -59,7 +70,6 @@ class GetBettingList extends \sammo\BaseAPI
|
|||||||
$bettingList[$bettingID]['totalAmount'] = $totalAmount;
|
$bettingList[$bettingID]['totalAmount'] = $totalAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'result' => true,
|
'result' => true,
|
||||||
|
|||||||
Reference in New Issue
Block a user