package com.tofly.feesapi.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.util.StringUtils;

@Getter
@AllArgsConstructor
public enum WxEnum {
    WX_CLJG_TYPE_UNTREATED("0", "未处理"),

    WX_CLJG_TYPE_SUCCESS("1", "已处理"),

    WX_CLJG_TYPE_ERROR("2", "已作废"),

    WX_GHSQ_TYPE_GM("11", "更名"),
    WX_GHSQ_TYPE_GH("21", "过户"),
    ;
    /**
     * 编码
     */
    private String code;
    /**
     * 内容
     */
    private String value;
    public static String getCodeForValue(String code) {
        String path = "";
        if (StringUtils.isEmpty(code)) {
            return path;
        }

        for (WxEnum e : WxEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                path = e.value;
                break;
            }
        }
        return path;
    }
}
