Browse Source

Merge branch 'zx_online_update_1218' of http://git.dayaedu.com/yonge/cooleshow into zx_online_update_1218

刘俊驰 6 tháng trước cách đây
mục cha
commit
b622289c71

+ 5 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java

@@ -566,6 +566,7 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
         List<CourseScheduleStudentPayment> studentPayments = courseScheduleStudentPaymentService.lambdaQuery()
         List<CourseScheduleStudentPayment> studentPayments = courseScheduleStudentPaymentService.lambdaQuery()
                 .eq(CourseScheduleStudentPayment::getCourseGroupId, groupId)
                 .eq(CourseScheduleStudentPayment::getCourseGroupId, groupId)
                 .isNotNull(CourseScheduleStudentPayment::getUserId)
                 .isNotNull(CourseScheduleStudentPayment::getUserId)
+                .orderByDesc(CourseScheduleStudentPayment::getId)
                 .list();
                 .list();
         if (CollectionUtils.isNotEmpty(studentPayments)) {
         if (CollectionUtils.isNotEmpty(studentPayments)) {
             List<Long> userIds = studentPayments.stream().map(CourseScheduleStudentPayment::getUserId).distinct().collect(Collectors.toList());
             List<Long> userIds = studentPayments.stream().map(CourseScheduleStudentPayment::getUserId).distinct().collect(Collectors.toList());
@@ -573,14 +574,14 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
             //获取用户声部列表
             //获取用户声部列表
             Map<Long, com.yonge.cooleshow.biz.dal.entity.SysUser> mapByIds = sysUserService.getMapByIds(userIds);
             Map<Long, com.yonge.cooleshow.biz.dal.entity.SysUser> mapByIds = sysUserService.getMapByIds(userIds);
             List<CourseGroupWrapper.CourseStudentVo> result = new ArrayList<>();
             List<CourseGroupWrapper.CourseStudentVo> result = new ArrayList<>();
-            userIds.forEach(e -> {
+            studentPayments.forEach(e -> {
                 CourseGroupWrapper.CourseStudentVo vo = new CourseGroupWrapper.CourseStudentVo();
                 CourseGroupWrapper.CourseStudentVo vo = new CourseGroupWrapper.CourseStudentVo();
-                vo.setStudentId(e);
-                com.yonge.cooleshow.biz.dal.entity.SysUser sysUser = mapByIds.get(e);
+                vo.setStudentId(e.getUserId());
+                com.yonge.cooleshow.biz.dal.entity.SysUser sysUser = mapByIds.get(e.getUserId());
                 vo.setStudentName(sysUser.getRealName());
                 vo.setStudentName(sysUser.getRealName());
                 vo.setUserName(sysUser.getUsername());
                 vo.setUserName(sysUser.getUsername());
                 vo.setAvatar(sysUser.getAvatar());
                 vo.setAvatar(sysUser.getAvatar());
-                vo.setSubjectId(studentMap.get(e).getSubjectId());
+                vo.setSubjectId(studentMap.get(e.getUserId()).getSubjectId());
                 if(StringUtils.isNotEmpty(vo.getSubjectId())){
                 if(StringUtils.isNotEmpty(vo.getSubjectId())){
                     List<Subject> subjectList = subjectService.findBySubjectByIdList(vo.getSubjectId());
                     List<Subject> subjectList = subjectService.findBySubjectByIdList(vo.getSubjectId());
                     if(CollectionUtils.isNotEmpty(subjectList)){
                     if(CollectionUtils.isNotEmpty(subjectList)){