| | |
| | | package com.yeshi.buwan.service.manager.search; |
| | | |
| | | import com.yeshi.buwan.domain.HomeVideo; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.domain.entity.PlayUrl; |
| | | import com.yeshi.buwan.domain.solr.SolrShortVideo; |
| | | import com.yeshi.buwan.dto.search.SolrResultDTO; |
| | | import com.yeshi.buwan.dto.search.SolrShortVideoSearchFilter; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.video.shortvideo.ShortVideoUtil; |
| | | import com.yeshi.buwan.util.video.VideoUtil; |
| | | import com.yeshi.buwan.videos.iqiyi.util.IqiyiUtil2; |
| | | import org.apache.solr.client.solrj.response.UpdateResponse; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | solrTemplate.rollback(); |
| | | } |
| | | } |
| | | |
| | | public void deleteById(String id) { |
| | | UpdateResponse updateResponse = solrTemplate.deleteById(CORE_NAME, id); |
| | | if (updateResponse.getStatus() == 0) { |
| | |
| | | |
| | | public PlayUrl getPlayUrl(String id, VideoResource videoResource) { |
| | | //短视频 |
| | | if (ShortVideoUtil.isShortVideoId(id)) { |
| | | if (VideoUtil.getVideoFromType(id) == HomeVideo.FROM_TYPE_SHORT) { |
| | | SolrShortVideo solrShortVideo = findOne(id); |
| | | if (solrShortVideo == null) |
| | | return null; |
| | | PlayUrl pu = new PlayUrl(); |
| | | pu.setParams(""); |
| | | pu.setPlayType(IqiyiUtil.PLAY_HTML); |
| | | pu.setPlayType(IqiyiUtil2.PLAY_HTML); |
| | | pu.setResource(videoResource); |
| | | pu.setUrl(solrShortVideo.getPlayUrl()); |
| | | return pu; |