修复用户信息更新后未正确设置缓存问题

This commit is contained in:
junleea 2025-04-10 15:24:02 +08:00
parent 87e859cfca
commit 30b5069f9f
1 changed files with 1 additions and 1 deletions

View File

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