package foundation.send.sms; public enum SmsPlatForm { tencent, //腾迅SMS aliyun, //阿里SMS NotKnown; public static SmsPlatForm parse(String value) { if (value == null) { return NotKnown; } value = value.toLowerCase(); if ("tencent".equals(value)) { return tencent; } else if ("aliyun".equals(value)) { return aliyun; } return NotKnown; } public String toChinese() { if (tencent == this) { return "腾迅SMS"; } else if (aliyun == this) { return "阿里SMS"; } return "未知类型"; } }