@Test public void test() { String appKey = "XXXXXXXX"; String secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; try { Map<String, List<Map<String, Object>>> deals = DemoDealAPI.requestAllData(appKey, secret); System.out.println(deals.size()); System.out.println(deals.keySet()); System.out.println(deals.get("上海")); } catch (IOException e) { } }
public static Map<String, List<Map<String, Object>>> requestAllData(String appKey, String secret) throws IOException { List<String> dealCities = requestCities(appKey, secret); Map<String, List<String>> dealIds = requestDealIds(appKey, secret, dealCities); Map<String, List<Map<String, Object>>> dealDatas = requestDealData(appKey, secret, dealIds); return dealDatas; }
DemoDealAPI { public static Map<String, List<Map<String, Object>>> requestAllData(String appKey, String secret) throws IOException { List<String> dealCities = requestCities(appKey, secret); Map<String, List<String>> dealIds = requestDealIds(appKey, secret, dealCities); Map<String, List<Map<String, Object>>> dealDatas = requestDealData(appKey, secret, dealIds); return dealDatas; } }
DemoDealAPI { public static Map<String, List<Map<String, Object>>> requestAllData(String appKey, String secret) throws IOException { List<String> dealCities = requestCities(appKey, secret); Map<String, List<String>> dealIds = requestDealIds(appKey, secret, dealCities); Map<String, List<Map<String, Object>>> dealDatas = requestDealData(appKey, secret, dealIds); return dealDatas; }  }
DemoDealAPI { public static Map<String, List<Map<String, Object>>> requestAllData(String appKey, String secret) throws IOException { List<String> dealCities = requestCities(appKey, secret); Map<String, List<String>> dealIds = requestDealIds(appKey, secret, dealCities); Map<String, List<Map<String, Object>>> dealDatas = requestDealData(appKey, secret, dealIds); return dealDatas; }  static List<String> requestCities(String appKey, String secret); static Map<String, List<Map<String, Object>>> requestDealData(String appKey, String secret,
                                                                             Map<String, List<String>> dealIds); static Map<String, List<String>> requestDealIds(String appKey, String secret, List<String> dealCities); @SuppressWarnings({ "rawtypes", "unchecked" }) static List<Map<String, Object>> requestBatchDeals(String appKey, String secret,
                                                               List<String> batchIdsList); static Map<String, List<Map<String, Object>>> requestAllData(String appKey, String secret); static List<List<T>> splitList(List<T> list, int pageSize); }
DemoDealAPI { public static Map<String, List<Map<String, Object>>> requestAllData(String appKey, String secret) throws IOException { List<String> dealCities = requestCities(appKey, secret); Map<String, List<String>> dealIds = requestDealIds(appKey, secret, dealCities); Map<String, List<Map<String, Object>>> dealDatas = requestDealData(appKey, secret, dealIds); return dealDatas; }  static List<String> requestCities(String appKey, String secret); static Map<String, List<Map<String, Object>>> requestDealData(String appKey, String secret,
                                                                             Map<String, List<String>> dealIds); static Map<String, List<String>> requestDealIds(String appKey, String secret, List<String> dealCities); @SuppressWarnings({ "rawtypes", "unchecked" }) static List<Map<String, Object>> requestBatchDeals(String appKey, String secret,
                                                               List<String> batchIdsList); static Map<String, List<Map<String, Object>>> requestAllData(String appKey, String secret); static List<List<T>> splitList(List<T> list, int pageSize);  }