Showing
1 changed file
with
4 additions
and
2 deletions
@@ -815,18 +815,20 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher | @@ -815,18 +815,20 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher | ||
815 | int endTime = beginTime+3600*24-1; | 815 | int endTime = beginTime+3600*24-1; |
816 | activateDeviceIdReqBO.setActivateHourBegin(beginTime); | 816 | activateDeviceIdReqBO.setActivateHourBegin(beginTime); |
817 | activateDeviceIdReqBO.setActivateHourEnd(endTime); | 817 | activateDeviceIdReqBO.setActivateHourEnd(endTime); |
818 | - //查询出一个渠道一天的激活数 | 818 | + //2.查询出一个渠道一天的激活数 |
819 | List<UnionLogs> unionLogs = unionLogsDAO.selectListByHour(activateDeviceIdReqBO); | 819 | List<UnionLogs> unionLogs = unionLogsDAO.selectListByHour(activateDeviceIdReqBO); |
820 | 820 | ||
821 | for(int i=0;i<unionLogs.size();i++){ | 821 | for(int i=0;i<unionLogs.size();i++){ |
822 | UnionLogs unionLog = unionLogs.get(i); | 822 | UnionLogs unionLog = unionLogs.get(i); |
823 | String createTime = DateUtils.int2DateStr(unionLog.getCreateTime(),"yyyy-MM-dd HH:mm:ss"); | 823 | String createTime = DateUtils.int2DateStr(unionLog.getCreateTime(),"yyyy-MM-dd HH:mm:ss"); |
824 | - //遍历一天的记录,统计每小时的激活数 | 824 | + //3.遍历一天的记录,统计每小时的激活数 |
825 | int key = Integer.parseInt(createTime.substring(11,13)); | 825 | int key = Integer.parseInt(createTime.substring(11,13)); |
826 | List<Integer> countList = countMap.get(key); | 826 | List<Integer> countList = countMap.get(key); |
827 | + //list第一个元素是idfa的激活数 | ||
827 | if(StringUtils.isNotEmpty(unionLog.getIdfa())){ | 828 | if(StringUtils.isNotEmpty(unionLog.getIdfa())){ |
828 | countList.set(0,countList.get(0)+1); | 829 | countList.set(0,countList.get(0)+1); |
829 | } | 830 | } |
831 | + //list第二个元素是idfa的激活数 | ||
830 | if (StringUtils.isNotEmpty(unionLog.getImei())){ | 832 | if (StringUtils.isNotEmpty(unionLog.getImei())){ |
831 | countList.set(1,countList.get(1)+1); | 833 | countList.set(1,countList.get(1)+1); |
832 | } | 834 | } |
-
Please register or login to post a comment