请求方式:GET
注:请求参数须区分大小写
String url = "https://openapi.dataoke.com/api/goods/get-owner-goods";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.1");
paraMap.put("appKey", appKey);
paraMap.put("pageId", "1");
paraMap.put("pageSize", "50");
String data = ApiClient.sendReq(url, appSecret, paraMap);
SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkGetOwnerGoodsRequest request = new DtkGetOwnerGoodsRequest();
request.setVersion("v1.0.0");
request.setPageId("1");
request.setPageSize(100);
request.setOnline(0);
request.setStartTime("2021-07-13 13:00:00");
request.setEndTime("2021-07-13 13:30:00");
request.setSort("0");
DtkApiResponse < DtkPageResponse < DtkGetOwnerGoodsItemResponse >> execute = client.execute(request);
{
"time": 1555643653208,
"code": 0,
"msg": "成功",
"data": {
"list": [
{
"id": 18592060,
"goodsId": "521027319777",
"createTime": "2019-03-09 07:43:38",
"lowerShelfTime": "2019-03-09 11:43:29",
"refuseReason": "券过期或失效,系统下架!!",
"consumptionCoupon": "100",
"userId": 688412,
"shelfTime": "2019-03-09T07:43:38",
"monthSales": 52358,
"commissionRate": 20,
"couponReceiveNum": 3000,
"shelfStatus": 0,
"note":"没有备注"
}
],
"totalNum": 827717,
"pageId": "a8d37b91520348a0"
}
}
{
"msg":"服务器错误",
"code":-1,
"time":1554365022200
}