| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.yeshi.buwan.domain.solr.SolrAlbumVideo; |
| | | import com.yeshi.buwan.domain.system.DetailSystemConfig; |
| | | import com.yeshi.buwan.dto.search.SolrResultDTO; |
| | | import com.yeshi.buwan.dto.search.SolrVideoSearchFilter; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.service.imp.*; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumVideoDataManager; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.util.factory.VideoInfoFactory; |
| | | import com.yeshi.buwan.vo.AcceptData; |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | |
| | | import com.yeshi.buwan.domain.news.FoundNews; |
| | | import com.yeshi.buwan.domain.news.News; |
| | | import com.yeshi.buwan.domain.special.Special; |
| | | import com.yeshi.buwan.service.imp.AdService; |
| | | import com.yeshi.buwan.service.imp.SpecialService; |
| | | import com.yeshi.buwan.service.imp.StarService; |
| | | import com.yeshi.buwan.service.imp.SystemService; |
| | | import com.yeshi.buwan.service.imp.VideoService; |
| | | import com.yeshi.buwan.service.imp.news.NewsService; |
| | | import com.yeshi.buwan.util.JsonUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | |
| | | private AdService adService; |
| | | @Resource |
| | | private VideoService videoService; |
| | | @Resource |
| | | private DetailSystemConfigService detailSystemConfigService; |
| | | |
| | | public void getSpecialMainList(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | |
| | |
| | | public void getAppHui(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | |
| | | |
| | | |
| | | int pid = CommonAdUtil.getFoundAPPHuiPosition(acceptData.getPlatform()); |
| | | |
| | | // DetailSystem ds = |
| | |
| | | out.print(JsonUtil.loadTrueJson(object.toString())); |
| | | } |
| | | |
| | | @Resource |
| | | private SolrAlbumVideoDataManager solrAlbumVideoDataManager; |
| | | |
| | | // 获取猜你喜欢 |
| | | public void guessLike(AcceptData acceptData,HttpServletRequest request, PrintWriter out) { |
| | | |
| | | String page = request.getParameter("Page"); |
| | | |
| | | |
| | | if (StringUtil.isNullOrEmpty(page)) { |
| | | out.print(JsonUtil.loadFalseJson("请上传page")); |
| | | return; |
| | | } |
| | | |
| | | List<VideoInfo> list = videoService.guessLike(Integer.parseInt(page)); |
| | | List<VideoInfo> list = null; |
| | | |
| | | DetailSystem ds = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | //IOS审核版本 |
| | | DetailSystemConfig onLineVersion = detailSystemConfigService.getConfigByKey("ios_online_version", ds, acceptData.getVersion()); |
| | | if (onLineVersion != null && Integer.parseInt(onLineVersion.getValue()) <= acceptData.getVersion()) { |
| | | SolrVideoSearchFilter filter = new SolrVideoSearchFilter(); |
| | | filter.setResourceIds(new String[]{PPTVUtil.RESOURCE_ID + ""}); |
| | | SolrResultDTO resultDTO = solrAlbumVideoDataManager.find(filter, Integer.parseInt(page), Constant.pageCount); |
| | | if (resultDTO != null) { |
| | | List<SolrAlbumVideo> solrAlbumVideoList = resultDTO.getVideoList(); |
| | | if (solrAlbumVideoList != null && solrAlbumVideoList.size() > 0) { |
| | | list = new ArrayList<>(); |
| | | for (SolrAlbumVideo av : solrAlbumVideoList) { |
| | | VideoInfo videoInfo = VideoInfoFactory.create(av); |
| | | videoInfo.setDuration(""); |
| | | list.add(videoInfo); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | list = videoService.guessLike(Integer.parseInt(page)); |
| | | } |
| | | if (list != null) |
| | | Collections.shuffle(list); |
| | | |