Browse Source

命名还原

Caratacus 7 năm trước cách đây
mục cha
commit
235b3c9522

+ 0 - 1
CHANGELOG.md

@@ -13,7 +13,6 @@
 - fix #IGI3H:selectBatchIds 参数改为Collection类型
 - bugfix for logic delete sql injector
 - 添加多个排序字段支持
-- isAsc 改为 ascSort 不忽略 size
 - fixed github #185:2.0.2版本 自增主键 批量插入问题 pr
 - 其他优化
 

+ 2 - 2
mybatis-plus-support/src/main/java/com/baomidou/mybatisplus/plugins/Page.java

@@ -56,9 +56,9 @@ public class Page<T> extends Pagination {
         this.setOrderByField(orderByField);
     }
 
-    public Page(int current, int size, String orderByField, boolean ascSort) {
+    public Page(int current, int size, String orderByField, boolean isAsc) {
         this(current, size, orderByField);
-        this.setAsc(ascSort);
+        this.setAsc(isAsc);
     }
 
     public List<T> getRecords() {

+ 5 - 5
mybatis-plus-support/src/main/java/com/baomidou/mybatisplus/plugins/pagination/Pagination.java

@@ -101,7 +101,7 @@ public class Pagination extends RowBounds implements Serializable {
      * @see #ascs
      * @see #descs
      */
-    private transient boolean ascSort = true;
+    private transient boolean isAsc = true;
 
     /**
      * <p>
@@ -245,7 +245,7 @@ public class Pagination extends RowBounds implements Serializable {
     }
 
     public List<String> getAscs() {
-        return orders(ascSort, ascs);
+        return orders(isAsc, ascs);
     }
 
     private List<String> orders(boolean condition, List<String> columns) {
@@ -278,15 +278,15 @@ public class Pagination extends RowBounds implements Serializable {
      */
     @Deprecated
     public boolean isAsc() {
-        return ascSort;
+        return isAsc;
     }
 
     /**
      * @see #ascs
      * @see #descs
      */
-    public Pagination setAsc(boolean ascSort) {
-        this.ascSort = ascSort;
+    public Pagination setAsc(boolean isAsc) {
+        this.isAsc = isAsc;
         return this;
     }