czt
2024-04-23 f55b2623f09b0b902f991c701c67a2a6f2577057
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.common.data;
 
/**
 * 指令反馈码
 */
public enum OrderCommonResult {
 
    ORDER_CODE_200("200", "指令解析成功"),
    ORDER_CODE_500("500", "指令解析失败");
 
    private String code;
    private String result;
 
    OrderCommonResult(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(OrderCommonResult.ORDER_CODE_200.getCode().equals(code)) return OrderCommonResult.ORDER_CODE_200.getResult();
        if(OrderCommonResult.ORDER_CODE_500.getCode().equals(code)) return OrderCommonResult.ORDER_CODE_500.getResult();
        return code;
    }
 
}