Authored by Lixiaodi

点击数统计 实时

... ... @@ -839,10 +839,10 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher
int startHour = (int) (time.getTimeInMillis()/1000);
int count = 0;
log.info("queryActivateCount getTodayCount startHour is {}", new Date(startHour * 1000L));
log.info("queryActivateCount getTodayCount startHour is {}", format.format(new Date(startHour * 1000L)));
if (startHour != start) {
int e = Math.min(startHour + 3600, end);
log.info("queryActivateCount getTodayCount param is {}, {}", new Date(start * 1000L), new Date(e * 1000L));
log.info("queryActivateCount getTodayCount param is {}, {}", format.format(new Date(start * 1000L)), format.format(new Date(e * 1000L)));
count += unionClickLogsDAO.queryCountInfo(unionType, apptype, start, e);
start = e;
}
... ... @@ -852,13 +852,13 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher
while (start < end) {
Integer c = 0;
if (start + 3600 < end) {
log.info("queryActivateCount getTodayCount from redis param is {}", new Date(start * 1000L));
log.info("queryActivateCount getTodayCount from redis param is {}", format.format(new Date(start * 1000L)));
c = map.get(start);
if (c == null) {
c = 0;
}
} else {
log.info("queryActivateCount getTodayCount from db param is {}, {}", new Date(start * 1000L),
log.info("queryActivateCount getTodayCount from db param is {}, {}", format.format(new Date(start * 1000L)),
new Date(end * 1000L));
c = unionClickLogsDAO.queryCountInfo(unionType, apptype, start, end);
}
... ...