From 3e5e6512c6d35827e61b3500323c6db57b9b4cad Mon Sep 17 00:00:00 2001 From: Bill <1594805355@qq.com> Date: Sun, 2 Jun 2024 17:03:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=92=8C?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=20TABLE=5FSCHEMA=5FMAP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/apijson/framework/APIJSONVerifier.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/apijson/framework/APIJSONVerifier.java b/src/main/java/apijson/framework/APIJSONVerifier.java index 02d1ee0..54f7191 100755 --- a/src/main/java/apijson/framework/APIJSONVerifier.java +++ b/src/main/java/apijson/framework/APIJSONVerifier.java @@ -188,6 +188,7 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON Map> newMap = new LinkedHashMap<>(); Map> fakeDeleteMap = new LinkedHashMap<>(); Map newTKMap = new LinkedHashMap<>(); + Map tableSchemaMap = new LinkedHashMap<>(); SortedMap>> versionedTableColumnMap = new TreeMap<>(ColumnUtil.DESC_COMPARATOR); SortedMap>> versionedKeyColumnMap = new TreeMap<>(ColumnUtil.DESC_COMPARATOR); @@ -208,6 +209,7 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON String name = item.getString("name"); String alias = item.getString("alias"); + String schema = item.getString("schema"); Map fakemap = new HashMap<>(); String deletedKey = item.getString(AbstractSQLConfig.KEY_DELETED_KEY); @@ -251,6 +253,7 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON newMap.put(alias, map); fakeDeleteMap.put(alias, fakemap); newTKMap.put(alias, name); + tableSchemaMap.put(alias,schema); if (ENABLE_VERIFY_COLUMN) { JSONObject columns = item.getJSONObject("columns"); @@ -313,10 +316,12 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON ACCESS_MAP = newMap; ACCESS_FAKE_DELETE_MAP = fakeDeleteMap; APIJSONSQLConfig.TABLE_KEY_MAP = newTKMap; + APIJSONSQLConfig.TABLE_SCHEMA_MAP = tableSchemaMap; } else { ACCESS_MAP.putAll(newMap); ACCESS_FAKE_DELETE_MAP.putAll(fakeDeleteMap); APIJSONSQLConfig.TABLE_KEY_MAP.putAll(newTKMap); + APIJSONSQLConfig.TABLE_SCHEMA_MAP = tableSchemaMap; } if (ENABLE_VERIFY_COLUMN) { From 9b9cf814553eccb6c90563f22967f604d6f46061 Mon Sep 17 00:00:00 2001 From: TommyLemon <1184482681@qq.com> Date: Sun, 2 Jun 2024 17:17:30 +0800 Subject: [PATCH 2/2] Update APIJSONVerifier.java --- src/main/java/apijson/framework/APIJSONVerifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/apijson/framework/APIJSONVerifier.java b/src/main/java/apijson/framework/APIJSONVerifier.java index 54f7191..1a7643f 100755 --- a/src/main/java/apijson/framework/APIJSONVerifier.java +++ b/src/main/java/apijson/framework/APIJSONVerifier.java @@ -253,7 +253,7 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON newMap.put(alias, map); fakeDeleteMap.put(alias, fakemap); newTKMap.put(alias, name); - tableSchemaMap.put(alias,schema); + tableSchemaMap.put(alias, schema); if (ENABLE_VERIFY_COLUMN) { JSONObject columns = item.getJSONObject("columns");