编辑供应商
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\SupplierModel::updateSupplier |
| 所属业务 | 上下游 |
| 来源模块/系统 | 供应商模型 |
功能说明
编辑供应商
调用示例
$id = 1;
$type = 'string';
$name = '示例名称';
$url = 'https://example.com/callback';
$username = '示例名称';
$token = 'example-token';
$secret = 'example-token';
$contact = 'string';
$notes = '示例说明';
$result = (new \app\common\model\SupplierModel())->updateSupplier($id, $type, $name, $url, $username, $token, $secret, $contact, $notes);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
id | int | 是 | — | required | 供应商ID |
type | string | 是 | — | required | 供应商类型default默认业务系统whmcs财务系统finance魔方财务 |
name | string | 是 | — | required | 名称 |
url | string | 是 | — | required | 链接地址 |
username | string | 是 | — | required | 用户名 |
token | string | 是 | — | required | API密钥 |
secret | string | 是 | — | required | API私钥 |
contact | string | 否 | — | — | 联系方式 |
notes | string | 否 | — | — | 备注 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态码,200成功,400失败 |
msg | string | 提示信息 |
正常返回
{
"status": 1,
"msg": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |