@Test public void testGetVisitDistribution() throws Exception { final WxMaAnalysisService service = wxMaService.getAnalysisService(); Date twoDaysAgo = DateUtils.addDays(new Date(), -2); WxMaVisitDistribution distribution = service.getVisitDistribution(twoDaysAgo, twoDaysAgo); assertNotNull(distribution); String date = DateFormatUtils.format(twoDaysAgo, "yyyyMMdd"); assertEquals(date, distribution.getRefDate()); assertTrue(distribution.getList().containsKey("access_source_session_cnt")); assertTrue(distribution.getList().containsKey("access_staytime_info")); assertTrue(distribution.getList().containsKey("access_depth_info")); System.out.println(distribution); }
@Override public WxMaVisitDistribution getVisitDistribution(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMaService.post(GET_VISIT_DISTRIBUTION_URL, toJson(beginDate, endDate)); return WxMaVisitDistribution.fromJson(responseContent); }
WxMaAnalysisServiceImpl implements WxMaAnalysisService { @Override public WxMaVisitDistribution getVisitDistribution(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMaService.post(GET_VISIT_DISTRIBUTION_URL, toJson(beginDate, endDate)); return WxMaVisitDistribution.fromJson(responseContent); } }
WxMaAnalysisServiceImpl implements WxMaAnalysisService { @Override public WxMaVisitDistribution getVisitDistribution(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMaService.post(GET_VISIT_DISTRIBUTION_URL, toJson(beginDate, endDate)); return WxMaVisitDistribution.fromJson(responseContent); } WxMaAnalysisServiceImpl(WxMaService wxMaService); }
WxMaAnalysisServiceImpl implements WxMaAnalysisService { @Override public WxMaVisitDistribution getVisitDistribution(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMaService.post(GET_VISIT_DISTRIBUTION_URL, toJson(beginDate, endDate)); return WxMaVisitDistribution.fromJson(responseContent); } WxMaAnalysisServiceImpl(WxMaService wxMaService); @Override List<WxMaSummaryTrend> getDailySummaryTrend(Date beginDate, Date endDate); @Override List<WxMaVisitTrend> getDailyVisitTrend(Date beginDate, Date endDate); @Override List<WxMaVisitTrend> getWeeklyVisitTrend(Date beginDate, Date endDate); @Override List<WxMaVisitTrend> getMonthlyVisitTrend(Date beginDate, Date endDate); @Override WxMaVisitDistribution getVisitDistribution(Date beginDate, Date endDate); @Override WxMaRetainInfo getDailyRetainInfo(Date beginDate, Date endDate); @Override WxMaRetainInfo getWeeklyRetainInfo(Date beginDate, Date endDate); @Override WxMaRetainInfo getMonthlyRetainInfo(Date beginDate, Date endDate); @Override List<WxMaVisitPage> getVisitPage(Date beginDate, Date endDate); @Override WxMaUserPortrait getUserPortrait(Date beginDate, Date endDate); }
WxMaAnalysisServiceImpl implements WxMaAnalysisService { @Override public WxMaVisitDistribution getVisitDistribution(Date beginDate, Date endDate) throws WxErrorException { String responseContent = this.wxMaService.post(GET_VISIT_DISTRIBUTION_URL, toJson(beginDate, endDate)); return WxMaVisitDistribution.fromJson(responseContent); } WxMaAnalysisServiceImpl(WxMaService wxMaService); @Override List<WxMaSummaryTrend> getDailySummaryTrend(Date beginDate, Date endDate); @Override List<WxMaVisitTrend> getDailyVisitTrend(Date beginDate, Date endDate); @Override List<WxMaVisitTrend> getWeeklyVisitTrend(Date beginDate, Date endDate); @Override List<WxMaVisitTrend> getMonthlyVisitTrend(Date beginDate, Date endDate); @Override WxMaVisitDistribution getVisitDistribution(Date beginDate, Date endDate); @Override WxMaRetainInfo getDailyRetainInfo(Date beginDate, Date endDate); @Override WxMaRetainInfo getWeeklyRetainInfo(Date beginDate, Date endDate); @Override WxMaRetainInfo getMonthlyRetainInfo(Date beginDate, Date endDate); @Override List<WxMaVisitPage> getVisitPage(Date beginDate, Date endDate); @Override WxMaUserPortrait getUserPortrait(Date beginDate, Date endDate);  }