fix: 统一分页请求的 offset 语义
This commit is contained in:
@@ -36,7 +36,7 @@ func (l *SearchPlayersLogic) SearchPlayers(in *pb.SearchPlayersReq) (*pb.SearchP
|
||||
}
|
||||
searcher.Where(players.GenderEQ(gender))
|
||||
}
|
||||
all, err := searcher.Limit(int(*in.Limit)).Offset(int(*in.Page * *in.Limit)).All(l.ctx)
|
||||
all, err := searcher.Limit(int(*in.Limit)).Offset(int(*in.Offset)).All(l.ctx)
|
||||
if err != nil {
|
||||
logx.Errorf("SearchPlayers err: %v", err)
|
||||
return nil, errors.New("search players")
|
||||
|
||||
Reference in New Issue
Block a user