资源目录列表增加分页总数
This commit is contained in:
parent
593aa55e24
commit
508047c9a4
|
@ -316,14 +316,18 @@ public class ResourceController {
|
|||
String startTag = "<ZWCJ_mainPortResult>";
|
||||
String endTag = "</ZWCJ_mainPortResult>";
|
||||
String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag));
|
||||
List<Map> results = JSONObject.parseObject(json, LinkedList.class);
|
||||
HashMap result = JSONObject.parseObject(json, HashMap.class);
|
||||
|
||||
List<Object> objects = results.stream()
|
||||
List<Map> rows = (List<Map>) result.get("data");
|
||||
|
||||
|
||||
List<Object> 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));
|
||||
|
|
Loading…
Reference in New Issue