下发设备的分页接口(发布在TOP上,connect调用,无需AOP控制)
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
work_bench_context | WorkBenchContext | 必须 | 平台统一参数 | ||||||||
|
|||||||||||
query | DeviceApiQuery | 必须 | 系统自动生成 | ||||||||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | PageResult | 返回值 | |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaCampusDeviceGetdeviceforqueryRequest req = new AlibabaCampusDeviceGetdeviceforqueryRequest(); AlibabaCampusDeviceGetdeviceforqueryRequest.WorkBenchContext obj1 = new AlibabaCampusDeviceGetdeviceforqueryRequest.WorkBenchContext(); obj1.setCompanyId(10000L); obj1.setCampusId(100001L); req.setWorkBenchContext(obj1); AlibabaCampusDeviceGetdeviceforqueryRequest.DeviceApiQuery obj2 = new AlibabaCampusDeviceGetdeviceforqueryRequest.DeviceApiQuery(); obj2.setKey( "device" ); obj2.setCampusId(100002L); obj2.setTemplateCode( "Light" ); obj2.setLimit(15L); obj2.setCurrentPage(1L); obj2.setCampusIdList( new Long[] { }; ); req.setQuery(obj2); AlibabaCampusDeviceGetdeviceforqueryResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | < alibaba_campus_device_getdeviceforquery_response > < result > < content > < limit >15</ limit > < total >1000</ total > < results > < string >{}</ string > </ results > < current_page >1</ current_page > < total_page >200</ total_page > </ content > < request_id >null</ request_id > < error_code >error</ error_code > < error_msg >查询报错</ error_msg > < success >true</ success > </ result > </ alibaba_campus_device_getdeviceforquery_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|