mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 22:48:03 +08:00
优化计划的排序
This commit is contained in:
parent
0408cb0834
commit
1e1aea8323
@ -64,6 +64,7 @@ public class PlanUtil {
|
|||||||
plans.forEach(p -> p.setSort(-1));
|
plans.forEach(p -> p.setSort(-1));
|
||||||
|
|
||||||
byDay.forEach((date, list) -> {
|
byDay.forEach((date, list) -> {
|
||||||
|
list.sort((p1, p2) -> SortUtil.strSort.compare(p1.getPlanStartTime(), p2.getPlanStartTime()));
|
||||||
for (PlanDayRes plan : list) {
|
for (PlanDayRes plan : list) {
|
||||||
if (plan.getSort() == null) {
|
if (plan.getSort() == null) {
|
||||||
plan.setSort(-1);
|
plan.setSort(-1);
|
||||||
@ -84,6 +85,7 @@ public class PlanUtil {
|
|||||||
for (PlanDayRes groupPlan : byGroupId.get(plan.getGroupId())) {
|
for (PlanDayRes groupPlan : byGroupId.get(plan.getGroupId())) {
|
||||||
groupPlan.setSort(targetSort);
|
groupPlan.setSort(targetSort);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user