@@ -1223,7 +1223,7 @@ public M onObjectParse(final M request, String parentPath, String name
12231223 page += min ;
12241224 max += min ;
12251225
1226- Map < String , Object > pagination = new LinkedHashMap < String , Object > ();
1226+ M pagination = ( M ) JSON . createJSONObject ();
12271227 Object explain = rp .get (JSONResponse .KEY_EXPLAIN );
12281228 if (explain instanceof Map <?, ?>) {
12291229 pagination .put (JSONResponse .KEY_EXPLAIN , explain );
@@ -1509,7 +1509,7 @@ else if (childKeys.length == 1 && JSONRequest.isTableKey(childKeys[0])) { //
15091509 * @return
15101510 * @throws Exception
15111511 */
1512- private List <Join <T , M , L >> onJoinParse (Object join , Map < String , Object > request ) throws Exception {
1512+ private List <Join <T , M , L >> onJoinParse (Object join , M request ) throws Exception {
15131513 Map <String , Object > joinMap = null ;
15141514
15151515 if (join instanceof Map <?, ?>) {
@@ -1584,8 +1584,8 @@ else if (join != null){
15841584 }
15851585
15861586 // 取出Table对应的JSONObject,及内部引用赋值 key:value
1587- Map < String , Object > tableObj ;
1588- Map < String , Object > parentPathObj ; // 保留
1587+ M tableObj ;
1588+ M parentPathObj ; // 保留
15891589 try {
15901590 parentPathObj = arrKey == null ? request : JSON .get (request , arrKey ); // 保留
15911591 tableObj = parentPathObj == null ? null : JSON .get (parentPathObj , tableKey );
@@ -1595,7 +1595,7 @@ else if (join != null){
15951595 }
15961596 catch (Exception e2 ) {
15971597 throw new IllegalArgumentException (JSONRequest .KEY_JOIN + ":'" + e .getKey () + "' 对应的 " + tableKey + ":value 中 value 类型不合法!" +
1598- "必须是 {} 这种 Map<String, Object> 格式!" + e2 .getMessage ());
1598+ "必须是 {} 这种 Map<String, Object> 格式!" + e2 .getMessage ());
15991599 }
16001600
16011601 if (arrKey != null ) {
@@ -1613,7 +1613,7 @@ else if (join != null){
16131613
16141614 boolean isAppJoin = "@" .equals (joinType );
16151615
1616- Map < String , Object > refObj = new LinkedHashMap < String , Object >( tableObj . size () );
1616+ M refObj = ( M ) JSON . createJSONObject ( );
16171617
16181618 String key = index < 0 ? null : path .substring (index + 1 ); // id@
16191619 if (key != null ) { // 指定某个 key 为 JOIN ON 条件
@@ -1625,7 +1625,7 @@ else if (join != null){
16251625
16261626 if (tableObj .get (key ) instanceof String == false ) {
16271627 throw new IllegalArgumentException (JSONRequest .KEY_JOIN + ":" + e .getKey () + "' 对应的 "
1628- + tableKey + ":{ " + key + ": value } 中 value 类型不合法!必须为同层级引用赋值路径 String!" );
1628+ + tableKey + ":{ " + key + ": value } 中 value 类型不合法!必须为同层级引用赋值路径 String!" );
16291629 }
16301630
16311631 if (isAppJoin && StringUtil .isName (key .substring (0 , key .length () - 1 )) == false ) {
@@ -1639,7 +1639,7 @@ else if (join != null){
16391639
16401640 Set <Entry <String , Object >> tableSet = tableObj .entrySet ();
16411641 // 取出所有 join 条件
1642- Map < String , Object > requestObj = new LinkedHashMap < String , Object > (); // (Map<String, Object>) obj.clone();
1642+ M requestObj = ( M ) JSON . createJSONObject (); // (Map<String, Object>) obj.clone();
16431643
16441644 boolean matchSingle = false ;
16451645 for (Entry <String , Object > tableEntry : tableSet ) {
@@ -1717,13 +1717,16 @@ else if (join != null){
17171717 }
17181718
17191719
1720- Join j = new Join ();
1720+ Join < T , M , L > j = new Join <> ();
17211721 j .setPath (e .getKey ());
17221722 j .setJoinType (joinType );
17231723 j .setTable (table );
17241724 j .setAlias (alias );
1725- j .setOuter ((Map <String , Object >) outer );
1725+
1726+ M outerObj = (M ) JSON .createJSONObject ((Map <String , Object >) outer );
1727+ j .setOuter (outerObj );
17261728 j .setRequest (requestObj );
1729+
17271730 if (arrKey != null ) {
17281731 Integer count = getInteger (parentPathObj , JSONRequest .KEY_COUNT );
17291732 j .setCount (count == null ? getDefaultQueryCount () : count );
0 commit comments