订单列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\UpstreamOrderModel::orderList |
| 所属业务 | 上下游 |
| 来源模块/系统 | 上游订单模型 |
功能说明
订单列表
调用示例
$param = ['keywords' => '示例关键字', 'supplier_id' => 1, 'page' => 1, 'limit' => 1, 'orderby' => 'id', 'sort' => 'string'];
$result = (new \app\common\model\UpstreamOrderModel())->orderList($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.keywords | string | 否 | — | — | 关键字,搜索范围:ID,用户名称,邮箱,手机号,商品名称,产品标识 |
param.supplier_id | int | 否 | — | — | 供应商ID |
param.page | int | 否 | — | — | 页数 |
param.limit | int | 否 | — | — | 每页条数 |
param.orderby | string | 否 | — | — | 排序 id |
param.sort | string | 否 | — | — | 升/降序 asc,desc |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 订单 |
list[].id | int | 订单ID |
list[].type | string | 类型new新订单renew续费订单upgrade升降级订单artificial人工订单 |
list[].create_time | int | 创建时间 |
list[].amount | string | 金额 |
list[].profit | string | 利润 |
list[].status | string | 状态Unpaid未付款Paid已付款Cancelled已取消Refunded已退款 |
list[].gateway | string | 支付方式 |
list[].credit | string | 使用余额,大于0代表订单使用了余额,和金额相同代表订单支付方式为余额 |
list[].description | string | 描述 |
list[].client_id | int | 用户ID |
list[].client_name | string | 用户名称 |
list[].email | string | 邮箱 |
list[].phone_code | string | 国际电话区号 |
list[].phone | string | 手机号 |
list[].company | string | 公司 |
list[].product_name | string | 商品名称 |
list[].host_name | string | 产品标识 |
list[].product_names | array | 订单下所有产品的商品名称 |
list[].host_id | int | 产品ID |
list[].order_item_count | int | 订单子项数量 |
list[].gateway_sign | string | 支付接口标识(credit=余额,credit_limit=信用额) |
count | int | 订单总数 |
正常返回
{
"list": [
{
"id": 1,
"type": "string",
"create_time": 1752984000,
"amount": "string",
"profit": "string",
"status": "Active",
"gateway": "credit",
"credit": "string",
"description": "192.0.2.1",
"client_id": 1,
"client_name": "示例名称",
"email": "user@example.com",
"phone_code": "86",
"phone": "13800138000",
"company": "string",
"product_name": "示例名称",
"host_name": "示例名称",
"product_names": [
"示例名称"
],
"host_id": 1,
"order_item_count": 1,
"gateway_sign": "example-token"
}
],
"count": 1
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |