mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
时间区间查询 betweenIfPresent 支持传入数组
This commit is contained in:
parent
f2d7500822
commit
c7a64fc8b4
@ -94,6 +94,19 @@ public class QueryWrapperX<T> extends QueryWrapper<T> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public QueryWrapperX<T> betweenIfPresent(String column, Object[] values) {
|
||||||
|
if (values!= null && values[0] != null && values[1] != null) {
|
||||||
|
return (QueryWrapperX<T>) super.between(column, values[0], values[1]);
|
||||||
|
}
|
||||||
|
if (values!= null && values[0] != null) {
|
||||||
|
return (QueryWrapperX<T>) ge(column, values[0]);
|
||||||
|
}
|
||||||
|
if (values!= null && values[1] != null) {
|
||||||
|
return (QueryWrapperX<T>) le(column, values[1]);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// ========== 重写父类方法,方便链式调用 ==========
|
// ========== 重写父类方法,方便链式调用 ==========
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user