package cc.mrbird.febs.common.enumerates; import lombok.Getter; @Getter public enum ScoreFlowTypeEnum { /** * */ PAY(1, "积分支付"), BUY(2, "购买商品获得积分"), RECOMMEND(3, "推荐下单获得积分"); private final int value; private final String desc; ScoreFlowTypeEnum(int value, String desc) { this.value = value; this.desc = desc; } public static String getDescByValue(int value) { for (ScoreFlowTypeEnum scoreFlowTypeEnum : values()) { if (value == scoreFlowTypeEnum.getValue()) { return scoreFlowTypeEnum.getDesc(); } } return ""; } }