package cc.mrbird.febs.dapp.enumerate;
|
|
import lombok.Getter;
|
|
import java.math.BigDecimal;
|
import java.util.ArrayList;
|
import java.util.List;
|
|
@Getter
|
public enum NodeType {
|
/**
|
* 节点类型 投注金额 投注奖励
|
* 30
|
* 30*1.4
|
* 30*1.4*1.4
|
*/
|
|
NODE_13(13,"1700.817","2381.144"),
|
NODE_12(12,"1214.869","1700.817"),
|
NODE_11(11,"867.763","1214.869"),
|
NODE_10(10,"619.831","867.763"),
|
NODE_9(9,"442.736","619.831"),
|
NODE_8(8,"316.24","442.736"),
|
NODE_7(7,"225.886","316.24"),
|
NODE_6(6,"161.347","225.886"),
|
NODE_5(5,"115.248","161.347"),
|
NODE_4(4,"82.32","115.248"),
|
NODE_3(3,"58.8","82.32"),
|
NODE_2(2,"42","58.8"),
|
NODE_1(1,"30","42");
|
|
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;
|
}
|
|
public List<NodeType> getNodeList() {
|
List<NodeType> objects = new ArrayList<>();
|
for (NodeType value : NodeType.values()) {
|
objects.add(value);
|
}
|
return objects;
|
}
|
|
}
|