yangys
2024-04-04 ed4a5236bab800094be4a8378f5098eebe3de6ac
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
package com.qianwen.smartman.modules.andon.enums;
 
import java.util.Arrays;
import com.qianwen.core.tool.utils.Func;
 
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/andon/enums/DateType.class */
public enum DateType {
    DAY(1),
    WEEK(2),
    MONTH(3);
    
    private final Integer type;
 
    DateType(final Integer type) {
        this.type = type;
    }
 
    public Integer getType() {
        return this.type;
    }
 
    public static DateType findByType(Integer type) {
        if (Func.isNull(type)) {
            return DAY;
        }
        return (DateType) Arrays.stream(values()).filter(dt -> {
            return dt.getType().equals(type);
        }).findFirst().get();
    }
}