package com.jeeplus.test.wdt.wangdian.api;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class Demo {

	/*public static void main(String[] args) {
        //sid appkey secret url
		WdtClient client = new WdtClient("apidevnew2", "dttz1315-test", "0260abfd4", "https://sandbox.wangdian.cn/openapi2/");

		Map<String, String> params = new HashMap<String, String>();
		try {
			String response = client.execute("warehouse.php", params);
			System.out.println(response);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}*/

	@SuppressWarnings("unchecked")
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		WdtClient client = new WdtClient("apidevnew2", "dttz1315-test", "0260abfd4", "https://sandbox.wangdian.cn/openapi2/");
		//测试环境sid、appkey、密钥请到旺店通开放平台-自助对接-申请测试环境内查看，测试环境url=https://sandbox.wangdian.cn/openapi2/
		//调用正式环境时请将sid、appkey、appsecret切换为实际参数，参数在旺店通开放平台-自助对接-应用管理内应用状态为已上线的应用中查看，调用正式环境注意切换正式环境url=https://api.wangdian.cn/openapi2/

		Map<String, String> params = new HashMap<String, String>();
		params.put("type", "1");
		params.put("warehouse_no", "012");


		try {
			String response = client.execute("warehouse_query.php", params);
			System.out.println(response);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
