用户中心
This commit is contained in:
parent
724c5e6c1f
commit
8a55bfc82b
|
|
@ -425,13 +425,13 @@ func GetUserByIDFromUserCenter(id int) dao.User {
|
||||||
fmt.Println("get user info , json marshal error:", err)
|
fmt.Println("get user info , json marshal error:", err)
|
||||||
return dao.User{}
|
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 {
|
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)
|
log.Println("user_str:", user_str)
|
||||||
return user
|
return user
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue