init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.cai.pay;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum RechargeTypeEnum {
|
||||
|
||||
COIN(1,"余额调整"),
|
||||
COIN_INCOME(2,"收益调整"),
|
||||
;
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
RechargeTypeEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static RechargeTypeEnum getByCode(Integer code){
|
||||
RechargeTypeEnum[] values = RechargeTypeEnum.values();
|
||||
for (RechargeTypeEnum value : values) {
|
||||
if(value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user