交易流水列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\TransactionModel::transactionList |
| 所属业务 | 财务管理 |
| 来源模块/系统 | 交易流水模型 |
功能说明
交易流水列表
调用示例
$param = ['keywords' => '示例关键字', 'type' => 'string', 'client_id' => 1, 'order_id' => 1, 'amount' => 'string', 'gateway' => 'credit', 'start_time' => 1752984000, 'end_time' => 1752984000, 'page' => 1, 'limit' => 1, 'orderby' => 'id', 'sort' => 'string'];
$result = (new \app\common\model\TransactionModel())->transactionList($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.keywords | string | 否 | — | — | 关键字,搜索范围:交易流水号,订单ID,用户名称,邮箱,手机号 |
param.type | string | 否 | — | — | 类型new新订单renew续费订单upgrade升降级订单artificial人工订单 |
param.client_id | int | 否 | — | — | 用户ID |
param.order_id | int | 否 | — | — | 订单ID |
param.amount | string | 否 | — | — | 金额 |
param.gateway | string | 否 | — | — | 支付方式 |
param.start_time | int | 否 | — | — | 开始时间 |
param.end_time | int | 否 | — | — | 结束时间 |
param.page | int | 否 | — | — | 页数 |
param.limit | int | 否 | — | — | 每页条数 |
param.orderby | string | 否 | id | — | 排序(id,amount,transaction_number,order_id,create_time,client_id,reg_time) |
param.sort | string | 否 | — | — | 升/降序 asc,desc |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 交易流水 |
list[].id | int | 交易流水ID |
list[].amount | float | 金额 |
list[].gateway | string | 支付方式 |
list[].transaction_number | string | 交易流水号 |
list[].client_id | int | 用户ID |
list[].client_name | string | 用户名称 |
list[].email | string | 邮箱 |
list[].phone_code | string | 国际电话区号 |
list[].phone | string | 手机号 |
list[].company | string | 公司 |
list[].order_id | int | 关联订单ID |
list[].create_time | int | 交易时间 |
list[].type | string | 订单类型new新订单renew续费订单upgrade升降级订单artificial人工订单 |
list[].client_status | int | 用户是否启用0:禁用,1:正常,前台接口调用时不返回 |
list[].reg_time | int | 用户注册时间,前台接口调用时不返回 |
list[].country | string | 国家,前台接口调用时不返回 |
list[].address | string | 地址,前台接口调用时不返回 |
list[].language | string | 语言,前台接口调用时不返回 |
list[].notes | string | 备注,前台接口调用时不返回 |
list[].transaction_notes | string | 管理员备注 |
list[].hosts | array | 产品 |
list[].hosts[].id | int | 产品ID |
list[].hosts[].name | string | 商品名称 |
list[].descriptions | array | 描述 |
list[].certification | bool | 是否实名认证true是false否(显示字段有certification返回) |
list[].certification_type | string | 实名类型person个人company企业(显示字段有certification返回) |
list[].client_level | string | 用户等级(显示字段有client_level返回) |
list[].client_level_color | string | 用户等级颜色(显示字段有client_level返回) |
list[].sale | string | 销售(显示字段有sale返回) |
list[].addon_client_custom_field_[id] | string | 用户自定义字段(显示字段有addon_client_custom_field_[id]返回,[id]为用户自定义字段ID) |
count | int | 交易流水总数 |
total_amount | string | 总金额 |
page_total_amount | string | 当前页总金额 |
正常返回
{
"list": [
{
"id": 1,
"amount": 0.01,
"gateway": "credit",
"transaction_number": "string",
"client_id": 1,
"client_name": "示例名称",
"email": "user@example.com",
"phone_code": "86",
"phone": "13800138000",
"company": "string",
"order_id": 1,
"create_time": 1752984000,
"type": "string",
"client_status": 1,
"reg_time": 1752984000,
"country": "string",
"address": "string",
"language": "zh-cn",
"notes": "示例说明",
"transaction_notes": "示例说明",
"hosts": [
{
"id": 1,
"name": "示例名称"
}
],
"descriptions": [
"192.0.2.1"
],
"certification": true,
"certification_type": "string",
"client_level": "string",
"client_level_color": "string",
"sale": "string",
"addon_client_custom_field_[id]": "string"
}
],
"count": 1,
"total_amount": "string",
"page_total_amount": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |