编辑商品接口
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ProductModel::updateServer |
| 所属业务 | 商品管理 |
| 来源模块/系统 | 商品模型 |
功能说明
编辑商品接口
调用示例
$auto_setup = 1;
$type = 'server_group';
$rel_id = 1;
$result = (new \app\common\model\ProductModel())->updateServer($auto_setup, $type, $rel_id);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
auto_setup | int | 是 | 1 | required | 是否自动开通:1是默认,0否 |
type | string | 是 | server_group | required | 关联类型:server,server_group |
rel_id | int | 是 | 1 | required | 关联ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态码,200成功,400失败 |
msg | string | 提示信息 |
正常返回
{
"status": 1,
"msg": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |