NumberImportTaskStatus.java
870 Bytes
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
package com.uccc.number.constants;
import com.uccc.pretty.constants.ErrorCode;
/**
* Created by bert on 2021-09-27 12:00
*/
public enum NumberImportTaskStatus {
NUMBER_TASK_NOT_RUN(0, "未开始"),
NUMBER_TASK_RUN(1, "进行中"),
NUMBER_TASK_FINISH(2, "已完成"),
NUMBER_TASK_PAUSE(3, "暂停"),;
private int code;
private String message;
private NumberImportTaskStatus(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public String getMessage() {
return message;
}
public static ErrorCode getByCode(int code) {
ErrorCode[] values = ErrorCode.values();
for (ErrorCode value : values) {
if (value.getCode() == code)
return value;
}
return null;
}
}