package com.jsowell.common.enums.lianlian;

/**
 * 联联平台 订单支付方式
 *
 * @author JS-ZZA
 * @date 2023/5/17 16:30
 */
public enum PayChannelEnum {
    ALI_PAY("1", "支付宝"),
    WEXIN_PAY("2", "微信支付"),
    TRAFFIC_CARD("3", "交通卡"),
    RECHARGE_CARD("4", "预充卡"),
    UNION_PAY("5", "银联"),
    OTHER("6", "其他自定义"),
    ;
    private String code;
    private String value;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    PayChannelEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getPayChannelByCode(String code) {
        for (PayChannelEnum payChannelEnum : PayChannelEnum.values()) {
            if (payChannelEnum.getValue().equals(code)) {
                return payChannelEnum.getValue();
            }
        }
        return "";
    }
}
