This commit is contained in:
张良(004796)
2024-01-30 18:29:33 +08:00
parent 21ab6a06cd
commit 5cbed4c929
14 changed files with 221 additions and 38 deletions

View File

@@ -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;
}
}