}
private StateReport queryDailyReportsByDuration(String domain, Date start, Date end) {
long startTime = start.getTime();
long endTime = end.getTime();
HistoryStateReportMerger merger = new HistoryStateReportMerger(new StateReport(domain));
for (; startTime < endTime; startTime += TimeHelper.ONE_DAY) {
try {
StateReport reportModel = m_reportService.queryStateReport(domain, new Date(startTime), new Date(startTime
+ TimeHelper.ONE_DAY));
reportModel.accept(merger);
} catch (Exception e) {
Cat.logError(e);
}
}
StateReport stateReport = merger.getStateReport();
new ClearDetailInfo().visitStateReport(stateReport);
stateReport.setStartTime(start);
stateReport.setEndTime(end);
return stateReport;
}