@@ -787,7 +787,7 @@ public JSONArray onArrayParse(JSONObject request, String parentPath, String name
787787 }
788788
789789 //不能允许GETS,否则会被通过"[]":{"@role":"ADMIN"},"Table":{},"tag":"Table"绕过权限并能批量查询
790- if (RequestMethod .isGetMethod (requestMethod , false ) == false ) {
790+ if (isSubquery == false && RequestMethod .isGetMethod (requestMethod , false ) == false ) {
791791 throw new UnsupportedOperationException ("key[]:{}只支持GET方法!不允许传 " + name + ":{} !" );
792792 }
793793 if (request == null || request .isEmpty ()) {//jsonKey-jsonValue条件
@@ -855,7 +855,7 @@ public JSONArray onArrayParse(JSONObject request, String parentPath, String name
855855
856856
857857 //key[]:{Table:{}}中key equals Table时 提取Table
858- int index = name == null ? -1 : name .lastIndexOf ("[]" );
858+ int index = isSubquery || name == null ? -1 : name .lastIndexOf ("[]" );
859859 String childPath = index <= 0 ? null : Pair .parseEntry (name .substring (0 , index ), true ).getKey (); // Table-key1-key2...
860860
861861 //判断第一个key,即Table是否存在,如果存在就提取
@@ -877,7 +877,7 @@ public JSONArray onArrayParse(JSONObject request, String parentPath, String name
877877 JSONObject parent ;
878878 //生成size个
879879 for (int i = 0 ; i < (isSubquery ? 1 : size ); i ++) {
880- parent = onObjectParse (request , path , "" + i , config .setType (SQLConfig .TYPE_ITEM ).setPosition (i ), isSubquery );
880+ parent = onObjectParse (request , isSubquery ? parentPath : path , isSubquery ? name : "" + i , config .setType (SQLConfig .TYPE_ITEM ).setPosition (i ), isSubquery );
881881 if (parent == null || parent .isEmpty ()) {
882882 break ;
883883 }
0 commit comments