guyue
2025-09-03 dd028e18a12ad9ae7c43ed09b15ddd6bde1a43e9
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
42
43
44
45
46
47
48
49
50
package com.linghu.config;
 
import lombok.Getter;
 
@Getter
public enum FinalStatus {
    //成功
    SUCCESS("success"),
    //没有结果
    NO_RESULTS("no_results"),
    //繁忙
    BUSYNESS("busyness"),
    //已取消
    CANCELLED("cancelled"),
    //已完成
    COMPLETED("completed"),
    //报错
    ERROR("ERROR"),
    //已提交
    SUBMITTED("submitted"),
    //待处理
    PENDING("pending"),
    //网络错误
    FALSE("false"),
    //不存在
    NONENTITY("nonentity"),
    //未提交
    NOTSUBMITTED("notSubmitted"),
    //执行中
    RUNNING("running"),
    //失败
    FAILED("failed");
 
 
    private final String value;
    
    FinalStatus(String value) {
        this.value = value;
    }
 
    // 可选:根据字符串值获取枚举实例
    public static FinalStatus fromValue(String value) {
        for (FinalStatus status : FinalStatus.values()) {
            if (status.value.equals(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("无效的状态值: " + value);
    }
}