From 6366a029004bd55c47116bac0a02a07fe219da5e Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sun, 1 Jun 2025 19:50:02 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/userService.go b/service/userService.go index 6edd7e1..dd09c8e 100644 --- a/service/userService.go +++ b/service/userService.go @@ -125,8 +125,8 @@ func UpdateUser(user_id int, req proto.UpdateUserInfoReq) (int, error) { func UpdateUserCache(id int) { key := "user_info_" + strconv.Itoa(id) if worker.IsContainKey(key) { - user := GetUserByID(id) - userJson, err := json.Marshal(user) + users := GetUserByID(id) + userJson, err := json.Marshal(users[0]) //统一使用User不使用数组 if err != nil { fmt.Println("get user info , json marshal error:", err) }