KKSU
2024-06-12 8986d6d479bf56432ebb8e18bfa0f344d028eee6
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
package cc.mrbird.febs.dapp.enumerate;
 
import lombok.Getter;
 
import java.math.BigDecimal;
@Getter
public enum NodeType {
    /**
     * 节点类型 投注金额 投注奖励
     * 30
     * 30*1.4
     * 30*1.4*1.4
     */
 
    NODE_13(13,"566.9","793.66"),
    NODE_12(12,"405","566.9"),
    NODE_11(11,"289.3","405"),
    NODE_10(10,"206.6","289.3"),
    NODE_9(9,"147.6","206.6"),
    NODE_8(8,"105.4","147.6"),
    NODE_7(7,"75.3","105.4"),
    NODE_6(6,"53.8","75.3"),
    NODE_5(5,"38.4","53.8"),
    NODE_4(4,"27.4","38.4"),
    NODE_3(3,"19.6","27.4"),
    NODE_2(2,"14","19.6"),
    NODE_1(1,"10","14");
 
    private int nodeType;
 
    private String nodeAmount;
 
    private String nodePerk;
 
    NodeType(int nodeType, String nodeAmount, String nodePerk) {
        this.nodeType = nodeType;
        this.nodeAmount = nodeAmount;
        this.nodePerk = nodePerk;
    }
    public NodeType getNode(int nodeType) {
        for (NodeType value : NodeType.values()) {
            if (value.nodeType == nodeType) {
                return value;
            }
        }
        return null;
    }
    public NodeType getNodeByAmount(BigDecimal nodeAmount) {
        BigDecimal abs = nodeAmount.abs();
 
        for (NodeType value : NodeType.values()) {
            if (abs.toString().equals(value.nodeAmount)) {
                return value;
            }
        }
        return null;
    }
 
}