提交 c0724575 编写于 作者: Y youyong

modify the cat top local service

上级 99013770
package com.dianping.cat.report.page.model.top;
import java.util.Date;
import org.unidal.lookup.annotation.Inject;
import com.dianping.cat.consumer.top.model.entity.TopReport;
import com.dianping.cat.consumer.top.model.transform.DefaultSaxParser;
import com.dianping.cat.helper.TimeUtil;
import com.dianping.cat.report.page.model.spi.ModelPeriod;
import com.dianping.cat.report.page.model.spi.ModelRequest;
import com.dianping.cat.report.page.model.spi.internal.BaseLocalModelService;
......@@ -40,7 +43,15 @@ public class LocalTopService extends BaseLocalModelService<TopReport> {
report = getLocalReport(date, domain);
if (report == null) {
report = new TopReport(domain);
Date start = new Date(date);
Date end = new Date(date + TimeUtil.ONE_HOUR);
report = m_reportSerivce.queryTopReport(domain, start, end);
if (report == null) {
report = new TopReport(domain);
report.setStartTime(start);
report.setEndTime(end);
}
}
}
return report;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册