1. 接口地址
POST /order/openapi/getOrderList
2. 接口参数
{
"pageNum": "当前页数",
"pageSize": "分页大小",
"status": "订单状态: 1. 待支付 2.待发货(已支付) 3.超时未支付(30分钟) 4.作废 5.已发货 6.已过期(冻结30分钟) 7.已退款 8.已完成(租赁到期) 9.已销毁 10.续期"
}3. 返回值
{
"total": 37,
"rows": [
{
"id": "1902176615603838977", //主键id
"productType": 2, //产品类型 1 虚拟机 2 云容器 3裸金属
"status": 4, //订单状态: 2.待发货(已支付) 4.作废(退款) 5.已发货 6.已过期(冻结30分钟) 8.已结束(租赁到期) 10.续期
"buyDuration": 1, //购买时长
"reason": "************", //取消理由
"createTime": "2025-03-19 09:53:41", //创建时间
"orderProductVo": {
"name": "单节点服务器", //产品名称
"graphicsCardNum": 10, //显卡数量
"cpuModel": "酷睿i5", //处理器型号
"intMemory": "8", //内存
"systemDisk": "50", //系统盘
"frameworkType": "1", //架构 1:X86 2:Arm
"orderGraphicsCardVo": {
"type": "GPU", //类型:NPU/GPU/XPU/DCU等
"model": "RTX 4090", //显卡型号
"memory": 2, //显存(GB)
"computingPower": "2" //算力(TFlops)
},
"orderMirrorImageVo": {
"mirrorImageType": 1, //镜像类型 1: centos 2: ubuntu 3: windows 4: debian 5: freebsd 6: kylin
"name": "centos", //镜像名称
"type": 1, //1: 公共 2: 社区
"version": "8.2.2004" //镜像版本
},
"vcpu": 16 //CPU核心数(核)
}
}
],
"code": 200,
"msg": "查询成功"
}4. 如何调用
curl示例:
curl -X POST http://xxx.xxx.xxx.xxx:xxxx/order/openapi/getOrderList \
-H "Authorization: Bearer <API Key>" \
-d "pageNum=0&pageSize=5&status=1"java示例:
public static void main(String[] args) {
Map<String, Object> paramMap = new HashMap<>();
//当前页数 (从0开始)
paramMap.put("pageNum", "0");
//分页大小
paramMap.put("pageSize", "5");
//订单状态(非必须)
paramMap.put("status", "1");
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Authorization", "Bearer <API Key>");
//链式构建请求
String result = HttpRequest.post("http://xxx.xxx.xxx.xxx:xxxx/order/openapi/getOrderList")
.addHeaders(headerMap) //请求头
.form(paramMap)//表单内容
.execute().body();
System.out.println(result);
}作者:admin 创建时间:2025-03-03 09:34
最后编辑:冯豪东 更新时间:2025-06-12 03:26
最后编辑:冯豪东 更新时间:2025-06-12 03:26