|
@@ -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);
|
|
|
});
|
|
|
|