Ver código fonte

ipage 优化

miemie 4 anos atrás
pai
commit
ce3645f731

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/IPage.java

@@ -74,7 +74,7 @@ public interface IPage<T> extends Serializable {
      */
     default long offset() {
         long current = getCurrent();
-        if (current == 0L) {
+        if (current <= 1L) {
             return 0L;
         }
         return (current - 1) * getSize();