xiangpei
6 小时以前 4f89ece90fca89b667a244376605f9190a234b80
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
42
43
44
45
package cn.lili.modules.lmk.enums.general;
 
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
 
/**
 * 视频标签来源
 *
 * @author:xp
 * @date:2025/5/14 10:30
 */
@Getter
public enum CollectTypeEnum {
 
    VIDEO("video", "视频"),
    ;
 
    private final String value;
 
 
    private final String desc;
 
    CollectTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }
 
    /**
     * 获取含义
     *
     * @param value
     * @return
     */
    public static String getDescByValue(String value) {
        if (StringUtils.isBlank(value)) {
            return null;
        }
        for (CollectTypeEnum e : CollectTypeEnum.values()){
            if (value.equals(e.getValue())) {
                return e.getDesc();
            }
        }
        return null;
    }
}