|
@@ -222,7 +222,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
if (dto.getWeek() == null) {
|
|
|
for (int i = 0; i < weeks; i++) {
|
|
|
LocalDateTime startDate = startDateTime.plusDays(i * 7).withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
|
- LocalDateTime endDate = startDateTime.plusDays((i + 1) * 6).withHour(23).withMinute(59).withSecond(59).withNano(9999);
|
|
|
+ LocalDateTime endDate = startDate.plusDays(6).withHour(23).withMinute(59).withSecond(59).withNano(9999);
|
|
|
if (now.isAfter(startDate) && now.isBefore(endDate)) {
|
|
|
tableVo.setWeek("第" + (i + 1) + "周");
|
|
|
}
|
|
@@ -231,7 +231,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
}
|
|
|
} else {
|
|
|
LocalDateTime startDate = startDateTime.plusDays((dto.getWeek() - 1) * 7).withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
|
- LocalDateTime endDate = startDateTime.plusDays(dto.getWeek() * 6).withHour(23).withMinute(59).withSecond(59).withNano(9999);
|
|
|
+ LocalDateTime endDate = startDate.plusDays(6).withHour(23).withMinute(59).withSecond(59).withNano(9999);
|
|
|
dto.setStartDate(startDate);
|
|
|
dto.setEndDate(endDate);
|
|
|
tableVo.setWeek("第" + dto.getWeek() + "周");
|