ab
2024-11-04 09d882262f530ded672f1c01fb65a1fefa00d52d
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
51
52
53
54
55
56
package com.nova.sankuai.domain.enums.vipservice;
 
import io.swagger.annotations.ApiModel;
import org.apache.commons.lang.StringUtils;
 
/**
 * @author weikangdi
 * @create 2022/1/5
 */
@ApiModel(value = "系统订单状态枚举")
public enum VipCardOrderEnum {
 
    /**
     * 订单状态:
     */
    STATUS_CLOSE("CLOSE", "订单关闭"),
    STATUS_INIT("INIT", "创建订单"),
    STATUS_WAIT("Wait", "等待订单通知"), // 闪态单独添加的
    STATUS_END("END", "订单完成"),
    STATUS_INVALID("INVALID", "订单无效"),
    ;
    private String code;
    private String message;
 
    VipCardOrderEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
 
    public static String message(String code) {
        if (StringUtils.isNotEmpty(code)) {
            for (VipCardOrderEnum m : VipCardOrderEnum.values()) {
                if (m.getCode().equals(code)) {
                    return m.getMessage();
                }
            }
        }
        return null;
    }
 
    public String getCode() {
        return code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
    public String getMessage() {
        return message;
    }
 
    public void setMessage(String value) {
        this.message = value;
    }
}