ChannelWithdrawStatusEnum.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package com.qs.mp.common.enums;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.alibaba.fastjson.annotation.JSONType;
  4. import com.baomidou.mybatisplus.annotation.IEnum;
  5. import com.qs.mp.common.json.EnumValueDeserializer;
  6. /**
  7. * @auther zhongcp
  8. * @create 2022 2022/3/7 2:30 下午
  9. * @describe
  10. */
  11. @JSONType(deserializer = EnumValueDeserializer.class)
  12. public enum ChannelWithdrawStatusEnum implements IEnum<Integer> {
  13. WITHDRAWING(1, "待提现"),
  14. FINISHED(2, "已完成"),
  15. FAILED(3, "提现失败"),
  16. WITHDRAW_PROCESS(4,"提现处理中"),
  17. YS_WITHDRAW_FAILED(5, "银盛提现失败"),
  18. ;
  19. private final int value;
  20. private final String desc;
  21. ChannelWithdrawStatusEnum(int value, String desc) {
  22. this.value = value;
  23. this.desc = desc;
  24. }
  25. public static ChannelWithdrawStatusEnum getChannelWithdrawStatusEnum(int value) {
  26. for (ChannelWithdrawStatusEnum channelMoneyTypeEnum : ChannelWithdrawStatusEnum.values()) {
  27. if (channelMoneyTypeEnum.getValue() == value) {
  28. return channelMoneyTypeEnum;
  29. }
  30. }
  31. return null;
  32. }
  33. @Override
  34. public Integer getValue() {
  35. return value;
  36. }
  37. public String getDesc() {
  38. return desc;
  39. }
  40. @Override
  41. public String toString() {
  42. JSONObject object = new JSONObject();
  43. object.put("value", value);
  44. object.put("desc", desc);
  45. return object.toString();
  46. }
  47. }