package cn.pluss.platform.jty;

import cn.pluss.platform.entitiy.SettleTypeEnum;
import cn.pluss.platform.exception.MsgException;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * TODO
 * 佳天亿通知类型枚举
 * @author crystal
 * @date 2022/3/17 16:45
 */
@Getter
@AllArgsConstructor
public enum JtyNoticeEnum {

    TEXT("1001","text","文本消息"),
    SUCCESS("1002","pay","成功消息"),
    CANCEL("1003","cancel","取消消息");

    private String code;

    private String name;

    private String desc;

    public static String getConverCode(String name) {
        JtyNoticeEnum[] noticeEnums = values();
        for (JtyNoticeEnum notice : noticeEnums) {
            if(notice.getName().equals(name)){
                return notice.getCode();
            }
        }
        return null;
    }
}
