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.
 
 
 
 
 

38 lines
746 B

  1. package com.simple.enums;
  2. /**
  3. * Created by Stormeye on 2018/08/09.
  4. */
  5. public enum EnumRefundWay {
  6. B(0, "B端小程序"),
  7. ADMIN(1, "WEB端小程序"),
  8. C(2, "C端小程序"),
  9. AUTO(3, "自动退款");
  10. public static EnumRefundWay getEnum(Integer code) {
  11. for (EnumRefundWay value : values()) {
  12. if (value.getCode().equals(code)) {
  13. return value;
  14. }
  15. }
  16. return null;
  17. }
  18. private Integer code;
  19. private String message;
  20. EnumRefundWay(Integer code, String message) {
  21. this.code = code;
  22. this.message = message;
  23. }
  24. public Integer getCode() {
  25. return code;
  26. }
  27. public String getMessage() {
  28. return message;
  29. }
  30. }