mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-19 12:47:06 +08:00
new feat: sync designated model
This commit is contained in:
parent
26cb6e4d50
commit
f6a98760a1
@ -1448,7 +1448,6 @@ func (s *groupServer) GetGroupUsersReqApplicationList(ctx context.Context, req *
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
resp.Total = int64(total)
|
|
||||||
if len(requests) == 0 {
|
if len(requests) == 0 {
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
@ -1482,5 +1481,6 @@ func (s *groupServer) GetGroupUsersReqApplicationList(ctx context.Context, req *
|
|||||||
resp.GroupRequests = utils.Slice(requests, func(e *relationTb.GroupRequestModel) *sdkws.GroupRequest {
|
resp.GroupRequests = utils.Slice(requests, func(e *relationTb.GroupRequestModel) *sdkws.GroupRequest {
|
||||||
return convert.Db2PbGroupRequest(e, nil, convert.Db2PbGroupInfo(groupMap[e.GroupID], ownerMap[e.GroupID].UserID, uint32(groupMemberNum[e.GroupID])))
|
return convert.Db2PbGroupRequest(e, nil, convert.Db2PbGroupInfo(groupMap[e.GroupID], ownerMap[e.GroupID].UserID, uint32(groupMemberNum[e.GroupID])))
|
||||||
})
|
})
|
||||||
|
resp.Total = total
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,11 +112,6 @@ func (g *GroupRequestGorm) PageGroup(
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *GroupRequestGorm) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (total int64, groupRequests []*relation.GroupRequestModel, err error) {
|
func (g *GroupRequestGorm) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (total int64, groupRequests []*relation.GroupRequestModel, err error) {
|
||||||
return int64(len(groupRequests)), groupRequests, utils.Wrap(
|
err = g.DB.WithContext(ctx).Where("group_id = ? and user_id in ?", groupID, userIDs).Find(&groupRequests).Error
|
||||||
g.DB.WithContext(ctx).
|
return int64(len(groupRequests)), groupRequests, utils.Wrap(err, utils.GetSelfFuncName())
|
||||||
Where("group_id = ? and user_id in ?", groupID, userIDs).
|
|
||||||
Find(&groupRequests).
|
|
||||||
Error,
|
|
||||||
utils.GetSelfFuncName(),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user