创建短信模板
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\SmsTemplateModel::createSmsTemplate |
| 所属业务 | 消息通知 |
| 来源模块/系统 | 短信模板管理 |
功能说明
创建短信模板
调用示例
$param = ['name' => '示例名称', 'template_id' => '1', 'type' => 'string', 'title' => '示例名称', 'content' => 'string', 'notes' => '示例说明', 'status' => 'Active'];
$result = (new \app\common\model\SmsTemplateModel())->createSmsTemplate($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.name | string | 是 | — | required | 短信接口标识名称 |
param.template_id | string | 否 | — | — | 模板ID |
param.type | string | 是 | — | required | 模板类型(0大陆,1国际) |
param.title | string | 是 | — | required | 模板标题 |
param.content | string | 是 | — | required | 模版内容 |
param.notes | string | 否 | — | — | 备注 |
param.status | string | 否 | — | — | 状态(0未提交审核,2通过审核,3未通过审核) |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态码,200成功,400失败 |
msg | string | 提示信息 |
正常返回
{
"status": 1,
"msg": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |