From 0c334dadcce9d74301dbcc3c336dc28ffc4cf62e Mon Sep 17 00:00:00 2001 From: Charles7c Date: Wed, 11 Sep 2024 22:27:46 +0800 Subject: [PATCH] =?UTF-8?q?chore(data):=20=E7=A7=BB=E9=99=A4=20QueryIgnore?= =?UTF-8?q?=20=E7=9A=84=E6=97=A0=E7=94=A8=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../starter/data/core/annotation/QueryIgnore.java | 10 +--------- .../starter/data/mf/util/QueryWrapperHelper.java | 2 +- .../starter/data/mp/util/QueryWrapperHelper.java | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/continew-starter-data/continew-starter-data-core/src/main/java/top/continew/starter/data/core/annotation/QueryIgnore.java b/continew-starter-data/continew-starter-data-core/src/main/java/top/continew/starter/data/core/annotation/QueryIgnore.java index 12ed7f21..a2967b4e 100644 --- a/continew-starter-data/continew-starter-data-core/src/main/java/top/continew/starter/data/core/annotation/QueryIgnore.java +++ b/continew-starter-data/continew-starter-data-core/src/main/java/top/continew/starter/data/core/annotation/QueryIgnore.java @@ -27,12 +27,4 @@ import java.lang.annotation.*; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) @Documented -public @interface QueryIgnore { - - /** - * 获取是否忽略查询解析 - * - * @return 是否忽略查询解析 - */ - boolean value() default true; -} +public @interface QueryIgnore {} diff --git a/continew-starter-data/continew-starter-data-mf/src/main/java/top/continew/starter/data/mf/util/QueryWrapperHelper.java b/continew-starter-data/continew-starter-data-mf/src/main/java/top/continew/starter/data/mf/util/QueryWrapperHelper.java index e51dc0d2..250d0ed0 100644 --- a/continew-starter-data/continew-starter-data-mf/src/main/java/top/continew/starter/data/mf/util/QueryWrapperHelper.java +++ b/continew-starter-data/continew-starter-data-mf/src/main/java/top/continew/starter/data/mf/util/QueryWrapperHelper.java @@ -143,7 +143,7 @@ public class QueryWrapperHelper { } // 设置了 @QueryIgnore 注解,直接忽略 QueryIgnore queryIgnoreAnnotation = field.getAnnotation(QueryIgnore.class); - if (null != queryIgnoreAnnotation && queryIgnoreAnnotation.value()) { + if (null != queryIgnoreAnnotation) { return Collections.emptyList(); } // 建议:数据库表列建议采用下划线连接法命名,程序变量建议采用驼峰法命名 diff --git a/continew-starter-data/continew-starter-data-mp/src/main/java/top/continew/starter/data/mp/util/QueryWrapperHelper.java b/continew-starter-data/continew-starter-data-mp/src/main/java/top/continew/starter/data/mp/util/QueryWrapperHelper.java index 3a4e4fc2..22ba82fc 100644 --- a/continew-starter-data/continew-starter-data-mp/src/main/java/top/continew/starter/data/mp/util/QueryWrapperHelper.java +++ b/continew-starter-data/continew-starter-data-mp/src/main/java/top/continew/starter/data/mp/util/QueryWrapperHelper.java @@ -137,7 +137,7 @@ public class QueryWrapperHelper { } // 设置了 @QueryIgnore 注解,直接忽略 QueryIgnore queryIgnoreAnnotation = field.getAnnotation(QueryIgnore.class); - if (null != queryIgnoreAnnotation && queryIgnoreAnnotation.value()) { + if (null != queryIgnoreAnnotation) { return Collections.emptyList(); } // 建议:数据库表列建议采用下划线连接法命名,程序变量建议采用驼峰法命名