eApproveStatu.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package com.template.model.enumModel;
  2. /**
  3. * @Author: binguo
  4. * @Date: 2023/7/6 星期四 16:34
  5. * @Description: com.template.model.enumModel
  6. * @Version: 1.0
  7. * 账号状态
  8. */
  9. public enum eApproveStatu {
  10. Audit(1),//待审核
  11. Refused(2),//已拒绝
  12. Pushed(3);//已推送
  13. private int value;
  14. eApproveStatu(int value){
  15. this.value = value;
  16. }
  17. public int getValue() {
  18. return value;
  19. }
  20. public static eApproveStatu valueOf(int value) {
  21. switch (value) {
  22. case 1:
  23. return eApproveStatu.Audit;
  24. case 2:
  25. return eApproveStatu.Refused;
  26. case 3:
  27. return eApproveStatu.Pushed;
  28. default:
  29. return null;
  30. }
  31. }
  32. public static Integer integerOf(String value) {
  33. switch (value) {
  34. case "待审核":
  35. return 1;
  36. case "已拒绝":
  37. return 2;
  38. case "已推送":
  39. return 3;
  40. default:
  41. return null;
  42. }
  43. }
  44. public static String stringOf(Integer value) {
  45. switch (value) {
  46. case 1:
  47. return "待审核";
  48. case 2:
  49. return "已拒绝";
  50. case 3:
  51. return "已推送";
  52. default:
  53. return null;
  54. }
  55. }
  56. }