You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
689 B

  1. package com.iformall.enums;
  2. /**
  3. * app平台
  4. * @author alascor
  5. */
  6. public enum EnumAppPlat {
  7. WX(1,"微信"),ALI(2,"阿里"),TOUTIAO(3,"头条");
  8. EnumAppPlat(Integer code, String name) {
  9. this.code = code;
  10. this.name = name;
  11. }
  12. private Integer code;
  13. private String name;
  14. public Integer getCode() {
  15. return code;
  16. }
  17. public void setCode(Integer code) {
  18. this.code = code;
  19. }
  20. public String getName() {
  21. return name;
  22. }
  23. public void setName(String name) {
  24. this.name = name;
  25. }
  26. public static EnumAppPlat getByCode(Integer code) {
  27. for (EnumAppPlat e : EnumAppPlat.values()) {
  28. if (e.getCode().intValue() == code.intValue()) {
  29. return e;
  30. }
  31. }
  32. return null;
  33. }
  34. }