修复用户信息更新后未正确设置缓存问题
This commit is contained in:
parent
87e859cfca
commit
30b5069f9f
|
|
@ -141,7 +141,7 @@ func UpdateUser(user_id int, req proto.UpdateUserInfoReq) (int, error) {
|
||||||
func UpdateUserCache(id int) {
|
func UpdateUserCache(id int) {
|
||||||
key := "user_info_" + strconv.Itoa(id)
|
key := "user_info_" + strconv.Itoa(id)
|
||||||
if worker.IsContainKey(key) {
|
if worker.IsContainKey(key) {
|
||||||
user := GetUserByID(id)
|
user := dao.FindUserByID2(id)
|
||||||
userJson, err := json.Marshal(user)
|
userJson, err := json.Marshal(user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("get user info , json marshal error:", err)
|
fmt.Println("get user info , json marshal error:", err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue