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
| package cc.mrbird.febs.common.enumerates;
|
| import lombok.Getter;
|
| @Getter
| public enum ScoreFlowTypeEnum {
|
| /**
| *
| */
| PAY(1, "积分支付"),
|
| BUY(2, "购买商品获得积分"),
|
| RECOMMEND(3, "推荐下单获得积分");
|
| private final int value;
|
| private final String desc;
|
| ScoreFlowTypeEnum(int value, String desc) {
| this.value = value;
| this.desc = desc;
| }
|
| public static String getDescByValue(int value) {
| for (ScoreFlowTypeEnum scoreFlowTypeEnum : values()) {
| if (value == scoreFlowTypeEnum.getValue()) {
| return scoreFlowTypeEnum.getDesc();
| }
| }
|
| return "";
| }
|
| }
|
|