| | |
| | | import com.yeshi.buwan.dto.user.LoginInfoDto; |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.user.RegisterUserException; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.videos.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.service.imp.*; |
| | | import com.yeshi.buwan.service.inter.juhe.InternetSearchVideoService; |
| | | import com.yeshi.buwan.service.inter.system.SystemConfigService; |
| | |
| | | import com.yeshi.buwan.util.log.UserActiveLogFactory; |
| | | import com.yeshi.buwan.util.video.VideoCategoryConstant; |
| | | import com.yeshi.buwan.util.video.VideoConstant; |
| | | import com.yeshi.buwan.util.video.shortvideo.ShortVideoUtil; |
| | | import com.yeshi.buwan.util.video.VideoUtil; |
| | | import com.yeshi.buwan.vo.AcceptData; |
| | | import com.yeshi.buwan.vo.video.VideoListResultVO; |
| | | import net.sf.json.JSONArray; |
| | |
| | | out.print(JsonUtil.loadFalseJson("获取uid失败")); |
| | | return; |
| | | } else { |
| | | Map<String, String> map = configService.getConfigAsMap(detailSystem, acceptData.getVersion()); |
| | | Map<String, String> map = configService.getConfigAsMap(acceptData.getChildDetailSystem(), acceptData.getVersion()); |
| | | ShareContent share = shareService.getShareContent(detailSystem.getId()); |
| | | JSONObject object = new JSONObject(); |
| | | object.put("Uid", uid); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | vt = new VideoType(); |
| | | vt.setId(Constant.SEARCH_RESULT_TYPE_HIGH_DEFINITION); |
| | | vt.setName("高清"); |
| | | typeList.add(vt); |
| | | //韩剧不返回高清 |
| | | if (!acceptData.getDetailSystem().getId().equalsIgnoreCase("48")) { |
| | | vt = new VideoType(); |
| | | vt.setId(Constant.SEARCH_RESULT_TYPE_HIGH_DEFINITION); |
| | | vt.setName("高清"); |
| | | typeList.add(vt); |
| | | } |
| | | |
| | | |
| | | JSONArray array1 = new JSONArray(); |
| | |
| | | public void guessLike(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | |
| | | String videoId = request.getParameter("VideoId"); |
| | | if (!NumberUtil.isNumeric(videoId)) { |
| | | if (ShortVideoUtil.isShortVideoId(videoId)) { |
| | | int fromtype = VideoUtil.getVideoFromType(videoId); |
| | | switch (fromtype) { |
| | | case HomeVideo.FROM_TYPE_INTERNET: |
| | | guessLikeForInternetSearch(acceptData, videoId, out); |
| | | return; |
| | | case HomeVideo.FROM_TYPE_SHORT: |
| | | guessLikeForShortVideo(acceptData, videoId, out); |
| | | return; |
| | | } |
| | | |
| | | guessLikeForInternetSearch(acceptData, videoId, out); |
| | | return; |
| | | } |
| | | |
| | | DetailSystem ds = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | |
| | | |
| | | //新版热门搜索 |
| | | public void getHotSearchNew(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | DetailSystemConfig config = configService.getConfigByKey("hot_search", acceptData.getDetailSystem(), acceptData.getVersion()); |
| | | DetailSystemConfig config = configService.getConfigByKey("hot_search", acceptData.getDetailSystem(), acceptData.getVersion()); |
| | | if (config == null) { |
| | | out.print(JsonUtil.loadFalseJson("无内容")); |
| | | return; |
| | |
| | | return; |
| | | } |
| | | |
| | | if (!NumberUtil.isNumeric(videoId)) { |
| | | if (ShortVideoUtil.isShortVideoId(videoId)) { |
| | | int fromtype = VideoUtil.getVideoFromType(videoId); |
| | | switch (fromtype) { |
| | | case HomeVideo.FROM_TYPE_INTERNET: |
| | | getRelativeVideosForInternetSearch(acceptData, videoId, out); |
| | | return; |
| | | case HomeVideo.FROM_TYPE_SHORT: |
| | | getRelativeVideosForShortVideo(acceptData, videoId, out); |
| | | return; |
| | | } |
| | | |
| | | |
| | | getRelativeVideosForInternetSearch(acceptData, videoId, out); |
| | | return; |
| | | } |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getDetailSystem(), acceptData.getVersion(), acceptData.getChannel()); |
| | |
| | | loginInfoDto.setSystemId(acceptData.getDetailSystem().getSystem().getId()); |
| | | loginInfoDto.setEmail(account); |
| | | loginInfoDto.setPwd(StringUtil.Md5(pwd)); |
| | | loginInfoDto.setIpInfo(IPUtil.getRemotIP(request) + ":" + request.getRemotePort()); |
| | | try { |
| | | LoginUser user = userService.login(loginInfoDto); |
| | | out.print(JsonUtil.loadTrueJson(StringUtil.outPutResultJson(user))); |
| | |
| | | |
| | | // 注册 --用户名,昵称,密码 |
| | | LoginUser user = userService.getLoginUser(loginUid); |
| | | if (user.getState() != null && user.getState() == LoginUser.STATE_UNREGISTER) { |
| | | out.print(JsonUtil.loadFalseJson("账户已注销")); |
| | | return; |
| | | } |
| | | //隐藏user中的email |
| | | user.setEmail(UserInfoVOFactory.getHiddenEmail(user.getEmail())); |
| | | if (user.getPortrait() != null && !user.getPortrait().startsWith("http")) |