修改缓存方式
This commit is contained in:
@@ -7,6 +7,7 @@ use ba\Random;
|
||||
use support\think\Db;
|
||||
use app\common\model\User;
|
||||
use app\common\facade\Token;
|
||||
use app\common\service\GameHotDataRedis;
|
||||
use Webman\Http\Request;
|
||||
|
||||
/**
|
||||
@@ -69,7 +70,7 @@ class Auth extends \ba\Auth
|
||||
Token::tokenExpirationCheck($tokenData);
|
||||
$userId = $tokenData['user_id'];
|
||||
if ($tokenData['type'] == self::TOKEN_TYPE && $userId > 0) {
|
||||
$this->model = User::where('id', $userId)->find();
|
||||
$this->model = GameHotDataRedis::userModelFromCacheOrDb($userId);
|
||||
if (!$this->model) {
|
||||
$this->setError('Account not exist');
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user