This commit is contained in:
wangchuxiao 2023-05-09 18:23:28 +08:00
parent 1ef3f527f3
commit 17e747049c
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package api
import (
"context"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/a2r"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
@ -28,6 +29,7 @@ func (o *Group) client(ctx context.Context) (group.GroupClient, error) {
return nil, err
}
log.ZDebug(ctx, "get conn success", "conn", conn, "config", config.Config.RpcRegisterName.OpenImGroupName)
fmt.Println("conn", conn)
return group.NewGroupClient(conn), nil
}

View File

@ -59,7 +59,7 @@ func (f *FriendRequestGorm) FindToUserID(ctx context.Context, toUserID string, p
if err != nil {
return nil, 0, utils.Wrap(err, "")
}
err = utils.Wrap(f.db(ctx).Where("to_user_id = ? ", toUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber-1)).Find(&friendRequests).Error, "")
err = utils.Wrap(f.db(ctx).Where("to_user_id = ? ", toUserID).Limit(int(showNumber)).Offset(int(pageNumber-1)*int(showNumber)).Find(&friendRequests).Error, "")
return
}