mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-23 18:00:32 +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
|
||||
|
12
pkg/common/db/cache/rockscache.go
vendored
12
pkg/common/db/cache/rockscache.go
vendored
@ -110,12 +110,14 @@ func batchGetCache[T any](ctx context.Context, rcClient *rockscache.Client, keys
|
||||
return nil, err
|
||||
}
|
||||
for _, v := range batchMap {
|
||||
var t T
|
||||
err = json.Unmarshal([]byte(v), &t)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "unmarshal failed")
|
||||
if v != "" {
|
||||
var t T
|
||||
err = json.Unmarshal([]byte(v), &t)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "unmarshal failed")
|
||||
}
|
||||
tArrays = append(tArrays, t)
|
||||
}
|
||||
tArrays = append(tArrays, t)
|
||||
}
|
||||
return tArrays, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user