- 短信模板 、 和签名

This commit is contained in:
sin
2019-05-18 10:34:25 +08:00
parent be94f29791
commit 551f6aa673
8 changed files with 195 additions and 49 deletions

View File

@@ -1,10 +1,7 @@
package cn.iocoder.mall.admin.api;
import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO;
import lombok.Data;
import lombok.experimental.Accessors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 短信平台
@@ -56,25 +53,32 @@ public interface SmsPlatform {
/**
* 模板 - 创建
*
* @param sign 选用的哪个签名
* @param template 模板内容
* @param tplType 1 为验证码类型,其他为 null
*/
Result createTemplate(String sign, String template, Integer tplType);
Result createTemplate(String template, Integer tplType);
/**
* 获取模板信息
* 模板 - 获取
*
* @param tipId
* @param tplId
*/
Result getTemplate(String tipId);
Result getTemplate(String tplId);
/**
* 更新模板内容
* 模板 - 更新
*
* @param tipId 选用的哪个签名
* @param tplId 选用的哪个签名
* @param template 模板内容
* @param tplType 1 为验证码类型,其他为 null
*/
Result updateTemplate(String tipId, String template, Integer tplType);
Result updateTemplate(String tplId, String template, Integer tplType);
/**
* 模板 - 删除
*
* @param tplId
* @return
*/
Result deleteTemplate(String tplId);
}

View File

@@ -43,18 +43,25 @@ public interface SmsService {
void createTemplate(Integer smsSignId, String template, Integer tplType);
/**
* 获取模板信息
* 模板 - 获取
*
* @param id
*/
SmsTemplateBO getTemplate(String id);
SmsTemplateBO getTemplate(Integer id);
/**
* 更新模板内容
* 模板 - 更新
*
* @param id 模板id
* @param template 模板内容
* @param tplType 1 为验证码类型,其他为 null
*/
void updateTemplate(String id, String template, Integer tplType);
void updateTemplate(Integer id, String template, Integer tplType);
/**
* 模板 - 删除
*
* @param id
*/
void deleteTemplate(Integer id);
}

View File

@@ -48,14 +48,11 @@ public enum AdminErrorCodeEnum {
DATA_DICT_NOT_EXISTS(1002005001, "该数据字典不存在"),
// ========== 短信模板 1002006000 ==========
SMS_SIGN_ADD_FAIL(1002006000, "短信签名添加失败"),
SMS_PLATFORM_FAIL(1002006000, "短信模板添加失败"),
SMS_SIGN_NOT_EXISTENT(1002006001, "短信签名不存在"),
SMS_SIGN_IS_EXISTENT(1002006002, "短信签名已存在"),
SMS_SIGN_UPDATE_FAIL(1002006003, "短信更新失败"),
SMS_TEMPLATE_ADD_FAIL(1002006020, "短信签名不存在"),
SMS_TEMPLATE_NOT_EXISTENT(1002006021, "短信签名不存在"),
SMS_TEMPLATE_IS_EXISTENT(1002006022, "短信签名不存在"),
SMS_TEMPLATE_NOT_EXISTENT(1002006020, "短信签名不存在"),
SMS_TEMPLATE_IS_EXISTENT(1002006021, "短信签名不存在"),
;
private final int code;