123
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.cai.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 1.封6小时 2.封1天 3.封3天 4.封7天 5.封一个月 6.封10年
|
||||
* <p>created on 2024/1/18 15:01</p>
|
||||
* @author 77
|
||||
*/
|
||||
@Getter
|
||||
public enum ForbidTimeEnum {
|
||||
HOUSE_6(1,"封6小时"),
|
||||
DAY_1(2,"封1天"),
|
||||
DAY_3(3,"封3天"),
|
||||
DAY_7(4,"封7天"),
|
||||
MONTH_1(5,"封一个月"),
|
||||
YEAR_10(6,"封10年"),
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
ForbidTimeEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public static ForbidTimeEnum getByCode(Integer code){
|
||||
ForbidTimeEnum[] values = ForbidTimeEnum.values();
|
||||
for (ForbidTimeEnum value : values) {
|
||||
if(value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.cai.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum ForbidTypeEnum {
|
||||
USER(1,"封用户"),
|
||||
UUID(2,"封设备"),
|
||||
IMEI(3,"封IMEI"),
|
||||
MAC(4,"封MAC"),
|
||||
IP(5,"封IP"),
|
||||
;
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
ForbidTypeEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public static ForbidTypeEnum getByCode(Integer code){
|
||||
ForbidTypeEnum[] values = ForbidTypeEnum.values();
|
||||
for (ForbidTypeEnum value : values) {
|
||||
if(value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user