package org.springblade.common.enums;

import lombok.Getter;

/**
 * 订单类型枚举类
 */
@Getter
public enum MessageTypeEnum {
	TRADE("交易通知", 1),
	WL("物流通知", 2);
	private String name;
	private Integer value;

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

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