From fe297c713bf2592663c5df9115343c0f3bb477e6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 31 May 2022 11:26:20 +0800 Subject: [PATCH] 1 --- webapp/bootstrap/constant.php | 2 ++ webapp/controller/BaseAuthedController.class.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index cf033cd2..a8e57496 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -2,6 +2,8 @@ define('TEAMID_KEY', 'team_uuid:'); +define('LAST_SESSION_KEY', 'team_uuid:'); + define('V_ITEM_GOLD', 10001); //金币 define('V_ITEM_DIAMOND', 10002); //钻石 define('V_ITEM_EXP', 10003); //经验 diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index bef9b5b0..7a74c7aa 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -50,7 +50,7 @@ class BaseAuthedController extends BaseController { protected function updateSession($accountId, $sessionId) { $r = $this->_getRedis($this->_getAccountId()); - $r->set(LAST_SESSION_KEY . $this->_getAccountId()); + $r->set(LAST_SESSION_KEY . $this->_getAccountId(), $sessionId); $r->pexpire(LAST_SESSION_KEY . $this->_getAccountId(), 3600 * 24); }