package org.springblade.common.enums;

import lombok.Getter;

/**
 * 订单类型枚举类
 */
@Getter
public enum PaymentTypeEnum {
	ALIPAY("支付宝付款", "aliPay"),
	WEIXIN_PAY("微信支付","wxPay");
	private String name;
	private String value;

	PaymentTypeEnum(String name, String value) {
		this.name = name;
		this.value = value;
	}

	public static String getNameByValue(String value) {
		for (PaymentTypeEnum orderTypeEnum : PaymentTypeEnum.values()) {
			if (orderTypeEnum.value.equals(value)) {
				return orderTypeEnum.getName();
			}
		}
		return "未知";
	}
}
