From 3069744bfaec253b93818c0145d66bbcd9a457e3 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Thu, 20 Mar 2025 15:29:13 +0800 Subject: [PATCH] feat : config --- app/Cache/Redis/Api/UserCache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Cache/Redis/Api/UserCache.php b/app/Cache/Redis/Api/UserCache.php index cd62069..b487a7d 100644 --- a/app/Cache/Redis/Api/UserCache.php +++ b/app/Cache/Redis/Api/UserCache.php @@ -26,7 +26,7 @@ class UserCache public function setUserToken(int $userId,string $token): void { $key = CommonRedisKey::userTokenHashKey(); - $this->redis->hSet($key, $userId, $token); + $this->redis->hSet($key, (string)$userId, $token); } /** @@ -38,7 +38,7 @@ class UserCache public function getUserToken(int $userId): mixed { $key = CommonRedisKey::userTokenHashKey(); - return $this->redis->hGet($key, $userId); + return $this->redis->hGet($key, (string)$userId); } /** @@ -50,6 +50,6 @@ class UserCache public function removeUserToken(int $userId): void { $key = CommonRedisKey::userTokenHashKey(); - $this->redis->hDel($key, $userId); + $this->redis->hDel($key, (string)$userId); } } \ No newline at end of file