|
@@ -357,11 +357,18 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
if(CollectionUtils.isEmpty(userMusicGroups)){
|
|
|
return null;
|
|
|
}
|
|
|
- Collections.shuffle(userMusicGroups);
|
|
|
- Integer schoolId = userMusicGroups.get(0).getSchoolId();
|
|
|
- if(!schoolSubjectTeachersMap.containsKey(schoolId)){
|
|
|
+
|
|
|
+ List<Integer> userSchoolIds = userMusicGroups.stream()
|
|
|
+ .filter(musicGroup -> Objects.nonNull(musicGroup.getSchoolId()) && schoolSubjectTeachersMap.containsKey(musicGroup.getSchoolId()))
|
|
|
+ .map(MusicGroup::getSchoolId).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if(CollectionUtils.isEmpty(userSchoolIds)){
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ Collections.shuffle(userSchoolIds);
|
|
|
+ Integer schoolId = userMusicGroups.get(0).getSchoolId();
|
|
|
+
|
|
|
List<Integer> teacherIds = schoolSubjectTeachersMap.get(schoolId).get(practiceGroup.getSubjectId());
|
|
|
SysConfig practiceCourseMinutesConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_MINUTES);
|
|
|
Integer practiceCourseMinutes=practiceCourseMinutesConfig.getParanValue(Integer.class);
|
|
@@ -828,10 +835,10 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
|
|
|
Integer applyTimes = practiceGroupDao.countUserPracticeApplyRecord(practiceGroup.getStudentId());
|
|
|
|
|
|
- if (applyTimes >= 1) {
|
|
|
- result.put("status","IS_APPLIED");
|
|
|
- return result;
|
|
|
- }
|
|
|
+// if (applyTimes >= 1) {
|
|
|
+// result.put("status","IS_APPLIED");
|
|
|
+// return result;
|
|
|
+// }
|
|
|
applyTimes += 1;
|
|
|
|
|
|
practiceGroup.setCoursesStartDate(allCourseDates.get(0));
|