package com.matrix.system.enums;
|
|
import com.google.common.collect.Lists;
|
import com.matrix.core.enums.EnumApiShowAble;
|
import com.matrix.core.enums.EnumsShowVo;
|
|
import java.util.List;
|
import java.util.stream.Collectors;
|
|
|
public enum SmsPlatformEnum implements EnumApiShowAble {
|
|
|
ALIBABA(1 ,"阿里云短信"),
|
HUYIWUXIAN(2, "互亿无线");
|
|
private Integer value;
|
|
private String displayName;
|
|
SmsPlatformEnum(Integer value, String displayName) {
|
this.value = value;
|
this.displayName = displayName;
|
}
|
|
|
|
@Override
|
public String getEnumCode() {
|
return "smsPlatform";
|
}
|
|
@Override
|
public List<EnumsShowVo> getEnumsShowVos() {
|
return Lists.newArrayList(values()).stream().map(item ->
|
EnumsShowVo.builder()
|
.displayName(item.getDisplayName())
|
.value(item.value)
|
.build()
|
).collect(Collectors.toList());
|
}
|
|
public Integer getValue() {
|
return value;
|
}
|
|
public String getDisplayName() {
|
return displayName;
|
}
|
}
|