【学生成绩统计BUG】

This commit is contained in:
weizhihong 2023-06-07 10:16:20 +08:00
parent c84538bc4f
commit 8764511650
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ public class OrgUserService implements IOrgUserService {
Map<Long, List<UserSimulationRecord>> userRecordMap = records.stream()
.collect(Collectors.groupingBy(UserSimulationRecord::getUserId));
vos.forEach(vo -> {
List<UserSimulationRecord> recordList = userRecordMap.get(vo.getUserId());
List<UserSimulationRecord> recordList = userRecordMap.getOrDefault(vo.getUserId(), List.of());
long simDuration = recordList.stream().filter(record -> UserSimulationRecordManager.SimulationUseInfo.SIMULATION.equals(record.getType()))
.mapToLong(UserSimulationRecord::getDuration)
.sum();