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
33
34
35
36
37
38
39
40
41
| package com.iailab.module.data.common.enums;
|
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * @author PanZhibao
| * @Description
| * @createTime 2024年05月25日
| */
| @Getter
| @AllArgsConstructor
| public enum IndTimeLimitEnum {
|
| TODAY("TODAY", "今天"),
| YESTERDAY("YESTERDAY", "昨天"),
| LAST_DAY_7("LAST_DAY_7", "最近7天"),
| LAST_DAY_30("LAST_DAY_30", "最近30天"),
| THIS_MONTH("THIS_MONTH", "当前月"),
| LAST_MONTH_12("LAST_MONTH_12", "最近12个月"),
| THIS_YEAR_MONTH("THIS_YEAR_MONTH", "当年月份"),
| LAST_YEAR("LAST_YEAR", "去年"),
| THIS_YEAR("THIS_YEAR_MONTH", "今年"),
| CUSTOM("CUSTOM", "自定义");
|
| private String code;
| private String desc;
|
| public static IndTimeLimitEnum getEumByCode(String code) {
| if (code == null) {
| return null;
| }
|
| for (IndTimeLimitEnum statusEnum : IndTimeLimitEnum.values()) {
| if (statusEnum.getCode().equals(code)) {
| return statusEnum;
| }
| }
| return null;
| }
| }
|
|