智简魔方文档

供应商列表

方法概览

项目内容
文档类型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);

参数

参数类型必填默认值校验规则说明
keywordsstring关键字,搜索范围:供应商名称,链接地址
pageint页数
limitint每页条数
orderbystring排序 id
sortstring升/降序 asc,desc

返回值

返回项类型说明
listarray供应商
list[].idint供应商ID
list[].typestring供应商类型default默认业务系统whmcs财务系统finance魔方财务
list[].namestring供应商名称
list[].urlstring链接地址
list[].currency_namestring货币名称
list[].currency_codestring货币标识
list[].ratestring汇率
list[].auto_update_rateint自动更新汇率0关闭1开启
list[].rate_update_timeint汇率更新时间
list[].host_numint产品数量
list[].product_numint商品数量
list[].creditstring上游账户余额,空字符串标识未获取到
countint供应商总数

正常返回

{
  "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调用失败时由具体实现抛出异常,异常信息以运行时结果为准。