mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08:24 +08:00
feat: Active Record 添加动态排序。
This commit is contained in:
parent
bce9d25d49
commit
371576877d
@ -355,15 +355,30 @@ public abstract class QueryModel<T extends QueryModel<T>> {
|
|||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public T orderBy(QueryColumn column, Boolean asc) {
|
||||||
|
queryWrapper().orderBy(column, asc);
|
||||||
|
return (T) this;
|
||||||
|
}
|
||||||
|
|
||||||
public T orderBy(String... orderBys) {
|
public T orderBy(String... orderBys) {
|
||||||
queryWrapper().orderBy(orderBys);
|
queryWrapper().orderBy(orderBys);
|
||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public T orderBy(String column, Boolean asc) {
|
||||||
|
queryWrapper().orderBy(column, asc);
|
||||||
|
return (T) this;
|
||||||
|
}
|
||||||
|
|
||||||
public <E> OrderByBuilder<T> orderBy(LambdaGetter<E> column) {
|
public <E> OrderByBuilder<T> orderBy(LambdaGetter<E> column) {
|
||||||
return new OrderByBuilder<>((T) this, column);
|
return new OrderByBuilder<>((T) this, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <E> T orderBy(LambdaGetter<E> column, Boolean asc) {
|
||||||
|
queryWrapper().orderBy(column, asc);
|
||||||
|
return (T) this;
|
||||||
|
}
|
||||||
|
|
||||||
public T limit(Number rows) {
|
public T limit(Number rows) {
|
||||||
queryWrapper().limit(rows);
|
queryWrapper().limit(rows);
|
||||||
return (T) this;
|
return (T) this;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user