mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
fix: 条件值为 null 的情况处理。
This commit is contained in:
parent
699ca45dfe
commit
85a990629a
@ -95,12 +95,18 @@ class WrapperUtil {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!condition.checkEffective()) {
|
||||
Object value = condition.getValue();
|
||||
|
||||
if (value == null) {
|
||||
// column = user_name; logic = eq; value = null
|
||||
// sql: user_name = null
|
||||
if (condition.checkEffective() && condition.getLogic() != null) {
|
||||
params.add(null);
|
||||
}
|
||||
getValues(condition.next, params);
|
||||
return;
|
||||
}
|
||||
|
||||
Object value = condition.getValue();
|
||||
if (value instanceof QueryColumn || value instanceof RawQueryCondition) {
|
||||
getValues(condition.next, params);
|
||||
return;
|
||||
@ -109,6 +115,7 @@ class WrapperUtil {
|
||||
addParam(params, value);
|
||||
getValues(condition.next, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private static void addParam(List<Object> paras, Object value) {
|
||||
if (value == null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user