@Test public void testList(){ List<String> list = Cards.defaultCards().list(0, 10, null); Assert.assertNotNull(list); }
public List<String> list(int offset, int count, List<String> statusList) { Map<String, Object> request = new HashMap<>(); request.put("offset", offset); request.put("count", count); if (statusList != null && !statusList.isEmpty()) { request.put("status_list", statusList); } String url = WxEndpoint.get("url.card.list"); String json = JsonMapper.defaultMapper().toJson(request); String response = wxClient.post(url, json); Map<String, Object> result = JsonMapper.defaultMapper().json2Map(response); if (result.containsKey("card_id_list")) { return (List<String>) result.get("card_id_list"); } else { throw new WxRuntimeException(999, "create card failed."); } }
Cards { public List<String> list(int offset, int count, List<String> statusList) { Map<String, Object> request = new HashMap<>(); request.put("offset", offset); request.put("count", count); if (statusList != null && !statusList.isEmpty()) { request.put("status_list", statusList); } String url = WxEndpoint.get("url.card.list"); String json = JsonMapper.defaultMapper().toJson(request); String response = wxClient.post(url, json); Map<String, Object> result = JsonMapper.defaultMapper().json2Map(response); if (result.containsKey("card_id_list")) { return (List<String>) result.get("card_id_list"); } else { throw new WxRuntimeException(999, "create card failed."); } } }
Cards { public List<String> list(int offset, int count, List<String> statusList) { Map<String, Object> request = new HashMap<>(); request.put("offset", offset); request.put("count", count); if (statusList != null && !statusList.isEmpty()) { request.put("status_list", statusList); } String url = WxEndpoint.get("url.card.list"); String json = JsonMapper.defaultMapper().toJson(request); String response = wxClient.post(url, json); Map<String, Object> result = JsonMapper.defaultMapper().json2Map(response); if (result.containsKey("card_id_list")) { return (List<String>) result.get("card_id_list"); } else { throw new WxRuntimeException(999, "create card failed."); } }  }
Cards { public List<String> list(int offset, int count, List<String> statusList) { Map<String, Object> request = new HashMap<>(); request.put("offset", offset); request.put("count", count); if (statusList != null && !statusList.isEmpty()) { request.put("status_list", statusList); } String url = WxEndpoint.get("url.card.list"); String json = JsonMapper.defaultMapper().toJson(request); String response = wxClient.post(url, json); Map<String, Object> result = JsonMapper.defaultMapper().json2Map(response); if (result.containsKey("card_id_list")) { return (List<String>) result.get("card_id_list"); } else { throw new WxRuntimeException(999, "create card failed."); } }  static Cards defaultCards(); static Cards with(AppSetting appSetting); void setWxClient(WxClient wxClient); String groupon(Groupon groupon); String cash(Cash cash); String gift(Gift gift); String discount(Discount discount); String coupon(Coupon coupon); String member(Member member); int count(List<String> statusList); List<String> list(int offset, int count, List<String> statusList); Card get(String cardId); void setWhiteList(List<String> openIds, List<String> userNames); List<Color> listColors(); }
Cards { public List<String> list(int offset, int count, List<String> statusList) { Map<String, Object> request = new HashMap<>(); request.put("offset", offset); request.put("count", count); if (statusList != null && !statusList.isEmpty()) { request.put("status_list", statusList); } String url = WxEndpoint.get("url.card.list"); String json = JsonMapper.defaultMapper().toJson(request); String response = wxClient.post(url, json); Map<String, Object> result = JsonMapper.defaultMapper().json2Map(response); if (result.containsKey("card_id_list")) { return (List<String>) result.get("card_id_list"); } else { throw new WxRuntimeException(999, "create card failed."); } }  static Cards defaultCards(); static Cards with(AppSetting appSetting); void setWxClient(WxClient wxClient); String groupon(Groupon groupon); String cash(Cash cash); String gift(Gift gift); String discount(Discount discount); String coupon(Coupon coupon); String member(Member member); int count(List<String> statusList); List<String> list(int offset, int count, List<String> statusList); Card get(String cardId); void setWhiteList(List<String> openIds, List<String> userNames); List<Color> listColors();  }