From 83e878033544a6bb3d3729584de8ee35833607fa Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sun, 3 Sep 2023 17:25:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=BC=95=E7=94=A8=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E5=8F=96=E4=B8=8D=E5=88=B0=E6=9C=89=E6=95=88=E5=80=BC?= =?UTF-8?q?=EF=BC=8C=E7=9B=B4=E6=8E=A5=E5=BF=BD=E7=95=A5=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=BB=8D=E7=84=B6=E6=89=A7=E8=A1=8C=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/apijson/orm/AbstractObjectParser.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java b/APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java index 301914dc..6c010cde 100755 --- a/APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java +++ b/APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java @@ -423,7 +423,15 @@ else if (value instanceof String) { // //key{}@ getRealKey, 引用赋值路径 if (target == null) { // String#equals(null)会出错 Log.d(TAG, "onParse target == null >> return true;"); - return true; + // 非查询关键词 @key 不影响查询,直接跳过 + if (isTable && (key.startsWith("@") == false || JSONRequest.TABLE_KEY_LIST.contains(key))) { + Log.e(TAG, "onParse isTable && (key.startsWith(@) == false" + + " || JSONRequest.TABLE_KEY_LIST.contains(key)) >> return null;"); + return false; // 获取不到就不用再做无效的 query 了。不考虑 Table:{Table:{}} 嵌套 + } + + Log.d(TAG, "onParse isTable(table) == false >> return true;"); + return true; // 舍去,对Table无影响 } // if (target instanceof Map) { // target 可能是从 requestObject 里取出的 {}