mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-29 13:46:40 +08:00
Error code standardization
This commit is contained in:
parent
87d0e296c1
commit
e31d162870
@ -14,12 +14,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type GroupModel struct {
|
type GroupModel struct {
|
||||||
db *mysql.Group
|
db *mysql.Group
|
||||||
cache *cache.GroupCache
|
cache *cache.GroupCache
|
||||||
mongo *mongo.Client
|
mongo *mongo.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func NewGroupModel() {
|
func NewGroupModel() {
|
||||||
var groupModel GroupModel
|
var groupModel GroupModel
|
||||||
redisClient := cache.InitRedis()
|
redisClient := cache.InitRedis()
|
||||||
@ -29,7 +28,6 @@ func NewGroupModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *GroupModel) Find(ctx context.Context, groupIDs []string) (groups []*mysql.Group, err error) {
|
func (g *GroupModel) Find(ctx context.Context, groupIDs []string) (groups []*mysql.Group, err error) {
|
||||||
g.cache.Client.
|
|
||||||
for _, groupID := range groupIDs {
|
for _, groupID := range groupIDs {
|
||||||
group, err := g.getGroupInfoFromCache(ctx, groupID)
|
group, err := g.getGroupInfoFromCache(ctx, groupID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user