|
@@ -205,6 +205,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void updateStudentTeacherAndSubject() {
|
|
|
List<Student> noTeacherOrNoSubjectStudent = studentDao.getNoTeacherOrNoSubjectStudent();
|
|
|
if (CollectionUtils.isEmpty(noTeacherOrNoSubjectStudent)) {
|
|
@@ -215,6 +216,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
if (CollectionUtils.isEmpty(studentClassInfo)) {
|
|
|
return;
|
|
|
}
|
|
|
+ //更新学员指导老师和声部信息
|
|
|
List<Student> needUpdateStudents = new ArrayList<>();
|
|
|
Map<Integer, List<StudentClassInfoDto>> scm = studentClassInfo.stream().collect(Collectors.groupingBy(StudentClassInfoDto::getStudentId));
|
|
|
for (Student student : noTeacherOrNoSubjectStudent) {
|
|
@@ -237,6 +239,12 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
|
|
|
if (!CollectionUtils.isEmpty(needUpdateStudents)) {
|
|
|
studentDao.batchUpdate(needUpdateStudents);
|
|
|
}
|
|
|
+
|
|
|
+ //更新新学员状态
|
|
|
+ List<Integer> newStudentIds = studentDao.getHasVipCourseStudentIdsFromNewStudents();
|
|
|
+ if(!CollectionUtils.isEmpty(newStudentIds)){
|
|
|
+ studentDao.updateNewStudentsToOld(newStudentIds);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|