|
@@ -0,0 +1,52 @@
|
|
|
+package com.diagbot.enums;
|
|
|
+
|
|
|
+import com.diagbot.core.KeyedNamed;
|
|
|
+import lombok.Setter;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description:
|
|
|
+ * @author: zhaops
|
|
|
+ * @time: 2018/9/19 10:05
|
|
|
+ */
|
|
|
+public enum NotPassEnum implements KeyedNamed {
|
|
|
+ ImperfectInformation(1, "账号信息不完善"),
|
|
|
+ AgencyError(2, "机构有误"),
|
|
|
+ CancellationOfOrder(3,"取消订单"),
|
|
|
+ NotChoose(0,"未选择");
|
|
|
+
|
|
|
+ @Setter
|
|
|
+ private Integer key;
|
|
|
+
|
|
|
+ @Setter
|
|
|
+ private String name;
|
|
|
+
|
|
|
+ NotPassEnum(Integer key, String name) {
|
|
|
+ this.key = key;
|
|
|
+ this.name = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static NotPassEnum getEnum(Integer key) {
|
|
|
+ for (NotPassEnum item : NotPassEnum.values()) {
|
|
|
+ if (item.key == key) {
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String getName(Integer key) {
|
|
|
+ NotPassEnum item = getEnum(key);
|
|
|
+ return item != null ? item.name : null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int getKey() {
|
|
|
+ return key;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getName() {
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|