xiangpei
2025-06-12 8bfcdc67288b607e333da334ec84abc58ff6dfc4
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
46
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 VideoContentTypeEnum {
 
    VIDEO("video", "视频"),
    IMG("img", "图片"),
    ;
 
    private final String value;
 
 
    private final String desc;
 
    VideoContentTypeEnum(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 (VideoContentTypeEnum e : VideoContentTypeEnum.values()){
            if (value.equals(e.getValue())) {
                return e.getDesc();
            }
        }
        return null;
    }
}