创建触发动作组
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ProductNoticeGroupModel::productNoticeGroupCreate |
| 所属业务 | 消息通知 |
| 来源模块/系统 | 商品通知组模型 |
功能说明
创建触发动作组
调用示例
$param = ['type' => 'string', 'name' => '示例名称', 'notice_setting' => ['xxx' => 1], 'product_id' => [1]];
$result = (new \app\common\model\ProductNoticeGroupModel())->productNoticeGroupCreate($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.type | string | 是 | — | require | 通知类型标识 |
param.name | string | 是 | — | require | 触发动作组名称 |
param.notice_setting.xxx | int | 是 | — | require | 对应触发动作状态(xxx=动作标识,0=关闭,1=开启) |
param.product_id | array | 否 | — | — | 商品ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态码(200=成功,400=失败) |
msg | string | 信息 |
data.id | int | 触发动作组ID |
正常返回
{
"status": 1,
"msg": "string",
"data": {
"id": 1
}
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |