|
@@ -1,5 +1,6 @@
|
|
|
package com.xjrsoft.module.courseTable.service.impl;
|
|
package com.xjrsoft.module.courseTable.service.impl;
|
|
|
|
|
|
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.date.DateField;
|
|
import cn.hutool.core.date.DateField;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
import cn.hutool.core.date.DateTime;
|
|
@@ -217,7 +218,6 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
long days = between.toDays();
|
|
long days = between.toDays();
|
|
|
int weeks = (int) Math.ceil((double) days / 7);
|
|
int weeks = (int) Math.ceil((double) days / 7);
|
|
|
if (dto.getWeek() == null) {
|
|
if (dto.getWeek() == null) {
|
|
|
-
|
|
|
|
|
for (int i = 0; i < weeks; i++) {
|
|
for (int i = 0; i < weeks; i++) {
|
|
|
LocalDateTime startDate = startDateTime.plusDays(i * 6).withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
LocalDateTime startDate = startDateTime.plusDays(i * 6).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 = startDateTime.plusDays((i + 1) * 6).withHour(23).withMinute(59).withSecond(59).withNano(9999);
|
|
@@ -250,6 +250,9 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
tableVo.setTeacherName(xjrUser.getName());
|
|
tableVo.setTeacherName(xjrUser.getName());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if(dto.getStartDate() != null && dto.getEndDate() != null){
|
|
|
|
|
+ dto.setTeacherId(StpUtil.getLoginIdAsLong());
|
|
|
|
|
+ }
|
|
|
List<CourseDetailVo> list = courseTableMapper.getList(dto);
|
|
List<CourseDetailVo> list = courseTableMapper.getList(dto);
|
|
|
tableVo.setCourseList(list);
|
|
tableVo.setCourseList(list);
|
|
|
tableVo.setClassHour(list.size());
|
|
tableVo.setClassHour(list.size());
|