|
@@ -3,6 +3,7 @@ package com.ym.mec.biz.service.impl;
|
|
|
import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
|
|
|
+import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.entity.ImGroupMember;
|
|
@@ -56,7 +57,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
|
|
|
classStudentMapper.setStatus(ClassGroupStudentStatusEnum.QUIT);
|
|
|
update(classStudentMapper);
|
|
|
StudentRegistration student = studentRegistrationService.findStudentByClassGroupIdAndUserId(userId, classGroupId);
|
|
|
- if(student != null) {
|
|
|
+ if (student != null) {
|
|
|
student.setClassGroupId(0);
|
|
|
studentRegistrationService.update(student);
|
|
|
}
|
|
@@ -141,6 +142,10 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
|
|
|
classGroupStudentMapper.setCreateTime(nowDate);
|
|
|
classGroupStudentMapper.setStatus(ClassGroupStudentStatusEnum.NORMAL);
|
|
|
classGroupStudentMappers.add(classGroupStudentMapper);
|
|
|
+ if (classGroup.getType().equals(ClassGroupTypeEnum.NORMAL)) {
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationService.get(Long.parseLong(userIdStr));
|
|
|
+ studentRegistrationService.update(studentRegistration);
|
|
|
+ }
|
|
|
}
|
|
|
classGroupStudentMapperDao.classGroupStudentsInsert(classGroupStudentMappers);
|
|
|
|
|
@@ -152,7 +157,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
|
|
|
|
|
|
//4、班级在合奏班、添加合奏课程
|
|
|
ClassGroupRelation classGroupRelation = classGroupRelationService.findClassGroupRelation(classGroupId);
|
|
|
- if(classGroupRelation != null){
|
|
|
+ if (classGroupRelation != null) {
|
|
|
//合奏班增加人数
|
|
|
classGroupService.updateClassStudentNum(classGroupRelation.getClassGroupId().longValue(), userIdStrSet.size());
|
|
|
List<CourseSchedule> mixCourseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupRelation.getClassGroupId());
|