mirror of
https://gitee.com/yudaocode/yudao-boot-mini.git
synced 2026-03-22 05:27:15 +08:00
feat(mybatis): 扩展 MPJLambdaWrapperX 查询功能- 重写 orderByAsc 方法支持升序排序功能
This commit is contained in:
@@ -15,6 +15,7 @@ import java.util.function.Consumer;
|
|||||||
* <p>
|
* <p>
|
||||||
* 1. 拼接条件的方法,增加 xxxIfPresent 方法,用于判断值不存在的时候,不要拼接到条件中。
|
* 1. 拼接条件的方法,增加 xxxIfPresent 方法,用于判断值不存在的时候,不要拼接到条件中。
|
||||||
* 2. SFunction<S, ?> column + <S> 泛型:支持任意类字段(主表、子表、三表),推荐写法, 让编译器自动推断 S 类型
|
* 2. SFunction<S, ?> column + <S> 泛型:支持任意类字段(主表、子表、三表),推荐写法, 让编译器自动推断 S 类型
|
||||||
|
*
|
||||||
* @param <T> 数据类型
|
* @param <T> 数据类型
|
||||||
*/
|
*/
|
||||||
public class MPJLambdaWrapperX<T> extends MPJLambdaWrapper<T> {
|
public class MPJLambdaWrapperX<T> extends MPJLambdaWrapper<T> {
|
||||||
@@ -122,6 +123,12 @@ public class MPJLambdaWrapperX<T> extends MPJLambdaWrapper<T> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <X> MPJLambdaWrapperX<T> orderByAsc(SFunction<X, ?> column) {
|
||||||
|
super.orderByAsc(true, column);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MPJLambdaWrapperX<T> last(String lastSql) {
|
public MPJLambdaWrapperX<T> last(String lastSql) {
|
||||||
super.last(lastSql);
|
super.last(lastSql);
|
||||||
|
|||||||
Reference in New Issue
Block a user