瀏覽代碼

fixed gitee issues/I2D0C1

hubin 4 年之前
父節點
當前提交
c4133f9ccd

+ 1 - 1
mybatis-plus-annotation/src/main/java/com/baomidou/mybatisplus/annotation/TableField.java

@@ -55,7 +55,7 @@ public @interface TableField {
     /**
      * 字段 where 实体查询比较条件
      * <p>
-     * 默认 {@link SqlCondition.EQUAL}
+     * 默认 {@link SqlCondition#EQUAL}
      */
     String condition() default "";
 

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

@@ -73,11 +73,11 @@ public interface IPage<T> extends Serializable {
      * 计算当前分页偏移量
      */
     default long offset() {
-        long current = getCurrent();
+        long current = getCurrent() - 1;
         if (current <= 1L) {
             return 0L;
         }
-        return (current - 1) * getSize();
+        return current * getSize();
     }
 
     /**