| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | if (StrUtil.isEmpty(sysOperLogVO.getStartTime()) && StrUtil.isEmpty(sysOperLogVO.getEndTime())){ |
| | | sysOperLogVO.setStartTime(com.panzhihua.common.utlis.DateUtils.getBeforeDay(30)); |
| | | sysOperLogVO.setEndTime(com.panzhihua.common.utlis.DateUtils.getCurrentDateymd()); |
| | | } |
| | | IPage<SysOperLogVO> iPage = sysOperLogDAO.pageOperLog(page, sysOperLogVO); |
| | | return R.ok(iPage); |
| | | } |
| | |
| | | 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(dateStr) : "0"); |
| | | adY.add(dailyAddMap.containsKey(dateStr) ? dailyAddMap.get(dateStr) : "0"); |
| | | |
| | | } |
| | | vo.setUserX(getMAndD(activeDate)); |