用户中心
This commit is contained in:
parent
1dd87d717e
commit
6366a02900
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue