-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
支持设置指定时间点挂号 #74
支持设置指定时间点挂号 #74
Conversation
@pengpan 已增加重试机制 |
看下那个排序问题,我试了下是有问题的 |
确实,之前的是基于一个时间段的数据排序,改为基于全部数据排序了 |
if (CollUtil.isNotEmpty(config.getHours())) { | ||
appointmentList = appointmentList.stream() | ||
.filter(x -> config.getHours().contains(x.getName())) | ||
.sorted(Comparator.comparingInt(x -> config.getHours().indexOf(x.getName()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
排序有问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果是正序,直接.sorted(Comparator.comparing(Appointment::getName))
即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多谢指导,再搞个indexOf有点多此一举了
后续优化下
…------------------ 原始邮件 ------------------
发件人: weimo123 ***@***.***>
发送时间: 2024年8月5日 09:31
收件人: pengpan/91160-cli ***@***.***>
抄送: pengpan ***@***.***>, State change ***@***.***>
主题: Re: [pengpan/91160-cli] 支持设置指定时间点挂号 (PR #74)
@weimo123 commented on this pull request.
In src/main/java/com/github/pengpan/service/impl/CoreServiceImpl.java:
> @@ -306,6 +315,16 @@ private List<Register> buildForm(ScheduleInfo schInfo, Config config) { return CollUtil.newArrayList(); } + if (CollUtil.isNotEmpty(config.getHours())) { + appointmentList = appointmentList.stream() + .filter(x -> config.getHours().contains(x.getName())) + .sorted(Comparator.comparingInt(x -> config.getHours().indexOf(x.getName())))
多谢指导,再搞个indexOf有点多此一举了
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
No description provided.