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"); }