@@ -210,12 +210,23 @@ public static <T> JSONObject initAccess(boolean shutdownWhenServerError, APIJSON
210
210
String alias = item .getString ("alias" );
211
211
212
212
Map <String , Object > fakemap = new HashMap <>();
213
- if (StringUtil .isNotEmpty (item .getString ("deletedKey" ), true )) {
214
- if (StringUtil .isEmpty (item .getString ("deletedValue" ), true )) {
215
- onServerError ("Access表 id= " + item .getString ("id" ) +", deletedKey,deletedValue 的值不能为空!" , shutdownWhenServerError );
213
+ String deletedKey = item .getString (AbstractSQLConfig .KEY_DELETED_KEY );
214
+ if (StringUtil .isNotEmpty (deletedKey , true )) {
215
+ boolean containNotDeletedValue = item .containsKey (AbstractSQLConfig .KEY_NOT_DELETED_VALUE );
216
+ Object deletedValue = item .getString (AbstractSQLConfig .KEY_DELETED_VALUE );
217
+ if (containNotDeletedValue == false && StringUtil .isEmpty (deletedValue , true )) {
218
+ onServerError (
219
+ "Access表 id = " + item .getString ("id" ) + " 对应的 "
220
+ + AbstractSQLConfig .KEY_DELETED_VALUE + " 的值不能为空!或者必须包含字段 "
221
+ + AbstractSQLConfig .KEY_NOT_DELETED_VALUE + " !"
222
+ , shutdownWhenServerError
223
+ );
224
+ }
225
+ fakemap .put (AbstractSQLConfig .KEY_DELETED_KEY , deletedKey );
226
+ fakemap .put (AbstractSQLConfig .KEY_DELETED_VALUE , deletedValue );
227
+ if (containNotDeletedValue ) {
228
+ fakemap .put (AbstractSQLConfig .KEY_NOT_DELETED_VALUE , item .get (AbstractSQLConfig .KEY_NOT_DELETED_VALUE ));
216
229
}
217
- fakemap .put ("deletedKey" , item .getString ("deletedKey" ));
218
- fakemap .put ("deletedValue" , item .getString ("deletedValue" ));
219
230
}
220
231
221
232
/**TODO
0 commit comments