feat,fix,wip: 버그 수정, 연장 시간 로직 변경

This commit is contained in:
2022-06-09 01:21:21 +09:00
parent d18ae3dd11
commit 717ec012ba
18 changed files with 232 additions and 137 deletions
@@ -5,9 +5,12 @@ namespace sammo\API\Auction;
use sammo\Session;
use DateTimeInterface;
use sammo\AuctionSellRice;
use sammo\DB;
use sammo\Validator;
use sammo\GameConst;
use sammo\General;
use sammo\KVStorage;
use sammo\Util;
class OpenSellRiceAuction extends \sammo\BaseAPI
{
@@ -64,6 +67,16 @@ class OpenSellRiceAuction extends \sammo\BaseAPI
$general = General::createGeneralObjFromDB($generalID);
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$initYear, $initMonth, $year, $month] = $gameStor->getValuesAsArray(['init_year', 'init_month', 'year', 'month']);
$initYearMonth = Util::joinYearMonth($initYear, $initMonth);
$yearMonth = Util::joinYearMonth($year, $month);
if($yearMonth <= $initYearMonth + 3){
return '시작 후 3개월이 지나야 경매를 열 수 있습니다.';
}
$auctionResult = AuctionSellRice::openResourceAuction(
$general,
$amount,