- 添加短信服务 admin api
This commit is contained in:
@@ -39,7 +39,7 @@ public interface SmsService {
|
||||
*
|
||||
* @param sign
|
||||
*/
|
||||
void createSign(String sign, Integer platform);
|
||||
void addSign(String sign, Integer platform);
|
||||
|
||||
/**
|
||||
* 签名 - 获取
|
||||
@@ -72,7 +72,8 @@ public interface SmsService {
|
||||
* @param template 模板内容
|
||||
* @param platform 平台
|
||||
*/
|
||||
void createTemplate(Integer smsSignId, String templateCode, String template, Integer platform, Integer smsType);
|
||||
void addTemplate(Integer smsSignId, String templateCode,
|
||||
String template, Integer platform, Integer smsType);
|
||||
|
||||
/**
|
||||
* 模板 - 获取
|
||||
@@ -89,7 +90,8 @@ public interface SmsService {
|
||||
* @param template 模板内容
|
||||
* @param platform 短信平台
|
||||
*/
|
||||
void updateTemplate(Integer id, Integer smsSignId, String template, Integer platform, Integer smsType);
|
||||
void updateTemplate(Integer id, Integer smsSignId, String templateCode,
|
||||
String template, Integer platform, Integer smsType);
|
||||
|
||||
/**
|
||||
* 模板 - 删除
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
package cn.iocoder.mall.admin.api.constant;
|
||||
|
||||
import cn.iocoder.common.framework.core.IntArrayValuable;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 短信审核状态
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019/5/16 12:48 PM
|
||||
*/
|
||||
public enum SmsPlatformEnum {
|
||||
public enum SmsPlatformEnum implements IntArrayValuable {
|
||||
|
||||
YunPian(1, "云片"),
|
||||
AliYun(2, "阿里云"),
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsPlatformEnum::getValue).toArray();
|
||||
|
||||
private final Integer value;
|
||||
private final String name;
|
||||
|
||||
@@ -27,4 +33,9 @@ public enum SmsPlatformEnum {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
package cn.iocoder.mall.admin.api.constant;
|
||||
|
||||
import cn.iocoder.common.framework.core.IntArrayValuable;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 短信审核状态
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019/5/16 12:48 PM
|
||||
*/
|
||||
public enum SmsTypeEnum {
|
||||
public enum SmsTypeEnum implements IntArrayValuable {
|
||||
|
||||
VERIFICATION_CODE(1, "验证码"),
|
||||
NOTICE(1, "通知"),
|
||||
MARKETING(2, "营销"),
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsTypeEnum::getValue).toArray();
|
||||
|
||||
private final Integer value;
|
||||
private final String name;
|
||||
|
||||
@@ -28,4 +34,9 @@ public enum SmsTypeEnum {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user