diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 2aa94c42..aefcdf6c 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -316,14 +316,18 @@ public class ResourceController { String startTag = ""; String endTag = ""; String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag)); - List results = JSONObject.parseObject(json, LinkedList.class); + HashMap result = JSONObject.parseObject(json, HashMap.class); - List objects = results.stream() + List rows = (List) result.get("data"); + + + List objects = rows.stream() .filter(item -> item.get("main") != null) .map(item -> item.get("main")) .collect(Collectors.toList()); + result.put("data", objects); - return new Result().ok(objects); + return new Result().ok(result); } catch (Exception e) { e.printStackTrace(); return new Result().ok(new ArrayList(0));