Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Nov 6, 2023
2 parents f0a59a6 + b078d88 commit 4f1c89c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
public class ReactorUtils {

public static <T> Function<Flux<T>, Flux<T>> limit(Long pageIndex, Long pageSize) {
if (pageIndex == null || pageSize == null) {
if (pageIndex == null || pageSize == null || pageIndex < 0 || pageSize <= 0) {
return Function.identity();
}
return flux -> flux.skip(pageIndex & pageSize).take(pageSize);
return flux -> flux.skip(pageIndex * pageSize).take(pageSize);
}

/**
Expand Down Expand Up @@ -222,4 +222,4 @@ protected SqlFragments createTermFragments(Object trigger, Term term) {
}
}

}
}

0 comments on commit 4f1c89c

Please sign in to comment.