智简魔方文档

获取通知设置

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\logic\SystemNoticeLogic::getNoticeSetting
所属业务消息通知
来源模块/系统系统通知逻辑

功能说明

获取通知设置

调用示例

$param = ['name' => '示例名称', 'host_id' => 1];
$result = (new \app\common\logic\SystemNoticeLogic())->getNoticeSetting($param);

参数

参数类型必填默认值校验规则说明
param.namestringrequire通知动作标识
param.host_idint产品ID,用于检查全局商品设置

返回值

返回项类型说明
namestring动作名称
sms_global_nameint短信国际接口名称
sms_global_templateint短信国际接口模板id
sms_namestring短信国内接口名称
sms_templateint短信国内接口模板id
sms_enableint启用状态,0禁用,1启用
email_namestring邮件接口名称
email_templateint邮件接口模板id
email_enableint启用状态,0禁用,1启用

正常返回

{
  "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
}

异常情况

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