供应商列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\SupplierModel::supplierList |
| 所属业务 | 上下游 |
| 来源模块/系统 | 供应商模型 |
功能说明
供应商列表
调用示例
$keywords = '示例关键字';
$page = 1;
$limit = 20;
$orderby = 'id';
$sort = 'asc';
$result = (new \app\common\model\SupplierModel())->supplierList($keywords, $page, $limit, $orderby, $sort);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
keywords | string | 否 | — | — | 关键字,搜索范围:供应商名称,链接地址 |
page | int | 否 | — | — | 页数 |
limit | int | 否 | — | — | 每页条数 |
orderby | string | 否 | — | — | 排序 id |
sort | string | 否 | — | — | 升/降序 asc,desc |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 供应商 |
list[].id | int | 供应商ID |
list[].type | string | 供应商类型default默认业务系统whmcs财务系统finance魔方财务 |
list[].name | string | 供应商名称 |
list[].url | string | 链接地址 |
list[].currency_name | string | 货币名称 |
list[].currency_code | string | 货币标识 |
list[].rate | string | 汇率 |
list[].auto_update_rate | int | 自动更新汇率0关闭1开启 |
list[].rate_update_time | int | 汇率更新时间 |
list[].host_num | int | 产品数量 |
list[].product_num | int | 商品数量 |
list[].credit | string | 上游账户余额,空字符串标识未获取到 |
count | int | 供应商总数 |
正常返回
{
"list": [
{
"id": 1,
"type": "string",
"name": "示例名称",
"url": "https://example.com/callback",
"currency_name": "CNY",
"currency_code": "123456",
"rate": "string",
"auto_update_rate": 1,
"rate_update_time": 1752984000,
"host_num": 1,
"product_num": 1,
"credit": "string"
}
],
"count": 1
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |