From cba071db4529097598095e2971949dfd109f12b9 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 22 十月 2020 16:49:25 +0800 Subject: [PATCH] 图片显示403问题解决 --- src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java | 40 +++++++++++++++++----------------------- 1 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java b/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java index 6c4217f..0130e55 100644 --- a/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java +++ b/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java @@ -465,7 +465,7 @@ return playUrl; } - public List<VideoDetailInfo> getVideoDetailList(String videoid) { + public List<VideoDetailInfo> getVideoDetailList(String videoid, int page, int pageSize) { List<VideoFunTV> list = videoFunTVNewDao.listByVideoId(Long.parseLong(videoid)); if (list != null && list.size() > 0) { final VideoFunTV vft = list.get(0); @@ -473,33 +473,27 @@ String aid = vft.getAid(); FunTVAlbum album = funTVAlbumDao.get(aid); - List<FunTVVideo> videoList = funTVVideoDao.listByAid(aid, "num", Sort.Direction.ASC, 0, 1000); + final String type = album.getVideoType(); + Sort.Direction sort = Sort.Direction.ASC; + if (type != null) + if (type.contains("鐢靛奖")) { + sort = Sort.Direction.DESC; + } else if (type.contains("鐢佃鍓�")) { + sort = Sort.Direction.ASC; + } else if (type.contains("缁艰壓")) { + sort = Sort.Direction.DESC; + } else if (type.contains("鍔ㄦ极")) { + sort = Sort.Direction.ASC; + } else + sort = Sort.Direction.DESC; + + + List<FunTVVideo> videoList = funTVVideoDao.listByAid(aid, "num", sort, (page - 1) * pageSize, pageSize); if (album == null && videoList.size() > 0) {//澶勭悊鐢靛奖 album = new FunTVAlbum(); album.setTitle(videoList.get(0).getTitle()); album.setVideoType(videoList.get(0).getCate()); } - - final String type=album.getVideoType(); - Comparator<FunTVVideo> cp = new Comparator<FunTVVideo>() { - public int compare(FunTVVideo o1, FunTVVideo o2) { - - long t1 = o1.getNum(); - long t2 = o2.getNum(); - if (type.contains("鐢靛奖")) { - return (int) (t2 - t1); - } else if (type.contains("鐢佃鍓�")) { - return (int) (t1 - t2); - } else if (type.contains("缁艰壓")) { - return (int) (t2 - t1); - } else if (type.contains("鍔ㄦ极")) { - return (int) (t1 - t2); - } else - return (int) (t2 - t1); - } - }; - if (videoList.size() > 0) - Collections.sort(videoList, cp); List<VideoDetailInfo> detailList = new ArrayList<>(); for (FunTVVideo pv : videoList) -- Gitblit v1.8.0