From 49501e1d1c1571a7cbb8f36017f183f0bd7fb8ef Mon Sep 17 00:00:00 2001 From: guyuliang Date: Tue, 27 Aug 2024 12:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E5=B9=B3=E5=8F=B0=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bocloud/sms/service/IndexServiceImpl.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/IndexServiceImpl.java b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/IndexServiceImpl.java index 3a43c42..c8625da 100644 --- a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/IndexServiceImpl.java +++ b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/IndexServiceImpl.java @@ -98,16 +98,15 @@ public class IndexServiceImpl implements IndexService { //获取用户数据权限申请数量 JSONObject userParam = new JSONObject(); userParam.put("userId", "1111"); - String userDataAuthStr = ykUtil.call(YkInfo.getCountTaskByUser, userParam, JSONArray.class); - List userDataJAuthJson = JSONObject.parseObject(userDataAuthStr, List.class); - List authResList = JSONObject.parseObject(userDataJAuthJson.get(0).getString("authRes"),List.class); + String data = ykUtil.call(YkInfo.getCountTaskByUser, userParam, JSONArray.class); + List list = JSONObject.parseObject(data, List.class); String result = warnUtil.call(WarnInfo.get1DayWarnCount.getUrl(), "GET"); - log.info("result:"+result); + log.info("result:" + result); // log.info("resultMap:{}", JSON.toJSONString(resultMap)); - return new GeneralResult(true, "查询成功"); + return new GeneralResult(true, list, "查询成功"); } catch (Exception e) { log.info("查询失败", e); return new GeneralResult(false, "查询失败"); @@ -131,9 +130,9 @@ public class IndexServiceImpl implements IndexService { List userAppList = getUserAppList(requestContext); List appIdList = userAppList.stream().map(jsonObject -> jsonObject.getString("appId")).collect(Collectors.toList()); for (JSONObject data : allAppList) { - if(appIdList.contains(data.getString("appId"))){ + if (appIdList.contains(data.getString("appId"))) { data.put("enable", "1"); - }else{ + } else { data.put("enable", "0"); }