package com.jianshui.common.constant;

public enum RebackType {
    REBACK_TYPE_1("1", "系统推送"),
    REBACK_TYPE_2("2", "SAP推送"),
    REBACK_TYPE_3("3", "数据回写");

    private String rebackTypeCode;
    private String rebackTypeMsg;

    RebackType(String rebackTypeCode, String rebackTypeMsg){
        this.rebackTypeCode = rebackTypeCode;
        this.rebackTypeMsg = rebackTypeMsg;
    }

    public String getRebackTypeMsg(){
        return rebackTypeMsg;
    }

    public String getrebackTypeCode(){
        return rebackTypeCode;
    }

    public static String getRebackType(String code){
        for(RebackType rebackType : RebackType.values()){
            if(rebackType.getrebackTypeCode().equals(code)){
                return rebackType.getRebackTypeMsg();
            }
        }
        return "未知回调方式";
    }
}
