Administrator
2025-05-20 c99b27b5d7f63b7c9ebe0ed682a82d28c238453a
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 cc.mrbird.febs.common.enumerates;
 
import cc.mrbird.febs.mall.vo.banner.BannerDictionaryEnumVo;
import lombok.Getter;
 
import java.util.ArrayList;
import java.util.List;
 
@Getter
public enum BannerDictionaryEnum {
    /**
     * 类型 1-小程序首页2-开屏页3-商城4-首页社区
     */
    SOCIAL(4, "社区首页"),
    SHOP_STORE(3, "商城首页"),
    OPEN_XCX(2, "开屏页"),
    LUN_BO(1, "小程序首页");
 
    private int type;
 
    private String code;
 
    BannerDictionaryEnum(int type, String code) {
        this.type = type;
        this.code = code;
    }
 
    public static List<BannerDictionaryEnumVo> getAllType() {
        ArrayList<BannerDictionaryEnumVo> bannerDictionaryEnumVos = new ArrayList<>();
        for (BannerDictionaryEnum bannerDictionaryEnum : values()) {
            BannerDictionaryEnumVo bannerDictionaryEnumVo = new BannerDictionaryEnumVo();
            bannerDictionaryEnumVo.setType(bannerDictionaryEnum.getType());
            bannerDictionaryEnumVo.setCode(bannerDictionaryEnum.getCode());
            bannerDictionaryEnumVos.add(bannerDictionaryEnumVo);
        }
 
        return bannerDictionaryEnumVos;
    }
 
 
    public static void main(String[] args) {
        List<BannerDictionaryEnumVo> allType = BannerDictionaryEnum.getAllType();
        System.out.println(allType);
    }
}