Browse Source

升级 2.1.7-SNAPSHOT 修复 asc bug

= 7 năm trước cách đây
mục cha
commit
644a861b69

+ 1 - 1
build.gradle

@@ -39,7 +39,7 @@ ext {
 
 allprojects{
     group = 'com.baomidou'
-    version = '2.1.7'
+    version = '2.1.7-SNAPSHOT'
 }
 
 

+ 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 isAsc) {
+    public Page(int current, int size, String orderByField, boolean ascSort) {
         this(current, size, orderByField);
-        this.setAsc(isAsc);
+        this.setAscSort(ascSort);
     }
 
     public List<T> getRecords() {

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

@@ -263,7 +263,7 @@ public class Pagination extends RowBounds implements Serializable {
     }
 
     public List<String> getDesc() {
-        return orders(!isAsc(), desc);
+        return orders(!isAscSort(), desc);
     }
 
     public void setDesc(List<String> desc) {
@@ -275,7 +275,7 @@ public class Pagination extends RowBounds implements Serializable {
      * @see #desc
      */
     @Deprecated
-    public boolean isAsc() {
+    public boolean isAscSort() {
         return ascSort;
     }
 
@@ -283,7 +283,7 @@ public class Pagination extends RowBounds implements Serializable {
      * @see #asc
      * @see #desc
      */
-    public Pagination setAsc(boolean ascSort) {
+    public Pagination setAscSort(boolean ascSort) {
         this.ascSort = ascSort;
         return this;
     }