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