|
@@ -56,8 +56,10 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
|
|
|
classStudentMapper.setStatus(ClassGroupStudentStatusEnum.QUIT);
|
|
|
update(classStudentMapper);
|
|
|
StudentRegistration student = studentRegistrationService.findStudentByClassGroupIdAndUserId(userId, classGroupId);
|
|
|
- student.setClassGroupId(null);
|
|
|
- studentRegistrationService.update(student);
|
|
|
+ if(student != null) {
|
|
|
+ student.setClassGroupId(0);
|
|
|
+ studentRegistrationService.update(student);
|
|
|
+ }
|
|
|
|
|
|
//2、班级人数调整
|
|
|
classGroupService.updateClassStudentNum(classGroupId.longValue(), -1);
|