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; } }