From e52f0b7dacbffb4b2023d807af08f861cf1c1c21 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 7 Apr 2021 00:49:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E6=A8=A1=E6=9D=BF=E7=9A=84?= =?UTF-8?q?=20ui=20=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/system/sms/smsTemplate.js | 54 ++++ ruoyi-ui/src/utils/dict.js | 1 + ruoyi-ui/src/views/system/sms/smsTemplate.vue | 306 ++++++++++++++++++ .../sms/vo/template/SysSmsTemplateBaseVO.java | 4 +- 4 files changed, 363 insertions(+), 2 deletions(-) create mode 100644 ruoyi-ui/src/api/system/sms/smsTemplate.js create mode 100644 ruoyi-ui/src/views/system/sms/smsTemplate.vue diff --git a/ruoyi-ui/src/api/system/sms/smsTemplate.js b/ruoyi-ui/src/api/system/sms/smsTemplate.js new file mode 100644 index 000000000..b68998e1e --- /dev/null +++ b/ruoyi-ui/src/api/system/sms/smsTemplate.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建短信模板 +export function createSmsTemplate(data) { + return request({ + url: '/system/sms-template/create', + method: 'post', + data: data + }) +} + +// 更新短信模板 +export function updateSmsTemplate(data) { + return request({ + url: '/system/sms-template/update', + method: 'put', + data: data + }) +} + +// 删除短信模板 +export function deleteSmsTemplate(id) { + return request({ + url: '/system/sms-template/delete?id=' + id, + method: 'delete' + }) +} + +// 获得短信模板 +export function getSmsTemplate(id) { + return request({ + url: '/system/sms-template/get?id=' + id, + method: 'get' + }) +} + +// 获得短信模板分页 +export function getSmsTemplatePage(query) { + return request({ + url: '/system/sms-template/page', + method: 'get', + params: query + }) +} + +// 导出短信模板 Excel +export function exportSmsTemplateExcel(query) { + return request({ + url: '/system/sms-template/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/ruoyi-ui/src/utils/dict.js b/ruoyi-ui/src/utils/dict.js index bf6d72587..1a61a989a 100644 --- a/ruoyi-ui/src/utils/dict.js +++ b/ruoyi-ui/src/utils/dict.js @@ -18,6 +18,7 @@ export const DICT_TYPE = { SYS_LOGIN_RESULT: 'sys_login_result', SYS_CONFIG_TYPE: 'sys_config_type', SYS_SMS_CHANNEL_CODE: 'sys_sms_channel_code', + SYS_SMS_TEMPLATE_TYPE: 'sys_sms_template_type', INF_REDIS_TIMEOUT_TYPE: 'inf_redis_timeout_type', INF_JOB_STATUS: 'inf_job_status', diff --git a/ruoyi-ui/src/views/system/sms/smsTemplate.vue b/ruoyi-ui/src/views/system/sms/smsTemplate.vue new file mode 100644 index 000000000..b8a3a7b17 --- /dev/null +++ b/ruoyi-ui/src/views/system/sms/smsTemplate.vue @@ -0,0 +1,306 @@ + + + diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java b/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java index f2ef6ac16..584050d55 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java @@ -12,8 +12,8 @@ import javax.validation.constraints.NotNull; @Data public class SysSmsTemplateBaseVO { - @ApiModelProperty(value = "短信签名", required = true, example = "1", notes = "参见 SysSmsTemplateTypeEnum 枚举类") - @NotNull(message = "短信签名不能为空") + @ApiModelProperty(value = "短信类型", required = true, example = "1", notes = "参见 SysSmsTemplateTypeEnum 枚举类") + @NotNull(message = "短信类型不能为空") private Integer type; @ApiModelProperty(value = "开启状态", required = true, example = "1", notes = "参见 CommonStatusEnum 枚举类")