yonge 4 năm trước cách đây
mục cha
commit
4c1c042d9d

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -38,6 +38,7 @@ import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.entity.TeacherDefaultMusicGroupSalary;
 import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
+import com.ym.mec.biz.dal.enums.CourseStatusEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.service.ClassGroupRelationService;
@@ -142,6 +143,15 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
             	}
             }
             
+            //判断是否已结束
+            List<CourseSchedule> tempMergedCourseScheduleList = courseScheduleDao.findByCourseScheduleIds(tempMergedCourseIdList);
+            tempMergedCourseIdList.clear();
+            for(CourseSchedule courseSchedule : tempMergedCourseScheduleList){
+            	if(courseSchedule.getStatus() == CourseStatusEnum.NOT_START){
+            		tempMergedCourseIdList.add(courseSchedule.getId());
+            	}
+            }
+            
             tempMergedCourseIdList.addAll(courseScheduleList.stream().map(CourseSchedule :: getId).collect(Collectors.toList()));
             if(tempMergedCourseIdList.size() > 0){
             	courseScheduleStudentPaymentDao.deleteStudentCourseSchedule(userId, tempMergedCourseIdList);