admin
2020-08-08 3945f9a2c70335958c64c73894e3a1a14a7113b3
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package com.weikou.beibeivideo.entity.recommend;
 
import com.weikou.beibeivideo.entity.HomeAd;
import com.weikou.beibeivideo.entity.HomeType;
import com.weikou.beibeivideo.entity.ad.ExpressAdContainer;
 
import java.util.List;
 
/**
 * 推荐内容
 */
public class RecommendContent {
    public final static int TYPE_BANNER = 1;
    public final static int TYPE_AD = 2;
    public final static int TYPE_HOMETYPE = 3;
 
    private int type;
    private List<HomeAd> homeBannerList;
    private HomeType homeType;
    private ExpressAdContainer ad;
 
    public RecommendContent(int type, List<HomeAd> homeBannerList) {
        this.type = type;
        this.homeBannerList = homeBannerList;
    }
 
    public RecommendContent(int type, HomeType homeType) {
        this.type = type;
        this.homeType = homeType;
    }
 
    public RecommendContent(int type, ExpressAdContainer ad) {
        this.type = type;
        this.ad = ad;
    }
 
    public static RecommendContent createBanner(List<HomeAd> homeBannerList) {
        return new RecommendContent(RecommendContent.TYPE_BANNER, homeBannerList);
    }
 
    public static RecommendContent createHomeType( HomeType homeType) {
        return new RecommendContent(RecommendContent.TYPE_HOMETYPE, homeType);
    }
 
    public static RecommendContent createAd( ExpressAdContainer ad) {
        return new RecommendContent(RecommendContent.TYPE_AD, ad);
    }
 
    public int getType() {
        return type;
    }
 
    public void setType(int type) {
        this.type = type;
    }
 
    public List<HomeAd> getHomeBannerList() {
        return homeBannerList;
    }
 
    public void setHomeBannerList(List<HomeAd> homeBannerList) {
        this.homeBannerList = homeBannerList;
    }
 
    public ExpressAdContainer getAd() {
        return ad;
    }
 
    public void setAd(ExpressAdContainer ad) {
        this.ad = ad;
    }
 
    public HomeType getHomeType() {
        return homeType;
    }
 
    public void setHomeType(HomeType homeType) {
        this.homeType = homeType;
    }
}