huliguo
2025-08-08 749570394745ae95ee65605eadb42800f42fa20a
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
package com.linghu.config;
 
import lombok.Getter;
 
@Getter
public enum FinalStatus {
    SUCCESS("success"),
    NO_RESULTS("no_results"),
    BUSYNESS("busyness"),
    CANCELLED("cancelled"),
    COMPLETED("completed"),
    CANCELED("canceled"),
    ERROR("ERROR"),
    SUBMITTED("submitted"),
    PENDING("pending"),
    FALSE("false"),
    NONENTITY("nonentity"),
    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);
    }
}