package com.iailab.common.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author PanZhibao * @Description * @createTime 2023年08月25日 18:03:00 */ @Getter @AllArgsConstructor public enum DataAshType { YM(1, "7001"), JM(2, "2001"); private Integer code; private String desc; public static DataAshType getEumByCode(Integer code) { if (code == null) { return null; } for (DataAshType statusEnum : DataAshType.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }