Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

 Conflicts:
	pkg/common/db/controller/group.go
This commit is contained in:
wangchuxiao
2023-01-29 17:21:22 +08:00
13 changed files with 1893 additions and 4174 deletions
+8 -1
View File
@@ -17,7 +17,9 @@ type GroupInterface interface {
CreateGroup(ctx context.Context, groups []*relation.Group, groupMember []*relation.GroupMember) error
DeleteGroupByIDs(ctx context.Context, groupIDs []string) error
TakeGroupByID(ctx context.Context, groupID string) (group *relation.Group, err error)
GetJoinedGroupList(ctx context.Context, userID string) ([]*relation.Group, error)
GetGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error)
GetGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error)
//mongo
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error)
@@ -146,6 +148,11 @@ func (g *GroupDataBase) Update(ctx context.Context, groups []*relation.Group) er
})
}
func (g *GroupDataBase) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation.Group, error) {
return nil, nil
}
func (g *GroupDataBase) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
sess, err := g.mongoDB.MgoClient.StartSession()
if err != nil {