mitao
2024-04-30 ab4ea7b8f10c9b66aed9c2ea161a08b25c3851a7
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
package com.sinata.common.enums;
 
import com.sinata.common.enums.base.enums.BaseEnum;
 
/**
 * 用户账户详细-触发类型
 */
public enum EnumUserBankDetailDoneType implements BaseEnum {
 
    ADD_INTEGRAL_ORDER(21, "消费增加积分"),
    SUB_INTEGRAL_CANCEL_ORDER(24, "取消订单"),
    ADD_INTEGRAL_SHARE(22, "推荐新用户增加积分"),
    ADD_INTEGRAL_SHARE_COMMISSION(23, "推荐购买商品增加积分"),
 
    MALL_GOODS_PAY(200, "商品支付"),
    MALL_GOODS_REFUND(201, "商品退款"),
    ;
 
    public final int index;
    public final String mark;
 
    EnumUserBankDetailDoneType(int index, String mark) {
        this.index = index;
        this.mark = mark;
    }
 
    public int getIndex() {
        return index;
    }
 
    public String getMark() {
        return mark;
    }
 
    /**
     * 通过index查询说明
     */
    public static String getMarkByIndex(Integer index) {
        if (index != null) {
            for (EnumUserBankDetailDoneType obj : values()) {
                if (obj.getIndex() == index) {
                    return obj.getMark();
                }
            }
        }
        return null;
    }
 
    /**
     * 通过index查询说明
     */
    public static EnumUserBankDetailDoneType getMarkByEnum(Integer index) {
        if (index != null) {
            for (EnumUserBankDetailDoneType obj : values()) {
                if (obj.getIndex() == index) {
                    return obj;
                }
            }
        }
        return null;
    }
}