admin
2021-03-20 ad3ac53da1c3a11a96ae62d790aa61a81b9eab91
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package com.yeshi.buwan.vo.video;
 
import com.yeshi.buwan.domain.solr.SolrAlbumVideo;
import com.yeshi.buwan.domain.VideoInfo;
import com.yeshi.buwan.util.StringUtil;
import com.yeshi.buwan.util.TimeUtil;
import com.yeshi.buwan.util.video.VideoConstant;
 
public class VideoAdminInfoVO {
 
    private String id;
    private String name;
    private String hpicture;
    private String vpicture;
    private String updatetime;
    private String show;
    private String tag;
    private Integer freeType;
    private String area;
 
    public String getArea() {
        return area;
    }
 
    public void setArea(String area) {
        this.area = area;
    }
 
    public Integer getFreeType() {
        return freeType;
    }
 
    public void setFreeType(Integer freeType) {
        this.freeType = freeType;
    }
 
    public void setShow(String show) {
        this.show = show;
    }
 
    public String getShow() {
        return show;
    }
 
    public String getTag() {
        return tag;
    }
 
    public void setTag(String tag) {
        this.tag = tag;
    }
 
    public static VideoAdminInfoVO create(VideoInfo video) {
        VideoAdminInfoVO vo = new VideoAdminInfoVO();
        vo.setId(video.getId());
        vo.setName(video.getName());
        if (video.getVideoType() != null && VideoConstant.isMainCategory(video.getVideoType().getId()))
            vo.setVpicture(video.getVpicture());
        else
            vo.setHpicture(video.getHpicture());
 
 
        vo.setShow(video.getShow() + "");
        vo.setUpdatetime(TimeUtil.getGernalTime(
                Long.parseLong(
                        StringUtil.isNullOrEmpty(video.getCreatetime() + "") ? "0" : video.getCreatetime() + ""),
                "yyyy-MM-dd"));
        vo.setTag(video.getTag());
        return vo;
    }
 
 
    public static VideoAdminInfoVO create(SolrAlbumVideo solrVideo) {
        VideoAdminInfoVO vo = new VideoAdminInfoVO();
        vo.setId(solrVideo.getId());
        vo.setName(solrVideo.getName());
        if (VideoConstant.isMainCategory(solrVideo.getRootVideoType()))
            vo.setVpicture(solrVideo.getPicture());
        else
            vo.setHpicture(solrVideo.getHpicture());
        vo.setShow(solrVideo.getShow() + "");
        vo.setUpdatetime(TimeUtil.getGernalTime(
                Long.parseLong(
                        StringUtil.isNullOrEmpty(solrVideo.getUpdatetime() + "") ? "0" : solrVideo.getUpdatetime() + ""),
                "yyyy-MM-dd"));
        vo.setTag(solrVideo.getTag());
        vo.setFreeType(solrVideo.getFreeType());
        vo.setArea(solrVideo.getArea());
        return vo;
    }
 
    public String getId() {
        return id;
    }
 
    public void setId(String id) {
        this.id = id;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getUpdatetime() {
        return updatetime;
    }
 
    public void setUpdatetime(String updatetime) {
        this.updatetime = updatetime;
    }
 
    public String getHpicture() {
        return hpicture;
    }
 
    public void setHpicture(String hpicture) {
        this.hpicture = hpicture;
    }
 
    public String getVpicture() {
        return vpicture;
    }
 
    public void setVpicture(String vpicture) {
        this.vpicture = vpicture;
    }
}