| | |
| | | activeDate = getMonthTwentyDays(); |
| | | } |
| | | } |
| | | |
| | | //获取最近活跃人数 |
| | | Map<String, Long> active = userDao.getActive(activeX, streetId, areaCode, appId); |
| | | List<UsersStatisticsDTO> actives = userDao.getActive(activeX, streetId, areaCode, appId); |
| | | //获取最近注册人数 |
| | | Map<String, Long> dailyAdd = userDao.getDailyAdd(activeX, streetId, areaCode, appId); |
| | | List<UsersStatisticsDTO> dailyAdds = userDao.getDailyAdd(activeX, streetId, areaCode, appId); |
| | | Map<String, String> activeMap = actives.stream().collect(Collectors.toMap(UsersStatisticsDTO::getSpecificDate, UsersStatisticsDTO::getTotal)); |
| | | Map<String, String> dailyAddMap = dailyAdds.stream().collect(Collectors.toMap(UsersStatisticsDTO::getSpecificDate, UsersStatisticsDTO::getTotal)); |
| | | |
| | | |
| | | for (Date date : activeDate) { |
| | | String dateStr = DateUtil.format(date, "yyyy-MM-dd"); |
| | | activeY.add(active.containsKey(dateStr) ? active.get("activeUser").toString() : "0"); |
| | | adY.add(dailyAdd.containsKey(dateStr) ? dailyAdd.get("addUser").toString() : "0"); |
| | | activeY.add(activeMap.containsKey(dateStr) ? activeMap.get("activeUser").toString() : "0"); |
| | | adY.add(dailyAddMap.containsKey(dateStr) ? dailyAddMap.get("addUser").toString() : "0"); |
| | | |
| | | } |
| | | vo.setUserX(getMAndD(activeDate)); |