diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index 9495a5e3..d8a7e283 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -409,10 +409,9 @@ public class CensusControllerV2 { TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService(); GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto().setPageNum(1).setPageSize(5); HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto); - JSONObject data = JSON.parseObject(JSON.toJSONString(dataResource.get("data"))); result.add(new HashMap() { { - put("amount", data.get("rows")); + put("amount", dataResource.get("rows")); put("type", "总数据量"); } }); @@ -430,8 +429,7 @@ public class CensusControllerV2 { }); result.add(new HashMap() { { - String ja = data.getString("data"); - List lists = JSON.parseArray(ja, Map.class); + List lists = (List) dataResource.get("data"); ArrayList list = new ArrayList<>(); lists.forEach(item -> { list.add(new HashMap() {{ @@ -468,7 +466,6 @@ public class CensusControllerV2 { logger.error("青岛西海岸失败", exception); } - OkHttpClient client1 = new OkHttpClient(); Request request1 = new Request.Builder().url(tsingtao_xhaProperties.getResourceapplyinfo()).build(); try (Response response = client1.newCall(request1).execute()) {