提交 | 用户 | 时间
|
97edd7
|
1 |
package com.iailab.module.shasteel.framework.sms.core.enums; |
H |
2 |
|
|
3 |
import cn.hutool.core.util.ArrayUtil; |
|
4 |
import lombok.AllArgsConstructor; |
|
5 |
import lombok.Getter; |
|
6 |
|
|
7 |
/** |
|
8 |
* 短信渠道枚举 |
|
9 |
* |
|
10 |
* @author zzf |
|
11 |
* @since 2021/1/25 10:56 |
|
12 |
*/ |
|
13 |
@Getter |
|
14 |
@AllArgsConstructor |
|
15 |
public enum SmsChannelEnum { |
|
16 |
|
|
17 |
DEBUG_DING_TALK("DEBUG_DING_TALK", "调试(钉钉)"), |
|
18 |
ALIYUN("ALIYUN", "阿里云"), |
|
19 |
TENCENT("TENCENT", "腾讯云"), |
|
20 |
// HUA_WEI("HUA_WEI", "华为云"), |
|
21 |
; |
|
22 |
|
|
23 |
/** |
|
24 |
* 编码 |
|
25 |
*/ |
|
26 |
private final String code; |
|
27 |
/** |
|
28 |
* 名字 |
|
29 |
*/ |
|
30 |
private final String name; |
|
31 |
|
|
32 |
public static SmsChannelEnum getByCode(String code) { |
|
33 |
return ArrayUtil.firstMatch(o -> o.getCode().equals(code), values()); |
|
34 |
} |
|
35 |
|
|
36 |
} |