智简魔方文档

发送设置

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\model\NoticeSettingModel::updateNoticeSetting
所属业务消息通知
来源模块/系统通知发送管理

功能说明

发送设置

调用示例

$name = [['name' => '示例名称', 'sms_global_name' => 1, 'sms_global_template' => 1, 'sms_name' => '示例名称', 'sms_template' => 1, 'sms_enable' => 1, 'email_name' => 'user@example.com', 'email_template' => 1, 'email_enable' => 1]];
$configuration = [['send_sms' => 'string', 'send_sms_global' => 'string', 'send_email' => 'user@example.com']];
$result = (new \app\common\model\NoticeSettingModel())->updateNoticeSetting($name, $configuration);

参数

参数类型必填默认值校验规则说明
namearrayrequired动作名称为键
name.namestringrequired动作名称
name.sms_global_nameintrequired短信国际接口名称
name.sms_global_templateintrequired短信国际接口模板id
name.sms_namestringrequired短信国内接口名称
name.sms_templateintrequired短信国内接口模板id
name.sms_enableintrequired启用状态,0禁用,1启用
name.email_namestringrequired邮件接口名称
name.email_templateintrequired邮件接口模板id
name.email_enableintrequired启用状态,0禁用,1启用
configurationarray默认接口
configuration.send_smsstring默认国内短信接口
configuration.send_sms_globalstring默认国际短信接口
configuration.send_emailstring默认邮件接口

返回值

返回项类型说明
statusint状态码,200成功,400失败
msgstring提示信息

正常返回

{
  "status": 1,
  "msg": "string"
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。