Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhouhao 2023-11-06 17:32:43 +08:00
commit 4f1c89ccc2
1 changed files with 3 additions and 3 deletions

View File

@ -36,10 +36,10 @@ import java.util.function.Function;
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);
}
/**
@ -222,4 +222,4 @@ public class ReactorUtils {
}
}
}
}