Files
senmesh-zc/src/main/java/com/newyetai/recruit/user/enums/InductionCycleEnum.java
ran.shang 7e38b8d971 init
2025-06-11 09:42:13 +08:00

48 lines
941 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.newyetai.recruit.user.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.newyetai.mybatis.handle.BaseEnum;
/**
* 入职周期枚举
*/
public enum InductionCycleEnum implements BaseEnum<Integer> {
ANY_TIME(1, "随时入职"),
TWO_WEEKS(2, "2周内入职"),
ONE_MONTH(3, "一个月内入职");
@EnumValue
private final Integer type;
private final String desc;
InductionCycleEnum(Integer type, String desc) {
this.type = type;
this.desc = desc;
}
public Integer getType() {
return type;
}
public String getDesc() {
return desc;
}
@Override
public Integer getValue() {
return type;
}
public static Integer findTypeByDesc(String desc) {
for (InductionCycleEnum type : InductionCycleEnum.values()) {
if (type.getDesc().equals(desc)) {
return type.getType();
}
}
return null; // 如果没有找到,返回null
}
}