Skip to content

Commit

Permalink
Update getGroupMemberListLogic.go
Browse files Browse the repository at this point in the history
  • Loading branch information
showurl committed Mar 2, 2023
1 parent 60cb300 commit c965990
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/group/internal/logic/getGroupMemberListLogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func (l *GetGroupMemberListLogic) GetGroupMemberList(in *pb.GetGroupMemberListRe
CommonReq: in.CommonReq,
GroupId: in.GroupId,
MemberIds: userIds,
Opt: &pb.MapGroupMemberInfoByIdsReq_Opt{UserBaseInfo: true},
})
})
if err != nil {
Expand Down Expand Up @@ -167,7 +168,7 @@ func (l *GetGroupMemberListLogic) getGroupMemberListFromDb(in *pb.GetGroupMember
tx = tx.Where(where, args...)
}
var userIds []string
err = tx.Order("remark asc, userId asc").Offset(int(offset)).Limit(int(limit)).Pluck("userId", &userIds).Error
err = tx.Order("role desc, remark asc, userId asc").Offset(int(offset)).Limit(int(limit)).Pluck("userId", &userIds).Error
if err != nil {
l.Errorf("mysql pluck error: %v", err)
return make([]string, 0), err
Expand Down

0 comments on commit c965990

Please sign in to comment.