package com.hzs.third.pay.enums;

import lombok.Getter;

/**
 * 京东快捷支付银行
 */
@Getter
public enum EJdFastBankCode {

    ICBC("ICBC", "工商银行"),
    BOC("BOC", "中国银行"),
    CCB("CCB", "建设银行"),
    CMBCHINA("CMBCHINA", "招商银行"),
    POST("POST", "邮政储蓄银行"),
    ECITIC("ECITIC", "中信银行"),
    CEB("CEB", "光大银行"),
    BOCO("BOCO", "交通银行"),
    CIB("CIB", "兴业银行"),
    CMBC("CMBC", "民生银行"),
    SZCB("SZCB", "平安银行"),
    CGB("CGB", "广发银行"),
    BCCB("BCCB", "北京银行"),
    HXB("HXB", "华夏银行"),
    SPDB("SPDB", "浦发银行"),
    SHB("SHB", "上海银行"),
    ;

    private final String value;
    private final String label;

    EJdFastBankCode(String value, String label) {
        this.value = value;
        this.label = label;
    }

    /**
     * 根据value获取label
     *
     * @param value
     * @return
     */
    public static EJdFastBankCode getEnumByValue(String value) {
        for (EJdFastBankCode eJdFastBankCode : EJdFastBankCode.values()) {
            if (eJdFastBankCode.getValue().equals(value)) {
                return eJdFastBankCode;
            }
        }
        return null;
    }

}
