class WxMaTemplateServiceImpl implements WxMaTemplateService {

  @Override
  public WxMaTemplateListResult findTemplateList(int offset, int count) throws WxErrorException {

    Map<String, Integer> params = new HashMap<>();
    params.put("offset", offset);
    params.put("count", count);

    String responseText = this.wxMaService.post(TEMPLATE_LIST_URL, WxGsonBuilder.create().toJson(params));
    WxError wxError = WxError.fromJson(responseText);
    if(wxError.getErrorCode() == 0){
      return WxMaTemplateListResult.fromJson(responseText);
    }else {
      throw new WxErrorException(wxError);
    }
  }

  public  WxMaTemplateServiceImpl(WxMaService wxMaService);

}