/** * 测试用 */ public function resetdayAction() { if (\Sooh\Base\Ini::getInstance()->get('deploymentCode') < 40) { $this->book->doDebugReset($this->_request->get('ymd') - 0, $this->_request->get('num', -1) - 0, $this->userOrAccountId); $this->_view->assign('userIdentifier', $this->user->getAccountId()); $this->_view->assign('now', date('Ymd H:i:s')); } }
protected function onLogin($accountInfo) { $sess = \Sooh\Base\Session\Data::getInstance(); $sess->set('accountId', $accountInfo['accountId']); $sess->set('nickname', $accountInfo['nickname']); $this->_view->assign('account', array('accountId' => $accountInfo['accountId'], 'nickname' => $accountInfo['nickname'])); /** $userOrAccountId = $this->user; $checkinBook = \Lib\Services\CheckinBook::getInstance(); */ $userOrAccountId = $accountInfo['accountId']; $checkinBook = \Lib\Services\CheckinBook::getInstance($this->getRpcDefault('CheckinBook')); $this->_view->assign('checkinBook', $checkinBook->doGetTodayStatus(1, $userOrAccountId)['data']); $this->_view->assign('shopPoints', array('nleft' => 'todo', 'history' => array('todo'))); $user = \Prj\Data\User::getCopy($userOrAccountId); setcookie('nickname', $accountInfo['nickname'], 0, '/', \Sooh\Base\Ini::getInstance()->cookieDomain()); $user->load(); $dt = \Sooh\Base\Time::getInstance(); if ($user->exists() === false) { $user->setField('nickname', $accountInfo['nickname']); $user->setField('contractId', $accountInfo['contractId']); $user->setField('regYmd', $dt->YmdFull); $user->setField('regHHiiss', $dt->his); $user->setField('regClient', self::tmp_clientType); $user->setField('regIP', \Sooh\Base\Tools::remoteIP()); //$user->setField(self::fieldUser, array()); $user->update(); } else { $user->setField('nickname', $accountInfo['nickname']); $user->setField('lastDt', $dt->timestamp()); $user->setField('lastIP', \Sooh\Base\Tools::remoteIP()); $user->update(); } $sess->shutdown(); $this->returnOK(); }