@Test public void testGetPage() throws Exception { List<String> pageList = wxService.getCodeService().getPage(); System.out.println(String.valueOf(pageList)); }
@Override public List<String> getPage() throws WxErrorException { String responseContent = this.wxMaService.get(GET_PAGE_URL, null); JsonObject jsonObject = JSON_PARSER.parse(responseContent).getAsJsonObject(); boolean hasPageList = jsonObject.has("page_list"); if (hasPageList) { return WxMaGsonBuilder.create().fromJson(jsonObject.getAsJsonArray("page_list"), new TypeToken<List<String>>() { }.getType()); } else { return null; } }
WxMaCodeServiceImpl implements WxMaCodeService { @Override public List<String> getPage() throws WxErrorException { String responseContent = this.wxMaService.get(GET_PAGE_URL, null); JsonObject jsonObject = JSON_PARSER.parse(responseContent).getAsJsonObject(); boolean hasPageList = jsonObject.has("page_list"); if (hasPageList) { return WxMaGsonBuilder.create().fromJson(jsonObject.getAsJsonArray("page_list"), new TypeToken<List<String>>() { }.getType()); } else { return null; } } }
WxMaCodeServiceImpl implements WxMaCodeService { @Override public List<String> getPage() throws WxErrorException { String responseContent = this.wxMaService.get(GET_PAGE_URL, null); JsonObject jsonObject = JSON_PARSER.parse(responseContent).getAsJsonObject(); boolean hasPageList = jsonObject.has("page_list"); if (hasPageList) { return WxMaGsonBuilder.create().fromJson(jsonObject.getAsJsonArray("page_list"), new TypeToken<List<String>>() { }.getType()); } else { return null; } } WxMaCodeServiceImpl(WxMaService wxMaService); }
WxMaCodeServiceImpl implements WxMaCodeService { @Override public List<String> getPage() throws WxErrorException { String responseContent = this.wxMaService.get(GET_PAGE_URL, null); JsonObject jsonObject = JSON_PARSER.parse(responseContent).getAsJsonObject(); boolean hasPageList = jsonObject.has("page_list"); if (hasPageList) { return WxMaGsonBuilder.create().fromJson(jsonObject.getAsJsonArray("page_list"), new TypeToken<List<String>>() { }.getType()); } else { return null; } } WxMaCodeServiceImpl(WxMaService wxMaService); @Override void commit(WxMaCodeCommitRequest commitRequest); @Override byte[] getQrCode(); @Override List<WxMaCategory> getCategory(); @Override List<String> getPage(); @Override long submitAudit(WxMaCodeSubmitAuditRequest auditRequest); @Override WxMaCodeAuditStatus getAuditStatus(long auditId); @Override WxMaCodeAuditStatus getLatestAuditStatus(); @Override void release(); @Override void changeVisitStatus(String action); @Override void revertCodeRelease(); @Override WxMaCodeVersionDistribution getSupportVersion(); @Override void setSupportVersion(String version); @Override void undoCodeAudit(); }
WxMaCodeServiceImpl implements WxMaCodeService { @Override public List<String> getPage() throws WxErrorException { String responseContent = this.wxMaService.get(GET_PAGE_URL, null); JsonObject jsonObject = JSON_PARSER.parse(responseContent).getAsJsonObject(); boolean hasPageList = jsonObject.has("page_list"); if (hasPageList) { return WxMaGsonBuilder.create().fromJson(jsonObject.getAsJsonArray("page_list"), new TypeToken<List<String>>() { }.getType()); } else { return null; } } WxMaCodeServiceImpl(WxMaService wxMaService); @Override void commit(WxMaCodeCommitRequest commitRequest); @Override byte[] getQrCode(); @Override List<WxMaCategory> getCategory(); @Override List<String> getPage(); @Override long submitAudit(WxMaCodeSubmitAuditRequest auditRequest); @Override WxMaCodeAuditStatus getAuditStatus(long auditId); @Override WxMaCodeAuditStatus getLatestAuditStatus(); @Override void release(); @Override void changeVisitStatus(String action); @Override void revertCodeRelease(); @Override WxMaCodeVersionDistribution getSupportVersion(); @Override void setSupportVersion(String version); @Override void undoCodeAudit();  }