|
@@ -18,10 +18,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.temporal.TemporalAdjusters;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -135,7 +132,7 @@ public class HomeServiceImpl implements HomeService {
|
|
|
String[] split = dateTimeStr.split("-");
|
|
|
int year = Integer.parseInt(split[0]);
|
|
|
//获取月
|
|
|
- int month = isYear ? 1 : Integer.parseInt(split[1]);;
|
|
|
+ int month = isYear ? 1 : Integer.parseInt(split[1]);
|
|
|
LocalDate firstDate;
|
|
|
LocalDate endDate;
|
|
|
CourseHomeVo result = new CourseHomeVo();
|
|
@@ -196,6 +193,7 @@ public class HomeServiceImpl implements HomeService {
|
|
|
result.setTotalDoneCount(reduceFunc.apply(CourseHomeVo.CourseHomeInfoVo::getDoneCount));
|
|
|
result.setTotalUndoneCount(reduceFunc.apply(CourseHomeVo.CourseHomeInfoVo::getUndoneCount));
|
|
|
result.setTotalCount(result.getTotalDoneCount() + result.getTotalUndoneCount());
|
|
|
+ result.getCourseHomeInfoList().sort(Comparator.comparing(CourseHomeVo.CourseHomeInfoVo::getDate));
|
|
|
return result;
|
|
|
}
|
|
|
|