return report;
}
@Override
public CrossReport queryDailyReport(String domain, Date start, Date end) {
CrossReportMerger merger = new CrossReportMerger(new CrossReport(domain));
long startTime = start.getTime();
long endTime = end.getTime();
String name = CrossAnalyzer.ID;
for (; startTime < endTime; startTime = startTime + TimeHelper.ONE_DAY) {
try {
DailyReport report = m_dailyReportDao.findByDomainNamePeriod(domain, name, new Date(startTime),
DailyReportEntity.READSET_FULL);
String xml = report.getContent();
if (xml != null && xml.length() > 0) {
CrossReport reportModel = com.dianping.cat.consumer.cross.model.transform.DefaultSaxParser.parse(xml);
reportModel.accept(merger);
} else {
CrossReport reportModel = queryFromDailyBinary(report.getId(), domain);
reportModel.accept(merger);
}
} catch (DalNotFoundException e) {
//ignore
} catch (Exception e) {
Cat.logError(e);
}
}
CrossReport crossReport = merger.getCrossReport();
crossReport.setStartTime(start);
crossReport.setEndTime(end);
return crossReport;
}