mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix cache
This commit is contained in:
parent
07309b872b
commit
ad7fa572b5
@ -154,7 +154,7 @@ func (s *userServer) GetPaginationUsers(ctx context.Context, req *pbuser.GetPagi
|
||||
}
|
||||
resp.Total = int32(total)
|
||||
resp.Users, err = (*convert.DBUser)(nil).DB2PB(usersDB)
|
||||
return resp, nil
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// ok
|
||||
|
2
pkg/common/db/cache/rockscache.go
vendored
2
pkg/common/db/cache/rockscache.go
vendored
@ -110,6 +110,7 @@ func batchGetCache[T any](ctx context.Context, rcClient *rockscache.Client, keys
|
||||
return nil, err
|
||||
}
|
||||
for _, v := range batchMap {
|
||||
if v != "" {
|
||||
var t T
|
||||
err = json.Unmarshal([]byte(v), &t)
|
||||
if err != nil {
|
||||
@ -117,5 +118,6 @@ func batchGetCache[T any](ctx context.Context, rcClient *rockscache.Client, keys
|
||||
}
|
||||
tArrays = append(tArrays, t)
|
||||
}
|
||||
}
|
||||
return tArrays, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user