获取商品自定义标识配置
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ProductModel::saveCustomHostName |
| 所属业务 | 商品管理 |
| 来源模块/系统 | 商品模型 |
功能说明
获取商品自定义标识配置
调用示例
$param = ['id' => 1, 'custom_host_name' => 1, 'custom_host_name_prefix' => '示例名称', 'custom_host_name_string_allow' => ['示例名称'], 'custom_host_name_string_length' => 1];
$result = (new \app\common\model\ProductModel())->saveCustomHostName($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.id | int | 是 | — | require | 商品ID |
param.custom_host_name | int | 是 | — | require | 自定义主机标识开关(0=关闭,1=开启) |
param.custom_host_name_prefix | string | 是 | — | require | 自定义主机标识前缀 |
param.custom_host_name_string_allow | array | 是 | — | require | 允许的字符串(number=数字,upper=大写字母,lower=小写字母) |
param.custom_host_name_string_length | int | 是 | — | require | 字符串长度 |
返回值
未声明固定返回值。
正常返回
{}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |