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
| package com.sandu.ximon.admin.pay;
|
| public enum OrderStatusEnums {
| /**
| * 订单状态,// 未支付(0),已支付(1),已退款(2),退款中(3),退款失败(4),订单完成(5)
| */
| UNPAID(0, "未付款"),
| PAID(1, "已付款"),
| REFUNDED(2, "已退款"),
| REFUNDING(3, "退款中"),
| REFUND_FAILUE(4, "退款失败"),
| FINISH(5,"订单完成")
| ;
|
| private final Integer code;
| private final String message;
|
| public static String getValue(Integer code) {
| for (OrderStatusEnums ut : OrderStatusEnums.values()) {
| if (ut.getCode().equals(code)) {
| return ut.message;
| }
| }
| return null;
| }
|
| OrderStatusEnums(Integer code, String message) {
| this.code = code;
| this.message = message;
| }
|
|
| public Integer getCode() {
| return code;
| }
|
| public String getMessage() {
| return message;
| }
| }
|
|