From bf5628d97f09774cd8fac4f2e3957f320d5eb77c Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 24 Jun 2022 19:10:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E5=B1=80=E6=95=B0=E6=8D=AE=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=AF=B9=E6=8E=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/common/controller/CensusControllerV2.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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()) {