123
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.cai.enums.home;
|
||||
|
||||
import lombok.Getter;
|
||||
/**
|
||||
* 0-默认查询
|
||||
* 1-活跃查询
|
||||
* 2-新人查询
|
||||
* 3-同城查询
|
||||
*/
|
||||
@Getter
|
||||
public enum AnchorListQueryTypeEnum {
|
||||
DEFAULT(0,"默认查询"),
|
||||
ACTIVE(1,"活跃查询"),
|
||||
NEW(2,"新人查询"),
|
||||
CITY(3,"同城查询"),
|
||||
;
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
AnchorListQueryTypeEnum(Integer code, String text) {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public static AnchorListQueryTypeEnum getByCode(Integer code){
|
||||
AnchorListQueryTypeEnum[] values = AnchorListQueryTypeEnum.values();
|
||||
for (AnchorListQueryTypeEnum value : values) {
|
||||
if(value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return AnchorListQueryTypeEnum.DEFAULT;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user