zouxuan 8 mēneši atpakaļ
vecāks
revīzija
0c57f9f8ec

+ 0 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/StudentCourseScheduleController.java

@@ -8,7 +8,6 @@ import com.yonge.cooleshow.biz.dal.dto.search.PracticeTeacherSearch;
 import com.yonge.cooleshow.biz.dal.entity.CourseCalendarEntity;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleReplied;
 import com.yonge.cooleshow.biz.dal.entity.TeacherSubjectPrice;
-import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
 import com.yonge.cooleshow.biz.dal.service.*;
 import com.yonge.cooleshow.biz.dal.vo.*;
 import com.yonge.cooleshow.biz.dal.wrapper.TeacherFreeTimeWrapper;

+ 7 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -2589,6 +2589,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         //获取所有课程列表
         List<CourseSchedule> courseSchedules = this.lambdaQuery().eq(CourseSchedule::getCourseGroupId, query.getCourseGroupId())
                 .eq(StringUtils.isNotEmpty(query.getStatus()), CourseSchedule::getStatus, query.getStatus())
+                .ne(query.getAttendanceStatus() != null,CourseSchedule::getStatus,"NOT_START")
                 .orderByDesc(CourseSchedule::getStartTime)
                 .list();
         if (CollectionUtils.isEmpty(courseSchedules)) {
@@ -2669,7 +2670,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
     @Override
     public List<CourseScheduleWrapper.StudentCourseList> queryListByStudent(CourseScheduleWrapper.CourseQuery query) {
         //获取所有课程列表
-        List<CourseScheduleStudentPayment> scheduleStudentPayments = courseScheduleStudentPaymentService.lambdaQuery().eq(CourseScheduleStudentPayment::getUserId, query.getStudentId())
+        List<CourseScheduleStudentPayment> scheduleStudentPayments = courseScheduleStudentPaymentService.lambdaQuery()
+                .eq(CourseScheduleStudentPayment::getUserId, query.getStudentId())
                 .eq(CourseScheduleStudentPayment::getCourseGroupId, query.getCourseGroupId())
                 .list();
         if (CollectionUtils.isEmpty(scheduleStudentPayments)) {
@@ -2698,7 +2700,10 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         if (CollectionUtils.isEmpty(courseIds)) {
             return Lists.newArrayList();
         }
-        List<CourseSchedule> courseSchedules = this.lambdaQuery().in(CourseSchedule::getId, courseIds).orderByDesc(CourseSchedule::getStartTime).list();
+        List<CourseSchedule> courseSchedules = this.lambdaQuery()
+                .in(CourseSchedule::getId, courseIds)
+                .ne(query.getAttendanceStatus() != null,CourseSchedule::getStatus,"NOT_START")
+                .orderByDesc(CourseSchedule::getStartTime).list();
         if(StringUtils.isNotEmpty(query.getClassMonth())){
             courseSchedules = courseSchedules.stream().
                     filter(courseSchedule -> query.getClassMonth().equals(DateUtil.dateToString(courseSchedule.getStartTime(),"yyyy-MM"))).collect(Collectors.toList());