This commit is contained in:
hujiabin 2022-10-25 20:19:13 +08:00
parent b75d4811da
commit 94b76f7e8a

View File

@ -36,23 +36,23 @@ class SeasonController extends BaseAuthedController {
{ {
parent::_handlePre(); parent::_handlePre();
$this->currRankSeasonMeta = mt\RankSeason::getCurrentSeason(); $this->currRankSeasonMeta = mt\RankSeason::getCurrentSeason();
$this->currSeasonMeta = mt\Season::getCurrentSeason(); // $this->currSeasonMeta = mt\Season::getCurrentSeason();
if (!$this->currSeasonMeta) { if (!$this->currRankSeasonMeta) {
$this->_rspErr(10, 'server internal error'); $this->_rspErr(10, 'server internal error');
die(); die();
} }
$this->propertyChgService = new services\PropertyChgService(); $this->propertyChgService = new services\PropertyChgService();
$this->awardService = new services\AwardService(); $this->awardService = new services\AwardService();
$this->userInfo = $this->_safeGetOrmUserInfo(); $this->userInfo = $this->_safeGetOrmUserInfo();
$this->seasonService = new services\SeasonService(); // $this->seasonService = new services\SeasonService();
if (!$this->seasonService->checkSeason($this->userInfo)) { // if (!$this->seasonService->checkSeason($this->userInfo)) {
$this->userInfo = $this->_safeGetOrmUserInfo(); // $this->userInfo = $this->_safeGetOrmUserInfo();
$this->propertyChgService->addUserChg(); // $this->propertyChgService->addUserChg();
} // }
$this->seasonDb = Season::find($this->currSeasonMeta['id']); $this->seasonDb = Season::find($this->currRankSeasonMeta['id']);
if (!$this->seasonDb) { if (!$this->seasonDb) {
Season::add($this->currSeasonMeta['id']); Season::add($this->currRankSeasonMeta['id']);
$this->seasonDb = Season::find($this->currSeasonMeta['id']); $this->seasonDb = Season::find($this->currRankSeasonMeta['id']);
} }
if (!$this->seasonDb) { if (!$this->seasonDb) {
$this->_rspErr(10, 'server internal error'); $this->_rspErr(10, 'server internal error');