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;
|
}
|
}
|