Commit afe5a0b0 authored by zhangsen's avatar zhangsen

枚举提交

parent 1e1d0a80
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 流程是否同意
*/
@Getter
@AllArgsConstructor
public enum WhetherItPassEnum {
PASS("1", "通过"),
REJECT("0", "驳回"),
SAVE("2", "保存");
private final String code;
private final String name;
public String getCode() {
return code;
}
public String getName() {
return name;
}
public static String getTypeByCode(String code){
for (WhetherItPassEnum constants : values()) {
if (constants.getCode().equals(code)) {
return constants.getName();
}
}
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment