xiangpei
2025-05-27 f2cc79e9e83aafacc1af0e2c86e3c8df384fc895
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
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 VideoCommentStatusEnum {
 
    NORMAL("normal", "正常"),
    AUDITING("auditing", "审核中"),
    INVALID("invalid", "无效的/未通过审核的"),
    ;
 
    private final String value;
 
 
    private final String desc;
 
    VideoCommentStatusEnum(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 (VideoCommentStatusEnum e : VideoCommentStatusEnum.values()){
            if (value.equals(e.getValue())) {
                return e.getDesc();
            }
        }
        return null;
    }
}