xiangpei
2025-05-22 0d9214d780c5093165f566f3e6f0c60f5d8aead7
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
47
48
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 VideoStatusEnum {
 
    AUDITING("99", "待审核"),
    PUBLISHED("1", "已发布"),
    DISABLE("0", "已下架"),
    REJECT("-1", "审核未通过"),
    ;
 
    private final String value;
 
 
    private final String desc;
 
    VideoStatusEnum(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 (VideoStatusEnum e : VideoStatusEnum.values()){
            if (value.equals(e.getValue())) {
                return e.getDesc();
            }
        }
        return null;
    }
}