From 8a55bfc82b90bd2c2dc3c11b3600fb6f21c6dfc4 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sun, 1 Jun 2025 16:50:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/userService.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/userService.go b/service/userService.go index eaaca60..4bfd932 100644 --- a/service/userService.go +++ b/service/userService.go @@ -425,13 +425,13 @@ func GetUserByIDFromUserCenter(id int) dao.User { fmt.Println("get user info , json marshal error:", err) return dao.User{} } - success := worker.SetRedisWithExpire(key, string(userJson), time.Second*10) + user_str = string(userJson) + success := worker.SetRedisWithExpire(key, user_str, time.Second*10) if !success { - fmt.Println("set redis error,user json:", string(userJson)) + fmt.Println("set redis error,user json:", user_str) } } } - user_str = worker.GetRedis(key) log.Println("user_str:", user_str) return user }