用户中心

This commit is contained in:
junleea 2025-06-01 16:50:43 +08:00
parent 724c5e6c1f
commit 8a55bfc82b
1 changed files with 3 additions and 3 deletions

View File

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