peng
8 天以前 75f9783d5a70a5f037e3b34dc0e479069e63c0e9
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package cn.lili.modules.message.entity.enums;
 
/**
 * 消息编码枚举
 *
 * @author pikachu
 * @since 2020/12/8 9:46
 */
public enum NoticeMessageParameterEnum {
 
    /**
     * 商品名称
     */
    GOODS("goods", "商品名称"),
    /**
     * 消费积分
     */
    EXPENDITURE_POINTS("expenditure_points", "消费积分"),
    /**
     * 获得积分
     */
    INCOME_POINTS("income_points", "获得积分"),
    /**
     * 支出金额
     */
    EXPENDITURE("expenditure", "支出金额"),
    /**
     * 收入金额
     */
    INCOME("income", "收入金额"),
    /**
     * 拒绝原因
     */
    REFUSE("refuse", "拒绝原因"),
    /**
     * 取消原因
     */
    CANCEL_REASON("cancel_reason", "取消原因"),
    /**
     * 金额
     */
    PRICE("price", "金额");
 
    private final String type;
    private final String description;
 
    NoticeMessageParameterEnum(String type, String description) {
        this.type = type;
        this.description = description;
    }
 
    /**
     * 根据type获取去value
     *
     * @param type
     * @return
     */
    public static String getValueByType(String type) {
        for (NoticeMessageParameterEnum noticeMessageParameterEnum : NoticeMessageParameterEnum.values()) {
            if (type.toLowerCase().equals(noticeMessageParameterEnum.getType().toLowerCase())) {
                return noticeMessageParameterEnum.getDescription();
            }
        }
        return null;
    }
 
 
    public String getType() {
        return type;
    }
 
 
    public String getDescription() {
        return description;
    }
 
 
}