From 611e11ae23e961057bde65b724d0ca29762d6fbc Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 25 Jul 2022 19:14:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8C=BA=E9=97=B4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=AD=97=E6=AE=B5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/mybatis/core/query/LambdaQueryWrapperX.java | 4 ++-- .../yudao/framework/mybatis/core/query/QueryWrapperX.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/LambdaQueryWrapperX.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/LambdaQueryWrapperX.java index d9ba7c4be..d387e2865 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/LambdaQueryWrapperX.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/LambdaQueryWrapperX.java @@ -98,10 +98,10 @@ public class LambdaQueryWrapperX extends LambdaQueryWrapper { if (values!= null && values.length >0 && values[0] != null && values[1] != null) { return (LambdaQueryWrapperX) super.between(column, values[0], values[1]); } - if (values != null && values[0] != null) { + if (values != null && values.length >0 && values[0] != null) { return (LambdaQueryWrapperX) ge(column, values[0]); } - if (values != null && values[1] != null) { + if (values != null && values.length >0 && values[1] != null) { return (LambdaQueryWrapperX) le(column, values[2]); } return this; diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/QueryWrapperX.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/QueryWrapperX.java index 1effb19ed..a44300833 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/QueryWrapperX.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/QueryWrapperX.java @@ -95,13 +95,13 @@ public class QueryWrapperX extends QueryWrapper { } public QueryWrapperX betweenIfPresent(String column, Object[] values) { - if (values!= null && values[0] != null && values[1] != null) { + if (values!= null && values.length != 0 && values[0] != null && values[1] != null) { return (QueryWrapperX) super.between(column, values[0], values[1]); } - if (values!= null && values[0] != null) { + if (values!= null && values.length != 0 && values[0] != null) { return (QueryWrapperX) ge(column, values[0]); } - if (values!= null && values[1] != null) { + if (values!= null && values.length != 0 && values[1] != null) { return (QueryWrapperX) le(column, values[1]); } return this;