| | |
| | | package com.yeshi.buwan.vo.video; |
| | | |
| | | import com.yeshi.buwan.domain.SolrVideo; |
| | | 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 picture; |
| | | 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; |
| | |
| | | VideoAdminInfoVO vo = new VideoAdminInfoVO(); |
| | | vo.setId(video.getId()); |
| | | vo.setName(video.getName()); |
| | | vo.setPicture(video.getHpicture()); |
| | | 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( |
| | |
| | | } |
| | | |
| | | |
| | | public static VideoAdminInfoVO create(SolrVideo solrVideo) { |
| | | public static VideoAdminInfoVO create(SolrAlbumVideo solrVideo) { |
| | | VideoAdminInfoVO vo = new VideoAdminInfoVO(); |
| | | vo.setId(solrVideo.getId()); |
| | | vo.setName(solrVideo.getName()); |
| | | vo.setPicture(solrVideo.getHpicture()); |
| | | 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; |
| | | } |
| | | |
| | |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getPicture() { |
| | | return picture; |
| | | } |
| | | |
| | | public void setPicture(String picture) { |
| | | this.picture = picture; |
| | | } |
| | | |
| | | public String getUpdatetime() { |
| | | return 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; |
| | | } |
| | | } |