| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.yeshi.buwan.exception.video.VideoPlayException; |
| | | import org.apache.commons.httpclient.HttpClient; |
| | | import org.apache.commons.httpclient.HttpException; |
| | | import org.apache.commons.httpclient.methods.GetMethod; |
| | |
| | | String sign = request.getParameter("Sign"); |
| | | String platform = request.getParameter("Platform"); |
| | | String packageName = request.getParameter("Package"); |
| | | String channel = request.getParameter("Channel"); |
| | | if (StringUtil.isNullOrEmpty(method)) { |
| | | out.print(JsonUtil.loadFalseJson("请上传Method")); |
| | | return; |
| | |
| | | array.add(StringUtil.outPutResultJson(list.get(i))); |
| | | |
| | | object.put("homeAdList", array); |
| | | object.put("homeTypeList", getHomeType(uid, platform, detailSystem.getId())); |
| | | object.put("homeTypeList", getHomeType(uid, platform, detailSystem.getId(), channel)); |
| | | |
| | | // 排行 |
| | | JSONObject rank = new JSONObject(); |
| | |
| | | } |
| | | |
| | | // 首页类型获取 |
| | | private JSONArray getHomeType(String uid, String platform, String detailsystemid) { |
| | | private JSONArray getHomeType(String uid, String platform, String detailsystemid, String channel) { |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1, channel); |
| | | List<HomeType> list1 = homeTypeService.getHomeType(detailsystemid, platform, 1, resourceList, |
| | | CacheUtil.getMD5Long(resourceList), 10, "recommend"); |
| | | List<HomeType> list = new ArrayList<>(); |
| | |
| | | return; |
| | | } |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1, null); |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); |
| | | |
| | | List<VideoType> typeList = getFirstType(pid); |
| | |
| | | return; |
| | | } |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), Integer.parseInt(version)); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), Integer.parseInt(version), null); |
| | | |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(null, videoId, resourceId, resourceList, |
| | | CacheUtil.getMD5Long(resourceList))); |
| | |
| | | |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); |
| | | |
| | | PlayUrl pu = videoDeailUtil.getPlayUrl(null, detailSystem.getId(), id, type, Integer.parseInt(resourceId), videoId); |
| | | PlayUrl pu = null; |
| | | try { |
| | | pu = videoDeailUtil.getPlayUrl(null, detailSystem.getId(), id, type, Integer.parseInt(resourceId), videoId); |
| | | } catch (VideoPlayException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | if (pu != null) { |
| | | if (!StringUtil.isNullOrEmpty(pu.getUrl())) |