public enum RewardTypeEnum {
FUND_ONLY(1, "佣金"),
COIN_ONLY(2, "金币"),
CMS_COIN(3, "佣金|金币");
private Integer type;
private String desc;
private static final Map<Integer, RewardTypeEnum> TYPE_MAP = new HashMap<>(RewardTypeEnum.values().length);
static {
for (RewardTypeEnum typeEnum : values()) {
TYPE_MAP.put(typeEnum.type, typeEnum);
}
}
RewardTypeEnum(Integer type, String desc) {
this.type = type;
this.desc = desc;
}
public Integer getType() {
return type;
}
public String getDesc() {
return desc;
}
public static RewardTypeEnum getByType(Integer type) {
return TYPE_MAP.get(type);
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。