package com.qryord.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: biandan
 * @description: 是否标志
 * @author: bao
 * @create: 2022-02-14
 */
@AllArgsConstructor
@Getter
public enum EQueryStatus {
    SUCCESS("SUCCESS", "查询成功"),
    FAILURE("FAILURE", "查询失败");

    private String val;
    private String desc;

    /** 解析 */
    public static EQueryStatus parseByVal(String val) {
        for(EQueryStatus type :EQueryStatus.values()) {
            if(type.getVal().equalsIgnoreCase(val)) {
                return type;
            }
        }
        return EQueryStatus.SUCCESS;
    }
}
