|
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.CourseScheduleDao;
|
|
@@ -43,8 +44,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
-import java.text.DateFormat;
|
|
|
-import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.temporal.TemporalAdjusters;
|
|
@@ -534,9 +533,12 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
* @param studentId 学员id
|
|
|
*/
|
|
|
private Map<String, List<CourseTimeEntity>> getAllPracticeCourseTime(Long teacherId, Long studentId, String startDate, String endDate) {
|
|
|
+ //未开始、进行中的课程
|
|
|
+ List<String> statusList = Lists.newArrayList(CourseScheduleEnum.NOT_START.getCode(), CourseScheduleEnum.ING.getCode());
|
|
|
//查询该老师指定时间段的课程
|
|
|
List<CourseSchedule> courseList = this.list(Wrappers.<CourseSchedule>lambdaQuery()
|
|
|
.eq(CourseSchedule::getTeacherId, teacherId)
|
|
|
+ .in(CourseSchedule::getStatus, statusList)
|
|
|
.ge(CourseSchedule::getClassDate, startDate)
|
|
|
.le(CourseSchedule::getClassDate, endDate)
|
|
|
);
|
|
@@ -548,6 +550,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
param.put("studentId", studentId);
|
|
|
param.put("startClassDate", startDate);
|
|
|
param.put("endClassDate", endDate);
|
|
|
+ param.put("statusList", statusList);
|
|
|
List<CourseSchedule> studentCourse = baseMapper.queryStudentCourse(param);
|
|
|
//将数据合并
|
|
|
if (CollectionUtils.isNotEmpty(studentCourse)) {
|