| 
														
															@@ -2,6 +2,8 @@ package com.ym.mec.biz.service.impl; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.alibaba.fastjson.JSON; 
														 | 
														
														 | 
														
															 import com.alibaba.fastjson.JSON; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.alibaba.fastjson.JSONObject; 
														 | 
														
														 | 
														
															 import com.alibaba.fastjson.JSONObject; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.google.common.collect.Lists; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.google.common.collect.Maps; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.auth.api.client.SysUserFeignService; 
														 | 
														
														 | 
														
															 import com.ym.mec.auth.api.client.SysUserFeignService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.auth.api.entity.SysUser; 
														 | 
														
														 | 
														
															 import com.ym.mec.auth.api.entity.SysUser; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ym.mec.biz.dal.dao.*; 
														 | 
														
														 | 
														
															 import com.ym.mec.biz.dal.dao.*; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -789,7 +791,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<CourseListDto> courseListDtos = null; 
														 | 
														
														 | 
														
															         List<CourseListDto> courseListDtos = null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //获取分页前的所有的乐团编号和vip编号 
														 | 
														
														 | 
														
															         //获取分页前的所有的乐团编号和vip编号 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         params.put("offset", pageInfo.getOffset()); 
														 | 
														
														 | 
														
															         params.put("offset", pageInfo.getOffset()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        List<String> musicGroupIds = null; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<String> musicGroupIds = Lists.newArrayList(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<Group> groups; 
														 | 
														
														 | 
														
															         List<Group> groups; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (queryInfo.isHideOverGroup()) { 
														 | 
														
														 | 
														
															         if (queryInfo.isHideOverGroup()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             groups = courseScheduleDao.queryMusicGroupIdsWithoutOverGroup(params); 
														 | 
														
														 | 
														
															             groups = courseScheduleDao.queryMusicGroupIdsWithoutOverGroup(params); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -803,14 +805,32 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             typeGroupMap = groups.stream().collect(Collectors.groupingBy(Group::getGroupType)); 
														 | 
														
														 | 
														
															             typeGroupMap = groups.stream().collect(Collectors.groupingBy(Group::getGroupType)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         courseListDtos = new ArrayList<>(); 
														 | 
														
														 | 
														
															         courseListDtos = new ArrayList<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        // VIP课 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (!CollectionUtils.isEmpty(typeGroupMap.get(GroupType.VIP))) { 
														 | 
														
														 | 
														
															         if (!CollectionUtils.isEmpty(typeGroupMap.get(GroupType.VIP))) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            musicGroupIds = typeGroupMap.get(GroupType.VIP).stream().map(Group::getId).collect(Collectors.toList()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            musicGroupIds.addAll(typeGroupMap.get(GroupType.VIP).stream().map(Group::getId).collect(Collectors.toList())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        // 直播课 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (org.apache.commons.collections.CollectionUtils.isNotEmpty(typeGroupMap.get(GroupType.LIVE))) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            musicGroupIds.addAll(typeGroupMap.get(GroupType.LIVE).stream().map(Group::getId).collect(Collectors.toList())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //获取学员所购买的vip课列表详情 
														 | 
														
														 | 
														
															         //获取学员所购买的vip课列表详情 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<CourseListDto> vipCourses = classGroupDao.queryStudentVipCourses(StringUtils.join(musicGroupIds, ","), userId); 
														 | 
														
														 | 
														
															         List<CourseListDto> vipCourses = classGroupDao.queryStudentVipCourses(StringUtils.join(musicGroupIds, ","), userId); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //获取vip课的学生列表 
														 | 
														
														 | 
														
															         //获取vip课的学生列表 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Set<String> vipIds = vipCourses.stream().map(CourseListDto::getVipId).collect(Collectors.toSet()); 
														 | 
														
														 | 
														
															         Set<String> vipIds = vipCourses.stream().map(CourseListDto::getVipId).collect(Collectors.toSet()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        Map<String, String> vipStuNames = MapUtil.convertIntegerMap(classGroupDao.findVipStuNames(StringUtils.join(vipIds, ","), "VIP")); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Map<String, String> vipStuNamesMap = Maps.newHashMap(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        // VIP课 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<Map<String, String>> vipStuNames = classGroupDao.findVipStuNames(StringUtils.join(vipIds, ","), "VIP"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (org.apache.commons.collections.CollectionUtils.isNotEmpty(vipStuNames)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            vipStuNamesMap.putAll(MapUtil.convertIntegerMap(vipStuNames)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        // 直播课 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<Map<String, String>> liveStuNames = classGroupDao.findVipStuNames(StringUtils.join(vipIds, ","), "LIVE"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (org.apache.commons.collections.CollectionUtils.isNotEmpty(liveStuNames)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            vipStuNamesMap.putAll(MapUtil.convertIntegerMap(liveStuNames)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        //Map<String, String> vipStuNamesMap = MapUtil.convertIntegerMap(classGroupDao.findVipStuNames(StringUtils.join(vipIds, ","), "VIP")); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (!CollectionUtils.isEmpty(typeGroupMap.get(MUSIC))) { 
														 | 
														
														 | 
														
															         if (!CollectionUtils.isEmpty(typeGroupMap.get(MUSIC))) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             musicGroupIds = typeGroupMap.get(MUSIC).stream().map(Group::getId).collect(Collectors.toList()); 
														 | 
														
														 | 
														
															             musicGroupIds = typeGroupMap.get(MUSIC).stream().map(Group::getId).collect(Collectors.toList()); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -867,6 +887,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, Long> vipCourseNumMap = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<String, Long> vipCourseNumMap = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (vipIds != null && vipIds.size() > 0) { 
														 | 
														
														 | 
														
															         if (vipIds != null && vipIds.size() > 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             vipCourseNumMap = MapUtil.convertIntegerMap(courseScheduleStudentPaymentDao.findStudentCourseNum(vipIds, userId, "VIP")); 
														 | 
														
														 | 
														
															             vipCourseNumMap = MapUtil.convertIntegerMap(courseScheduleStudentPaymentDao.findStudentCourseNum(vipIds, userId, "VIP")); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            // 直播课 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            List<Map<String, Integer>> studentCourseNum = courseScheduleStudentPaymentDao.findStudentCourseNum(vipIds, userId, "LIVE"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (org.apache.commons.collections.CollectionUtils.isNotEmpty(studentCourseNum)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                vipCourseNumMap.putAll(MapUtil.convertIntegerMap(studentCourseNum)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, Long> practiceCourseNumMap = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<String, Long> practiceCourseNumMap = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (practiceGroupId != null && practiceGroupId.size() > 0) { 
														 | 
														
														 | 
														
															         if (practiceGroupId != null && practiceGroupId.size() > 0) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -890,7 +916,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, Integer> isApplyMap = MapUtil.convertIntegerMap(isApplyMaps); 
														 | 
														
														 | 
														
															         Map<String, Integer> isApplyMap = MapUtil.convertIntegerMap(isApplyMaps); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //获取所有教学点名称列表 
														 | 
														
														 | 
														
															         //获取所有教学点名称列表 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Set<Integer> schoolIds = courseListDtos.stream().map(CourseListDto::getTeacherSchoolId).collect(Collectors.toSet()); 
														 | 
														
														 | 
														
															         Set<Integer> schoolIds = courseListDtos.stream().map(CourseListDto::getTeacherSchoolId).collect(Collectors.toSet()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        Map<Integer, String> schoolNames = MapUtil.convertMybatisMap(schoolDao.queryNameByIds(StringUtils.join(schoolIds, ","))); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Map<Integer, String> schoolNames = Maps.newHashMap(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (org.apache.commons.collections.CollectionUtils.isNotEmpty(schoolIds)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            schoolNames.putAll(MapUtil.convertMybatisMap(schoolDao.queryNameByIds(StringUtils.join(schoolIds, ",")))); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         SysConfig practiceRenewUrlConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_RENEW_URL); 
														 | 
														
														 | 
														
															         SysConfig practiceRenewUrlConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_RENEW_URL); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -927,8 +957,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     else if (PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroupTypeMap.get(Long.valueOf(e.getPracticeId())))) 
														 | 
														
														 | 
														
															                     else if (PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroupTypeMap.get(Long.valueOf(e.getPracticeId())))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         e.setPracticeType(3); 
														 | 
														
														 | 
														
															                         e.setPracticeType(3); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            } else if (ClassGroupTypeEnum.VIP == e.getType()) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                e.setStudentNames(vipStuNames.get(e.getVipId())); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } else if (ClassGroupTypeEnum.VIP == e.getType() || ClassGroupTypeEnum.LIVE == e.getType()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                e.setStudentNames(vipStuNamesMap.get(e.getVipId())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 //1:线上;2:线下;3:线上+线下 
														 | 
														
														 | 
														
															                 //1:线上;2:线下;3:线上+线下 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if (e.getOnlineClassesNum() > 0 && e.getOffLineClassesNum() <= 0) { 
														 | 
														
														 | 
														
															                 if (e.getOnlineClassesNum() > 0 && e.getOffLineClassesNum() <= 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     e.setClassMode(1); 
														 | 
														
														 | 
														
															                     e.setClassMode(1); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1522,8 +1552,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<TeacherClassGroupDto> teacherMusicClassGroup; 
														 | 
														
														 | 
														
															         List<TeacherClassGroupDto> teacherMusicClassGroup; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         switch (type) { 
														 | 
														
														 | 
														
															         switch (type) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            case "VIP": 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                teacherMusicClassGroup = classGroupDao.findTeacherVipClassGroup(user.getId().longValue(), status, groupName); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            case "VIP": // VIP课 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            case "LIVE": // 直播课 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                teacherMusicClassGroup = classGroupDao.findTeacherVipClassGroup(user.getId().longValue(), status, groupName, type); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 break; 
														 | 
														
														 | 
														
															                 break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             case "MUSIC_GROUP": 
														 | 
														
														 | 
														
															             case "MUSIC_GROUP": 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 teacherMusicClassGroup = classGroupDao.findTeacherMusicClassGroup(user.getId().longValue(), groupName); 
														 | 
														
														 | 
														
															                 teacherMusicClassGroup = classGroupDao.findTeacherMusicClassGroup(user.getId().longValue(), groupName); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1731,10 +1762,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //            teacherClassHeadInfo.setTeachingTeacher(teachingTeacher.getUserName()); 
														 | 
														
														 | 
														
															 //            teacherClassHeadInfo.setTeachingTeacher(teachingTeacher.getUserName()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //        } 
														 | 
														
														 | 
														
															 //        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if (classGroup.getType() == ClassGroupTypeEnum.VIP) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (classGroup.getType() == ClassGroupTypeEnum.VIP || classGroup.getType() == ClassGroupTypeEnum.LIVE) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             String[] studentNums = classGroupStudentMapperDao.findStudentNumByClassGroupId(classGroupId); 
														 | 
														
														 | 
														
															             String[] studentNums = classGroupStudentMapperDao.findStudentNumByClassGroupId(classGroupId); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             teacherClassHeadInfo.setStudentNames(StringUtils.join(studentNums, ",")); 
														 | 
														
														 | 
														
															             teacherClassHeadInfo.setStudentNames(StringUtils.join(studentNums, ",")); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (classGroup.getType() == ClassGroupTypeEnum.PRACTICE) { 
														 | 
														
														 | 
														
															         if (classGroup.getType() == ClassGroupTypeEnum.PRACTICE) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             String[] studentNums = classGroupStudentMapperDao.findStudentNumByClassGroupId(classGroupId); 
														 | 
														
														 | 
														
															             String[] studentNums = classGroupStudentMapperDao.findStudentNumByClassGroupId(classGroupId); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             teacherClassHeadInfo.setStudentNames(StringUtils.join(studentNums, ",")); 
														 | 
														
														 | 
														
															             teacherClassHeadInfo.setStudentNames(StringUtils.join(studentNums, ",")); 
														 |