Merge remote-tracking branch 'origin/master-jdk17' into master-jdk17
commit
1b060dc93f
|
|
@ -24,6 +24,12 @@ public class LambdaQueryWrapperX<T> extends LambdaQueryWrapper<T> {
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public LambdaQueryWrapperX<T> likeRightIfPresent(SFunction<T, ?> column, String val) {
|
||||||
|
if (StringUtils.hasText(val)) {
|
||||||
|
return (LambdaQueryWrapperX<T>) super.likeRight(column, val);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public LambdaQueryWrapperX<T> inIfPresent(SFunction<T, ?> column, Collection<?> values) {
|
public LambdaQueryWrapperX<T> inIfPresent(SFunction<T, ?> column, Collection<?> values) {
|
||||||
if (ObjectUtil.isAllNotEmpty(values) && !ArrayUtil.isEmpty(values)) {
|
if (ObjectUtil.isAllNotEmpty(values) && !ArrayUtil.isEmpty(values)) {
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,13 @@ public class QueryWrapperX<T> extends QueryWrapper<T> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public QueryWrapperX<T> likeRightIfPresent(String column, String val) {
|
||||||
|
if (StringUtils.hasText(val)) {
|
||||||
|
return (QueryWrapperX<T>) super.likeRight(column, val);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public QueryWrapperX<T> inIfPresent(String column, Collection<?> values) {
|
public QueryWrapperX<T> inIfPresent(String column, Collection<?> values) {
|
||||||
if (!CollectionUtils.isEmpty(values)) {
|
if (!CollectionUtils.isEmpty(values)) {
|
||||||
return (QueryWrapperX<T>) super.in(column, values);
|
return (QueryWrapperX<T>) super.in(column, values);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue