瀏覽代碼

Merge remote-tracking branch 'origin/master'

Joburgess 4 年之前
父節點
當前提交
d79f573233

+ 13 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -842,12 +842,12 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
     List<CourseSchedule> findCourseScheduleWithDate(@Param("startDate") String startDate, @Param("endDate") String endDate);
 
     /**
-     * @describe 统计指定时间段内已结算的课程组类型数量
-     * @author Joburgess
-     * @date 2020/12/29 0029
      * @param startDate:
      * @param endDate:
      * @return int
+     * @describe 统计指定时间段内已结算的课程组类型数量
+     * @author Joburgess
+     * @date 2020/12/29 0029
      */
     int countIsSalaryGroupTypes(@Param("startDate") String startDate, @Param("endDate") String endDate);
 
@@ -1744,6 +1744,7 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
 
     /**
      * 根据班级编号和课程编号获取课程列表
+     *
      * @param classGroupId
      * @param allLockCourseIds
      * @return
@@ -1752,8 +1753,17 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
 
     /**
      * 获取班级总剩余时长
+     *
      * @param masterClassGroupId
      * @return
      */
     Integer queryTotalCourseTimes(Integer masterClassGroupId);
+
+
+    /**
+     * 获取进行中课程数量
+     *
+     * @return
+     */
+    Integer getUnderwayCourseNum(@Param("musicGroupId") String musicGroupId, @Param("groupType") GroupType groupType, @Param("status") CourseStatusEnum status);
 }

+ 4 - 9
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MusicGroupStatusEnum.java

@@ -3,23 +3,18 @@ package com.ym.mec.biz.dal.enums;
 import com.ym.mec.common.enums.BaseEnum;
 
 public enum MusicGroupStatusEnum implements BaseEnum<String, MusicGroupStatusEnum> {
-	DRAFT("DRAFT", "草稿"), FEE_AUDIT("FEE_AUDIT","费用审核中"), AUDIT("AUDIT", "审核中"),
-	AUDIT_FAILED("AUDIT_FAILED", "审核失败"), APPLY("APPLY", "报名中"),
-	PAY("PAY", "缴费中"), PREPARE("PREPARE", "筹备中"),
-	PROGRESS("PROGRESS", "进行中"), CANCELED("CANCELED", "取消"), PAUSE("PAUSE", "暂停"),
-	CLOSE("CLOSE", "关闭");
+	DRAFT("草稿"), AUDIT("审核中"), AUDIT_FAILED("审核失败"), PRE_APPLY("预报名"), FEE_AUDIT("费用审核中"), APPLY("报名中"), PAY("缴费中"), PREPARE("筹备中"), PROGRESS(
+			"进行中"), CANCELED("取消"), PAUSE("暂停"), CLOSE("关闭");
 
-	private String code;
 	private String msg;
 
-	MusicGroupStatusEnum(String code, String msg) {
-		this.code = code;
+	MusicGroupStatusEnum(String msg) {
 		this.msg = msg;
 	}
 
 	@Override
 	public String getCode() {
-		return this.code;
+		return this.name();
 	}
 
 	public String getMsg() {

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -512,7 +512,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param studentIds
      * @return
      */
-    List<MusicGroupPaymentCalenderStudentDetail> queryStudentPaymentCalenders(Integer masterClassGroupId,List<Map<Integer, String>> classGroupStudents,List<Integer> studentIds);
+    List<MusicGroupPaymentCalenderStudentDetail> queryStudentPaymentCalenders(Integer masterClassGroupId,String classGroupStudents,List<Integer> studentIds);
 
     /**
      * 获取主班课程类型剩余价值

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java

@@ -78,7 +78,7 @@ public interface TeacherService extends BaseService<Integer, Teacher> {
      * @param search
      * @return
      */
-    void queryGroupStudents1(Integer id, String search);
+    List<ImUserFriendDto> queryGroupStudents1(Integer id, String search);
 
     /**
      * 获取教师通讯录学员列表

+ 7 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -3583,7 +3583,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
-    public List<MusicGroupPaymentCalenderStudentDetail> queryStudentPaymentCalenders(Integer masterClassGroupId,List<Map<Integer, String>> classGroupStudents,List<Integer> studentIds) {
+    public List<MusicGroupPaymentCalenderStudentDetail> queryStudentPaymentCalenders(Integer masterClassGroupId,String classGroupStudentMap,List<Integer> studentIds) {
         //获取主班剩余课程时长
         Map<String, BigDecimal> masterMap = MapUtil.convertIntegerMap(courseScheduleDao.querySubCourseTimeMap(masterClassGroupId));
         if(masterMap.size() <= 0){
@@ -3595,13 +3595,14 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
         Map<Integer, Integer> studentCLassMap = new HashMap<>();
         List<Map<Integer, BigDecimal>> surplusCourseFeeMapList = new ArrayList<>();
-        for (Map<Integer, String> classGroupStudent : classGroupStudents) {
-            for (Integer integer : classGroupStudent.keySet()) {
+        List<Map<String,String>> classGroupStudents = (List<Map<String,String>>)JSON.parse(classGroupStudentMap);
+        for (Map<String, String> classGroupStudent : classGroupStudents) {
+            for (String integer : classGroupStudent.keySet()) {
                 //获取学员剩余课程费用
-                surplusCourseFeeMapList.addAll(studentRegistrationDao.querySurplusCourseFeeByClassGroupId(integer,classGroupStudent.get(integer)));
+                surplusCourseFeeMapList.addAll(studentRegistrationDao.querySurplusCourseFeeByClassGroupId(Integer.parseInt(integer),classGroupStudent.get(integer)));
                 String[] s = classGroupStudent.get(integer).split(",");
                 for (String s1 : s) {
-                    studentCLassMap.put(Integer.parseInt(s1),integer);
+                    studentCLassMap.put(Integer.parseInt(s1),Integer.parseInt(integer));
                 }
             }
         }
@@ -3717,7 +3718,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         List<Map<Integer, String>> classGroupStudents = mergeClassSplitClassAffirmDto.getClassGroupStudents();
         //获取默认的学员缴费详情
         List<MusicGroupPaymentCalenderStudentDetail> musicGroupPaymentCalenderStudentDetails = queryStudentPaymentCalenders(masterClassGroupId,
-                classGroupStudents,
+                JSON.toJSONString(mergeClassSplitClassAffirmDto.getClassGroupStudents()),
                 studentIds);
         //创建缴费项目
         MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);

+ 8 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImUserFriendServiceImpl.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service.impl;
 import java.util.Date;
 import java.util.List;
 
+import com.ym.mec.biz.service.TeacherService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -19,6 +20,8 @@ public class ImUserFriendServiceImpl extends BaseServiceImpl<Long, ImUserFriend>
 
 	@Autowired
 	private ImUserFriendDao imUserFriendDao;
+	@Autowired
+	private TeacherService teacherService;
 
 	@Override
 	public BaseDAO<Long, ImUserFriend> getDAO() {
@@ -73,7 +76,11 @@ public class ImUserFriendServiceImpl extends BaseServiceImpl<Long, ImUserFriend>
 
 	@Override
 	public List<ImUserFriendDto> queryFriendListByUserId(Integer userId, String search) {
-		return imUserFriendDao.queryFriendListByUserId(userId, search);
+		List<ImUserFriendDto> imUserFriendDtos = imUserFriendDao.queryFriendListByUserId(userId, search);
+		if(imUserFriendDtos.size() == 0){
+			return teacherService.queryGroupStudents1(userId,search);
+		}
+		return imUserFriendDtos;
 	}
 
 	@Override

+ 12 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -147,6 +147,11 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		if (musicGroup == null) {
 			throw new BizException("乐团查询失败,请检查参数");
 		}
+		
+		if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS && musicGroup.getStatus() != MusicGroupStatusEnum.PRE_APPLY) {
+			throw new BizException("创建失败:乐团当前状态不能创建缴费");
+		}
+		
 		SysUser sysUser = sysUserFeignService.queryUserInfo();
 		if (sysUser == null) {
 			throw new BizException("请登录");
@@ -397,17 +402,14 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 
 		// 如果是报名,需要修改乐团状态
 		if (paymentType == MUSIC_APPLY) {
-			if (musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT) {
-				throw new BizException("创建失败:缴费项目类型不匹配");
-			}
 			if (status != AUDITING) {
-				musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
+				musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
 				// 记录操作日志
-				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 基础信息审核中)", sysUser.getId(), ""));
+				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(预报名 -> 报名中)", sysUser.getId(), ""));
 			} else {
 				musicGroup.setStatus(MusicGroupStatusEnum.FEE_AUDIT);
 				// 记录操作日志
-				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 费用审核中)", sysUser.getId(), ""));
+				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(预报名 -> 费用审核中)", sysUser.getId(), ""));
 			}
 			musicGroup.setUpdateTime(date);
 			musicGroupDao.update(musicGroup);
@@ -554,10 +556,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			}else if(paymentType == SPAN_GROUP_CLASS_ADJUST){
 				MusicGroupStudentClassAdjust adjust = musicGroupStudentClassAdjustDao.findByBatchNo(batchNo);
 				//获取默认的学员缴费详情
-				List<Map<Integer,String>> classGroupStudents = (List<Map<Integer,String>>)JSON.parse(adjust.getClassGroupStudents());
 				List<Integer> studentIds = JSON.parseArray(adjust.getStudentIds(), Integer.class);
 				List<MusicGroupPaymentCalenderStudentDetail> musicGroupPaymentCalenderStudentDetails = classGroupService.queryStudentPaymentCalenders(adjust.getMasterClassGroupId(),
-						classGroupStudents,studentIds);
+						adjust.getClassGroupStudents(),studentIds);
 				List<MusicGroupPaymentCalenderStudentDetail> calenderStudentDetails = musicGroupPaymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
 				boolean containsAll = musicGroupPaymentCalenderStudentDetails.containsAll(calenderStudentDetails);
 				if(!containsAll){
@@ -717,17 +718,14 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 
 		// 如果是报名,需要修改乐团状态
 		if (paymentType == MUSIC_APPLY) {
-			if (musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT) {
-				throw new BizException("创建失败:缴费项目类型不匹配");
-			}
 			if (status != AUDITING) {
-				musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
+				musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
 				// 记录操作日志
-				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 基础信息审核中)", sysUser.getId(), ""));
+				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(预报名 -> 报名中)", sysUser.getId(), ""));
 			} else {
 				musicGroup.setStatus(MusicGroupStatusEnum.FEE_AUDIT);
 				// 记录操作日志
-				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 费用审核中)", sysUser.getId(), ""));
+				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(预报名 -> 费用审核中)", sysUser.getId(), ""));
 			}
 			musicGroup.setUpdateTime(date);
 			musicGroupDao.update(musicGroup);

+ 19 - 16
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -2,6 +2,7 @@ package com.ym.mec.biz.service.impl;
 
 import static com.ym.mec.biz.dal.enums.DealStatusEnum.CLOSE;
 import static com.ym.mec.biz.dal.enums.DealStatusEnum.SUCCESS;
+import static com.ym.mec.biz.dal.enums.PaymentStatusEnum.YES;
 
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -18,6 +19,7 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
+import com.ym.mec.biz.dal.enums.*;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -103,20 +105,6 @@ import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.entity.SubjectChange;
 import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.biz.dal.enums.DealStatusEnum;
-import com.ym.mec.biz.dal.enums.GoodsType;
-import com.ym.mec.biz.dal.enums.GroupType;
-import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
-import com.ym.mec.biz.dal.enums.MessageTypeEnum;
-import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
-import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
-import com.ym.mec.biz.dal.enums.OrderTypeEnum;
-import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
-import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
-import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
-import com.ym.mec.biz.dal.enums.StudentMusicGroupStatusEnum;
-import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.MusicGroupQueryInfo;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.ClassGroupStudentMapperService;
@@ -348,7 +336,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                         studentRegistration.setId(null);
                         if (musicGroupSubjectPlan.getFee().compareTo(BigDecimal.ZERO) == 0) {
                             studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
-                            studentRegistration.setPaymentStatus(PaymentStatusEnum.YES);
+                            studentRegistration.setPaymentStatus(YES);
                         } else {
                             studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.APPLY);
                             studentRegistration.setPaymentStatus(PaymentStatusEnum.OPEN);
@@ -1989,7 +1977,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             throw new BizException("缴费项目不存在");
         }
         StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, calender.getMusicGroupId());
-        if (studentRegistration == null || studentRegistration.getPaymentStatus() != PaymentStatusEnum.YES) {
+        if (studentRegistration == null || studentRegistration.getPaymentStatus() != YES) {
             throw new BizException("请走报名缴费流程");
         }
         Integer organId = studentRegistration.getOrganId();
@@ -2133,6 +2121,13 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 musicGroupStudentFee.setTemporaryCourseFee(new BigDecimal(0));
                 musicGroupStudentFeeDao.update(musicGroupStudentFee);
             }
+            //如果是进行中加学员
+            MusicGroupPaymentCalender paymentCalender = musicGroupPaymentCalenderDao.get(calenderDetail.getMusicGroupPaymentCalenderId());
+            if(paymentCalender.getPaymentType() == MusicGroupPaymentCalender.PaymentType.ADD_STUDENT){
+                studentRegistration.setPaymentStatus(YES);
+                studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
+                studentRegistrationDao.update(studentRegistration);
+            }
             /*if (musicGroupPaymentCalender.getType().equals(MusicGroupPaymentCalender.FeeType.ONLINE)) {
                 Integer getRemainNetworkClassTimes = musicGroupStudentFee.getRemainNetworkClassTimes() == null ? 0 : musicGroupStudentFee.getRemainNetworkClassTimes();
                 musicGroupStudentFee.setRemainNetworkClassTimes(getRemainNetworkClassTimes + 1);
@@ -2690,6 +2685,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             hasUsers.add(studentRegistration.getUserId());
             newRegs.add(studentRegistration);
         }
+        if(registerIds.size() >0 && newRegs.size()<=0){
+            throw new BizException("添加的学员,乐团已存在");
+        }
         studentRegistrations = newRegs;
 
         List<Integer> subjectIds = studentRegistrations.stream().map(StudentRegistration::getActualSubjectId).collect(Collectors.toList());
@@ -2758,6 +2756,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             throw new BizException("乐团当前状态是{},不能关闭", musicGroup.getStatus().getMsg());
         }
 
+        //有进行中的课不能关闭乐团
+        Integer underwayCourseNum = courseScheduleDao.getUnderwayCourseNum(musicGroup.getId(), GroupType.MUSIC, CourseStatusEnum.UNDERWAY);
+        if(underwayCourseNum >0){
+            throw new BizException("乐团有进行的课程,不能关闭");
+        }
         musicGroup.setStatus(MusicGroupStatusEnum.CLOSE);
         musicGroup.setUpdateTime(new Date());
         musicGroupDao.update(musicGroup);

+ 3 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -239,11 +239,7 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 	}
 
 	@Transactional(rollbackFor = Exception.class)
-	public void queryGroupStudents1(Integer teacherId, String search) {
-		List<ImUserFriendDto> imUserFriendDtos = imUserFriendDao.queryFriendListByUserId(teacherId, search);
-		if(imUserFriendDtos.size() > 0){
-			return;
-		}
+	public List<ImUserFriendDto> queryGroupStudents1(Integer teacherId, String search) {
 		Set<BasicUserDto> basicUserDtos = new HashSet<>();
 		//学员关联的通讯录
 		//获取相关课程,班级老师列表
@@ -335,7 +331,9 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 		if(basicUserDtos.size() > 0){
 			//批量新增
 			imUserFriendDao.batchInsert(basicUserDtos,teacherId);
+			return imUserFriendDao.queryFriendListByUserId(teacherId, search);
 		}
+		return new ArrayList<>();
 	}
 
     @Override

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -3508,4 +3508,7 @@
         FROM course_schedule cs
         WHERE cs.class_group_id_ = #{classGroupId} AND CONCAT(cs.class_date_,' ',cs.start_class_time_) > NOW()
     </select>
+    <select id="getUnderwayCourseNum" resultType="int">
+        SELECT * FROM course_schedule WHERE music_group_id_ = #{musicGroupId} AND group_type_ = #{groupType} AND status_=#{status}
+    </select>
 </mapper>

+ 0 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/ImGroupController.java

@@ -60,7 +60,6 @@ public class ImGroupController extends BaseController {
 	@ApiOperation("查询群成员列表")
 	@GetMapping(value = "/queryGroupMemberList")
 	public Object queryGroupMemberList(Long imGroupId) {
-
 		return succeed(imGroupService.queryMemberById(imGroupId));
 	}
 

+ 0 - 10
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java

@@ -129,16 +129,6 @@ public class TeacherController extends BaseController {
         return succeed(teacherService.queryGroupStudents(sysUser.getId(),search));
     }
 
-    @ApiOperation(value = "同步教师通讯录")
-    @GetMapping("/syncTeacherImFriend")
-    public Object syncTeacherImFriend(){
-        List<Integer> teacherIds = teacherService.queryAllIds();
-        for (Integer teacherId : teacherIds) {
-            teacherService.queryGroupStudents1(teacherId,null);
-        }
-        return succeed();
-    }
-
     @ApiOperation(value = "获取当前教师通讯录学员列表")
     @GetMapping("/queryGroupStudentList")
     public Object queryGroupStudentList(String search){

+ 2 - 1
mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java

@@ -1,5 +1,6 @@
 package com.ym.mec.web.controller;
 
+import com.alibaba.fastjson.JSON;
 import com.ym.mec.biz.dal.dao.EmployeeDao;
 import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.Employee;
@@ -383,7 +384,7 @@ public class ClassGroupController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('classGroup/queryStudentPaymentCalenders')")
     public HttpResponseResult queryStudentPaymentCalenders(@RequestBody MergeClassSplitClassAffirmDto mergeClassSplitClassAffirmDto) {
         Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = classGroupService.queryStudentPaymentCalenders(mergeClassSplitClassAffirmDto.getMasterClassGroupId(),
-                mergeClassSplitClassAffirmDto.getClassGroupStudents(),
+                JSON.toJSONString(mergeClassSplitClassAffirmDto.getClassGroupStudents()),
                 mergeClassSplitClassAffirmDto.getStudentIds())
                 .stream().collect(Collectors.groupingBy(e -> e.getClassGroupId()));
         return succeed(collect);