package com.zfire.mall.manager.enums;

import cn.hutool.core.util.EnumUtil;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

import java.util.Map;

@Getter
public enum JiaXianCostTypeEnum {
    ONE("GE_JIANG","格匠"),
    TWO("GUANG_ZHOU","广州销售公司"),
    THREE("FO_SHAN","佛山销售公司"),
    FOR("OTHER","OTHER"),

    ;
    @JsonValue
    @EnumValue
    private String key;
    private String value;

    JiaXianCostTypeEnum(String key, String value){
        this.key=key;
        this.value = value;
    }

    public static String getMsg(String examineStatus) {
        if (StringUtils.isNotBlank(examineStatus)) {
            Map<String, Object> enumMap = EnumUtil.getNameFieldMap(JiaXianCostTypeEnum.class, "value");
            return enumMap.get(examineStatus).toString();
        }
        return "";
    }
}
