1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| package com.oying.utils.enums;
|
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * @author xin
| * @description
| * @date 2025/7/1 17:32
| */
| @Getter
| @AllArgsConstructor
| public enum ReturnAuditEnum {
|
| ZERO(0, "申请"),
| ONE(1, "通过"),
| TWO(2, "拒绝"),
| THREE(3, "未知");
|
| private final Integer key;
|
| private final String value;
|
| public static ReturnAuditEnum find(Integer val) {
| for (ReturnAuditEnum value : ReturnAuditEnum.values()) {
| if (val.equals(value.getKey())) {
| return value;
| }
| }
| return THREE;
| }
|
| public static String getValue(Integer val) {
| for (ReturnAuditEnum value : ReturnAuditEnum.values()) {
| if (val.equals(value.getKey())) {
| return value.getValue();
| }
| }
| return THREE.getValue();
| }
| }
|
|