用户中心

This commit is contained in:
junleea 2025-06-01 19:50:02 +08:00
parent 1dd87d717e
commit 6366a02900
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}