3e57256fe9fc13c1d91ba8200d90842905604233.svn-base 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package org.jeecg.modules.message.handle.enums;
  2. import org.jeecg.common.util.oConvertUtils;
  3. /**
  4. * 发送消息类型枚举
  5. */
  6. public enum SendMsgTypeEnum {
  7. //推送方式:1短信 2邮件 3微信
  8. SMS("1", "org.jeecg.modules.message.handle.impl.SmsSendMsgHandle"),
  9. EMAIL("2", "org.jeecg.modules.message.handle.impl.EmailSendMsgHandle"),
  10. WX("3","org.jeecg.modules.message.handle.impl.WxSendMsgHandle");
  11. private String type;
  12. private String implClass;
  13. private SendMsgTypeEnum(String type, String implClass) {
  14. this.type = type;
  15. this.implClass = implClass;
  16. }
  17. public String getType() {
  18. return type;
  19. }
  20. public void setType(String type) {
  21. this.type = type;
  22. }
  23. public String getImplClass() {
  24. return implClass;
  25. }
  26. public void setImplClass(String implClass) {
  27. this.implClass = implClass;
  28. }
  29. public static SendMsgTypeEnum getByType(String type) {
  30. if (oConvertUtils.isEmpty(type)) {
  31. return null;
  32. }
  33. for (SendMsgTypeEnum val : values()) {
  34. if (val.getType().equals(type)) {
  35. return val;
  36. }
  37. }
  38. return null;
  39. }
  40. }