rk
10 小时以前 cf17c2f7012fc4351f66c71d66a4aa3a9fe9e34a
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
package com.doumee.config.xyy.dto;
 
/**
 * 订单状态
 *
 * @author RabyGao
 * @date Aug 8, 2019
 */
public enum OrderStatusType {
 
    /**
     * 处理中
     */
    Processing(0),
    /**
     * 完成
     */
    Completed(1),
    /**
     * 失败
     */
    Failed(2);
 
    private final int val;
 
    public int getVal() {
        return val;
    }
 
    OrderStatusType(int num) {
        this.val = num;
    }
 
    public static OrderStatusType getOrderStatusType(int val) {
        for (OrderStatusType type : OrderStatusType.values()) {
            if (type.getVal() == val) {
                return type;
            }
        }
        return Processing;
    }
 
}