File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
APIJSONORM/src/main/java/apijson/orm Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1293,12 +1293,22 @@ else if (childKeys.length == 1 && JSONRequest.isTableKey(childKeys[0])) { //
1293
1293
* modify by gouchy chen
1294
1294
* 带有key[]格式时,也需要返回所有的字段
1295
1295
*/
1296
+
1296
1297
if (childKeys == null || childKeys .length == 0 ) {
1297
1298
response .add (getValue (parent , null )); //null有意义
1298
- } else if (childKeys .length == 1 && parent .keySet ().size () == 1 ) {
1299
- response .add (getValue (parent , null )); //null有意义
1300
1299
} else {
1301
- response .add (getValue (parent , childKeys )); //null有意义
1300
+ List <String > needObjectList = new ArrayList <>();
1301
+ for (String key : parent .keySet ()) {
1302
+ if (!key .startsWith ("@" ) && !key .endsWith ("@" )) {
1303
+ needObjectList .add (key );
1304
+ }
1305
+ }
1306
+ if (needObjectList .size () == 1 ) {
1307
+ response .add (getValue (parent , childKeys )); //null有意义
1308
+ } else {
1309
+ response .add (getValue (parent , null ));
1310
+ }
1311
+
1302
1312
}
1303
1313
}
1304
1314
You can’t perform that action at this time.
0 commit comments