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