|
@@ -4737,7 +4737,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(), classGroup.getGroupType());
|
|
|
}
|
|
|
imGroupService.create(classGroup.getId().toString(), null, classGroup.getName(), classGroup.getName(),
|
|
|
- vipGroup.getName(), null, "https://gyt.ks3-cn-beijing.ksyuncs.com/icon_live_class_group_avatar.png",
|
|
|
+ vipGroup.getName(), null, "",
|
|
|
vipGroup.getGroupType(), ImGroup.GroupTypeEnum.valueOf(vipGroup.getGroupType()));
|
|
|
classGroup.setTotalClassTimes(courseSchedules.size());
|
|
|
classGroupDao.update(classGroup);
|
|
@@ -5041,33 +5041,32 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if (CollectionUtils.isEmpty(studentMapperList)) {
|
|
|
return livedStudentList;
|
|
|
}
|
|
|
- Map<Integer, ClassGroupStudentMapper> studentMapperMap = studentMapperList.stream().collect(Collectors.toMap(ClassGroupStudentMapper::getUserId, o->o ,(k1,k2)->k2));
|
|
|
-
|
|
|
-// List<StudentApplyRefunds> applyRefunds = studentApplyRefundsDao.findByGroupAndType(query.getLiveGroupId().toString(), GroupType.LIVE.getCode());
|
|
|
-// Map<Integer, List<StudentApplyRefunds>> studentApplyRefundsMap = applyRefunds.stream()
|
|
|
-// .collect(Collectors.groupingBy(StudentApplyRefunds::getUserId));
|
|
|
+ List<StudentApplyRefunds> applyRefunds = studentApplyRefundsDao.findByGroupAndType(query.getLiveGroupId().toString(), GroupType.LIVE.getCode());
|
|
|
+ Map<Integer, List<StudentApplyRefunds>> studentApplyRefundsMap = applyRefunds.stream()
|
|
|
+ .collect(Collectors.groupingBy(StudentApplyRefunds::getUserId));
|
|
|
records.forEach(data -> {
|
|
|
- ClassGroupStudentMapper classGroupStudentMapper = studentMapperMap.get(data.getStudentId());
|
|
|
- if (Objects.isNull(classGroupStudentMapper)) {
|
|
|
+ if (StringUtils.isEmpty(data.getClassStatus())) {
|
|
|
data.setStudentStatus(0);
|
|
|
return;
|
|
|
}
|
|
|
- if (classGroupStudentMapper.getStatus().equals(ClassGroupStudentStatusEnum.QUIT)) {
|
|
|
+ if (StringUtils.equals(data.getClassStatus(),ClassGroupStudentStatusEnum.QUIT.getCode())) {
|
|
|
data.setStudentStatus(1);
|
|
|
return;
|
|
|
- } else if (classGroupStudentMapper.getStatus().equals(ClassGroupStudentStatusEnum.QUIT_SCHOOL)) {
|
|
|
+ } else if (StringUtils.equals(data.getClassStatus(),ClassGroupStudentStatusEnum.QUIT_SCHOOL.getCode())) {
|
|
|
data.setStudentStatus(3);
|
|
|
return;
|
|
|
- }
|
|
|
-
|
|
|
- /*List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsMap.get(data.getStudentId());
|
|
|
- if (!CollectionUtils.isEmpty(studentApplyRefunds)) {
|
|
|
- StudentApplyRefunds studentApplyRefund = studentApplyRefunds.get(0);
|
|
|
- if (data.getStudentStatus() == 0 && studentApplyRefund.getStatus().equals(StudentApplyRefundsStatus.ING)) {
|
|
|
- data.setStudentStatus(2);
|
|
|
- return;
|
|
|
+ } else if (StringUtils.equals(data.getClassStatus(),ClassGroupStudentStatusEnum.NORMAL.getCode())) {
|
|
|
+ data.setStudentStatus(0);
|
|
|
+ List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsMap.get(data.getStudentId());
|
|
|
+ if (!CollectionUtils.isEmpty(studentApplyRefunds)) {
|
|
|
+ StudentApplyRefunds studentApplyRefund = studentApplyRefunds.get(0);
|
|
|
+ if (data.getStudentStatus() == 0 && studentApplyRefund.getStatus().equals(StudentApplyRefundsStatus.ING)) {
|
|
|
+ data.setStudentStatus(2);
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
- }*/
|
|
|
+ return;
|
|
|
+ }
|
|
|
data.setStudentStatus(0);
|
|
|
});
|
|
|
|