|
YZClient client = new DefaultYZClient(new Token("my token")); //new Sign(appKey, appSecret)
YouzanTradesSoldGetParams youzanTradesSoldGetParams = new YouzanTradesSoldGetParams();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-DD HH:mm:ss");
Date StartCreateTime = sdf.parse("2014-05-09 00:00:00");
Date EndCreateTime;
EndCreateTime = sdf.parse("2014-05-31 00:00:00");
// Long PageSize = 10L;
// Long PageNo = 1L;
youzanTradesSoldGetParams.setStartCreated(StartCreateTime);
youzanTradesSoldGetParams.setEndCreated(EndCreateTime);
// youzanTradesSoldGetParams.setPageSize(PageSize);
// youzanTradesSoldGetParams.setPageNo(PageNo);
YouzanTradesSoldGet youzanTradesSoldGet = new YouzanTradesSoldGet();
youzanTradesSoldGet.setAPIParams(youzanTradesSoldGetParams);
com.youzan.open.sdk.gen.v4_0_0.model.YouzanTradesSoldGetResult result = client.invoke(youzanTradesSoldGet);
com.youzan.open.sdk.gen.v4_0_0.model.YouzanTradesSoldGetResult.StructurizationTrade[] Trade = result.getFullOrderInfoList();
System.out.println(result.getTotalResults()+"\tlength:"+Trade.length);
for (int j = 0; j < Trade.length; j++) {
YouzanTradesSoldGetResult.StructurizationTradeOrderInfo OrderInfo = Trade[j].getFullOrderInfo();
System.out.println("Tid:"+OrderInfo.getOrderInfo().getTid());
// System.out.println(OrderInfo.getAddressInfo()==null?"":OrderInfo.getAddressInfo().getReceiverName());
}控制行收到为 0
调试工具中返回total_result=135
{"response":{"total_results":135,"trades":
|
|
|
|
|
|
|