代理推荐商品添加供应商
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\UpstreamProductModel::agentRecommendProduct |
| 所属业务 | 上下游 |
| 来源模块/系统 | 上游商品模型 |
功能说明
代理推荐商品添加供应商
调用示例
$param = ['id' => 1, 'username' => '示例名称', 'token' => 'example-token', 'secret' => 'example-token'];
$result = (new \app\common\model\UpstreamProductModel())->agentRecommendProduct($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.id | int | 是 | — | required | 推荐代理商品ID |
param.username | string | 是 | — | required | 用户名 |
param.token | string | 是 | — | required | API密钥 |
param.secret | string | 是 | — | required | API私钥 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态码,200成功,400失败 |
msg | string | 提示信息 |
data.supplier_id | int | 供应商ID |
正常返回
{
"status": 1,
"msg": "string",
"data": {
"supplier_id": 1
}
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |