Skip to content

Commit

Permalink
135 bug episode order (#149), close issue #135
Browse files Browse the repository at this point in the history
* add sort by seq in EpisodeService#findBySeasonId

* update admin page

* update changelog for bug pr #149
  • Loading branch information
chivehao authored Dec 7, 2022
1 parent afa0108 commit 9896714
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

## Bugfix
- 添加根据关键词查询动漫花园资源接口,修复问题:如果通过番组计划的中文查不到资源,则无法正常订阅 #147
- 给剧集服务根据季度ID的查询结果添加了按照序号进行排序的逻辑,修复问题:动漫详情页根据剧集序号的表格需要进行排序 #135

## Pages
- 完善动漫详情页,并对接服务端
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package run.ikaros.server.service;

import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
Expand Down Expand Up @@ -43,7 +44,10 @@ public EpisodeServiceImpl(
@Override
public List<EpisodeEntity> findBySeasonId(@Nonnull Long seasonId) {
AssertUtils.notNull(seasonId, "seasonId");
return episodeRepository.findBySeasonIdAndStatus(seasonId, true);
return episodeRepository.findBySeasonIdAndStatus(seasonId, true)
.stream()
.sorted((o1, o2) -> Integer.parseInt(String.valueOf(o1.getSeq() - o2.getSeq())))
.collect(Collectors.toList());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/admin/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/admin/logo.png"><title>Ikaros Admin</title><style>.first-loading-wrp{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:420px;height:100%}.first-loading-wrp>h1{font-size:128px}.first-loading-wrp .loading-wrp{padding:98px;display:flex;justify-content:center;align-items:center}.dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:32px;width:32px;height:32px;box-sizing:border-box}.dot i{width:14px;height:14px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.dot i:nth-child(1){top:0;left:0}.dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><script defer="defer" src="/admin/js/chunk-vendors.5d7eb9b9.js"></script><script defer="defer" src="/admin/js/app.c0b37552.js"></script><link href="/admin/css/chunk-vendors.c41eca44.css" rel="stylesheet"><link href="/admin/css/app.e49b7a10.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div class="first-loading-wrp"><h1>Ikaros</h1><div class="loading-wrp"><span class="dot dot-spin"><i></i><i></i><i></i><i></i></span></div><div style="display: flex; justify-content: center; align-items: center;">Ikaros Admin</div></div></div></body></html>
<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/admin/logo.png"><title>Ikaros Admin</title><style>.first-loading-wrp{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:420px;height:100%}.first-loading-wrp>h1{font-size:128px}.first-loading-wrp .loading-wrp{padding:98px;display:flex;justify-content:center;align-items:center}.dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:32px;width:32px;height:32px;box-sizing:border-box}.dot i{width:14px;height:14px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.dot i:nth-child(1){top:0;left:0}.dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><script defer="defer" src="/admin/js/chunk-vendors.5d7eb9b9.js"></script><script defer="defer" src="/admin/js/app.12b068ff.js"></script><link href="/admin/css/chunk-vendors.c41eca44.css" rel="stylesheet"><link href="/admin/css/app.e49b7a10.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div class="first-loading-wrp"><h1>Ikaros</h1><div class="loading-wrp"><span class="dot dot-spin"><i></i><i></i><i></i><i></i></span></div><div style="display: flex; justify-content: center; align-items: center;">Ikaros Admin</div></div></div></body></html>

Large diffs are not rendered by default.

Loading

0 comments on commit 9896714

Please sign in to comment.