供应商详情
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\SupplierModel::indexSupplier |
| 所属业务 | 上下游 |
| 来源模块/系统 | 供应商模型 |
功能说明
供应商详情
调用示例
$id = 1;
$result = (new \app\common\model\SupplierModel())->indexSupplier($id);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
id | int | 是 | — | required | 供应商ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
supplier | object | 供应商 |
supplier.id | int | 供应商ID |
supplier.type | string | 供应商类型default默认业务系统whmcs财务系统finance魔方财务 |
supplier.name | string | 名称 |
supplier.url | string | 链接地址 |
supplier.username | string | 用户名 |
supplier.token | string | API密钥 |
supplier.secret | string | API私钥 |
supplier.contact | string | 联系方式 |
supplier.notes | string | 备注 |
supplier.currency_code | string | 货币标识 |
supplier.rate | string | 汇率 |
supplier.auto_update_rate | int | 自动更新汇率0关闭1开启 |
supplier.rate_update_time | int | 汇率更新时间 |
正常返回
{
"supplier": {
"id": 1,
"type": "string",
"name": "示例名称",
"url": "https://example.com/callback",
"username": "示例名称",
"token": "example-token",
"secret": "example-token",
"contact": "string",
"notes": "示例说明",
"currency_code": "123456",
"rate": "string",
"auto_update_rate": 1,
"rate_update_time": 1752984000
}
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |