This commit is contained in:
Lunny Xiao
2022-10-14 21:48:47 +08:00
committed by Jason Song
parent 8ec691f3ce
commit e7d5c99b42
8 changed files with 56 additions and 43 deletions

View File

@ -41,7 +41,7 @@ func FindObjects[Object any](ctx context.Context, cond builder.Cond, opts *ListO
if opts.Page < 1 {
opts.Page = 1
}
sess.Limit(opts.PageSize, opts.PageSize * (opts.Page - 1))
sess.Limit(opts.PageSize, opts.PageSize*(opts.Page-1))
}
return sess.Find(objects)
}