| | |
| | | }else{ |
| | | clientCourseVO.setIsVip(0); |
| | | } |
| | | // 查询学习人数和头像列表 |
| | | if (data!=null){ |
| | | if(byId.getChargeType() != 1){ |
| | | List<CourseChapter> list = courseChapterService.lambdaQuery().eq(CourseChapter::getCourseId, byId.getId()) |
| | | .list(); |
| | | // 累加实际学习人数 |
| | | int a = 0; |
| | | int b = 0; |
| | | for (CourseChapter courseChapter : list) { |
| | | Long data2 = remoteAppUserService.getCourseChapterHistoryCount(courseChapter.getId()).getData(); |
| | | a+=data2; |
| | | b+=courseChapter.getVirtualLearnedNum(); |
| | | } |
| | | clientCourseVO.setCount(a+b); |
| | | clientCourseVO.setIsBuy(1); |
| | | }else if (data!=null){ |
| | | // 查询学习人数和头像列表 |
| | | clientCourseVO.setCount(data.size()); |
| | | if (data.size()>=5){ |
| | | clientCourseVO.setHeaders(data.stream().limit(5).map(AppUser::getAvatar).collect(Collectors.toList())); |