From 14f07bd7e39ba15173dce3e46a38b5581e617acb Mon Sep 17 00:00:00 2001 From: Suomm <1474983351@qq.com> Date: Mon, 1 Apr 2024 20:40:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20"Parameter=20index=20out=20of=20range"?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mybatisflex/core/query/WrapperUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/WrapperUtil.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/WrapperUtil.java index e227556f..c8b5f5a2 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/WrapperUtil.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/WrapperUtil.java @@ -100,7 +100,11 @@ class WrapperUtil { if (value == null) { // column = user_name; logic = eq; value = null // sql: user_name = null - if (condition.checkEffective() && condition.getLogic() != null) { + String logic; + if (condition.checkEffective() + && (logic = condition.getLogic()) != null + && !logic.equals(SqlConsts.IS_NULL) + && !logic.equals(SqlConsts.IS_NOT_NULL)) { params.add(null); } getValues(condition.next, params);