From 280eeea6f7c1fa62671e12ac51ac29d8dfe1a09f Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Thu, 21 Aug 2025 10:46:12 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96in=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E5=8F=82=E6=95=B0=E5=90=8D=EF=BC=8C?= =?UTF-8?q?in=E4=BC=9A=E5=92=8Ckotlin=E7=9A=84=E5=85=B3=E9=94=AE=E5=AD=97?= =?UTF-8?q?=E5=90=8C=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lanyuanxiaoyao/service/template/controller/Query.java | 4 ++-- .../service/template/service/SimpleServiceSupport.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/Query.java b/src/main/java/com/lanyuanxiaoyao/service/template/controller/Query.java index 7537b98..115e7ce 100644 --- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/Query.java +++ b/src/main/java/com/lanyuanxiaoyao/service/template/controller/Query.java @@ -141,11 +141,11 @@ public class Query { /** * 指定字段值在指定范围内的条件映射(字段名 -> 值列表) */ - private Map> in; + private Map> inside; /** * 指定字段值不在指定范围内的条件映射(字段名 -> 值列表) */ - private Map> notIn; + private Map> notInside; /** * 指定字段值在指定区间内的条件映射(字段名 -> 区间范围) */ diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleServiceSupport.java b/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleServiceSupport.java index 86e3ed9..c2475bc 100644 --- a/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleServiceSupport.java +++ b/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleServiceSupport.java @@ -316,11 +316,11 @@ public abstract class SimpleServiceSupport implemen predicates.add(builder.lessThanOrEqualTo(path, (Comparable) value)); }); } - if (ObjectHelper.isNotEmpty(queryable.getIn())) { - queryable.getIn().forEach((column, value) -> predicates.add(builder.in(column(root, column)).value(value))); + if (ObjectHelper.isNotEmpty(queryable.getInside())) { + queryable.getInside().forEach((column, value) -> predicates.add(builder.in(column(root, column)).value(value))); } - if (ObjectHelper.isNotEmpty(queryable.getNotIn())) { - queryable.getNotIn().forEach((column, value) -> predicates.add(builder.in(column(root, column)).value(value).not())); + if (ObjectHelper.isNotEmpty(queryable.getNotInside())) { + queryable.getNotInside().forEach((column, value) -> predicates.add(builder.in(column(root, column)).value(value).not())); } if (ObjectHelper.isNotEmpty(queryable.getBetween())) { queryable.getBetween().forEach((column, value) -> {