1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| package com.iailab.module.data.enums;
|
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * 频率类型
| */
| @Getter
| @AllArgsConstructor
| public enum Freq {
| NET10("NET10", 10),
| NET30("NET30", 30),
| NET60("NET60",60);
|
| private String code;
|
| private Integer value;
|
| public static Freq getEumByCode(String code) {
| if (code == null) {
| return null;
| }
|
| for (Freq statusEnum : Freq.values()) {
| if (statusEnum.getCode().equals(code)) {
| return statusEnum;
| }
| }
| return null;
| }
| }
|
|