Browse Source

移除注解`OrderBy`的过时属性`isDesc`

miemie 2 years ago
parent
commit
77a278062a

+ 0 - 4
mybatis-plus-annotation/src/main/java/com/baomidou/mybatisplus/annotation/OrderBy.java

@@ -33,12 +33,8 @@ public @interface OrderBy {
      */
     boolean asc() default false;
 
-    @Deprecated
-    boolean isDesc() default true;
-
     /**
      * 数字越小越靠前
      */
     short sort() default Short.MAX_VALUE;
-
 }

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

@@ -374,7 +374,7 @@ public class TableFieldInfo implements Constants {
             this.isOrderBy = true;
             this.orderBySort = orderBy.sort();
             String _orderBy = Constants.DESC;
-            if (orderBy.asc() || !orderBy.isDesc()) {
+            if (orderBy.asc()) {
                 _orderBy = Constants.ASC;
             }
             this.orderByType = _orderBy;