CZT
2024-01-03 5a53e819101f3d34d9774f321db14b3456bae507
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.fzzy.order.data;
 
/**
 * 指令反馈码
 */
public enum OrderResult {
 
    ORDER_CODE_200("200", "指令解析成功"),
    ORDER_CODE_500("500", "指令解析失败");
 
    private String code;
    private String result;
 
    OrderResult(String code, String msg) {
        this.code = code;
        this.result = msg;
    }
 
    public String getCode() {
        return code;
    }
 
    public String getResult() {
        return result;
    }
 
    public static String getMsg(String code) {
        if(null == code) return null;
 
        if(OrderResult.ORDER_CODE_200.getCode().equals(code)) return OrderResult.ORDER_CODE_200.getResult();
        if(OrderResult.ORDER_CODE_500.getCode().equals(code)) return OrderResult.ORDER_CODE_500.getResult();
        return code;
    }
 
}