UserVipLevelEnum.java
1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
*
*/
package com.yoho.message.sdk.common.constants;
/**
* 描述:黑名单用户类型
*
*
*/
public enum UserVipLevelEnum {
NORMAL(0, "普通会员","7天退换货、极速发货"),
LEVEL_1(1, "银卡会员","7天退换货、极速发货、专享折扣、生日礼包、购物返币、升级礼包"),
LEVEL_2(3, "金卡会员","7天退换货、极速发货、专享折扣、生日礼包、购物返币、升级礼包、免邮服务"),
LEVEL_3(4, "白金卡会员","7天退换货、极速发货、专享折扣、生日礼包、购物返币、升级礼包、免邮服务、优享客服");
private int value;
private String name;
private String desc;
UserVipLevelEnum(int value, String name,String desc) {
this.value = value;
this.name = name;
this.desc = desc;
}
public static String getNameByValue(int value) {
for (UserVipLevelEnum e : values()) {
if (value == e.getValue()) {
return e.getName();
}
}
return null;
}
public static String getDescByValue(int value) {
for (UserVipLevelEnum e : values()) {
if (value == e.getValue()) {
return e.getDesc();
}
}
return null;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public String getDesc() {
return desc;
}
}