mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 16:48:24 +08:00
fix: 修复 QueryColumn.between_(values) 不能为 null 的问题
This commit is contained in:
parent
d5d7c3e250
commit
efd2a442d4
@ -510,10 +510,16 @@ public class QueryColumn implements CloneSupport<QueryColumn>, Conditional<Query
|
|||||||
}
|
}
|
||||||
|
|
||||||
QueryCondition between_(Object[] values) {
|
QueryCondition between_(Object[] values) {
|
||||||
if (values == null || values.length != 2) {
|
// if (values == null || values.length != 2) {
|
||||||
throw new IllegalArgumentException("values is null or length is not 2");
|
// throw new IllegalArgumentException("values is null or length is not 2");
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (values == null || values.length == 0) {
|
||||||
|
return QueryCondition.createEmpty();
|
||||||
}
|
}
|
||||||
Object start = values[0], end = values[1];
|
|
||||||
|
|
||||||
|
Object start = values[0], end = values.length > 1 ? values[1] : null;
|
||||||
return between_(start, end);
|
return between_(start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user