|
@@ -99,18 +99,18 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
|
|
Gson gson = new Gson();
|
|
Gson gson = new Gson();
|
|
List<TEStudentMonitorRecordDto> monitorRecordList = gson.fromJson(t.getTencentVideoUrl(), new TypeToken<List<TEStudentMonitorRecordDto>>() {
|
|
List<TEStudentMonitorRecordDto> monitorRecordList = gson.fromJson(t.getTencentVideoUrl(), new TypeToken<List<TEStudentMonitorRecordDto>>() {
|
|
}.getType());
|
|
}.getType());
|
|
- StringJoiner stringJoiner = new StringJoiner("");
|
|
|
|
|
|
+ Set<MonitorVideoSourceEnum> set = new LinkedHashSet<>(monitorRecordList.size());
|
|
for (TEStudentMonitorRecordDto teStudentMonitorRecordDto : monitorRecordList) {
|
|
for (TEStudentMonitorRecordDto teStudentMonitorRecordDto : monitorRecordList) {
|
|
- stringJoiner.add(SystemConstant.getMonitorRecordVideoSource(teStudentMonitorRecordDto.getVideoSource()).name().toUpperCase()).add(",");
|
|
|
|
|
|
+ set.add(SystemConstant.getMonitorRecordVideoSource(teStudentMonitorRecordDto.getVideoSource()));
|
|
}
|
|
}
|
|
- t.setMonitorRecord(stringJoiner.toString().substring(0, stringJoiner.toString().length() - 1));
|
|
|
|
|
|
+ t.setMonitorRecord(set.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(", ", ",").trim());
|
|
} else if (Objects.nonNull(t.getVideoSource()) && !Objects.equals(t.getVideoSource().trim(), "")) {
|
|
} else if (Objects.nonNull(t.getVideoSource()) && !Objects.equals(t.getVideoSource().trim(), "")) {
|
|
String[] strs = t.getVideoSource().split(",");
|
|
String[] strs = t.getVideoSource().split(",");
|
|
- StringJoiner stringJoiner = new StringJoiner("");
|
|
|
|
|
|
+ Set<MonitorVideoSourceEnum> set = new LinkedHashSet<>(strs.length);
|
|
for (String s : strs) {
|
|
for (String s : strs) {
|
|
- stringJoiner.add(SystemConstant.getMonitorRecordVideoSource(s).name().toUpperCase()).add(",");
|
|
|
|
|
|
+ set.add(SystemConstant.getMonitorRecordVideoSource(s));
|
|
}
|
|
}
|
|
- t.setMonitorRecord(stringJoiner.toString().substring(0, stringJoiner.toString().length() - 1));
|
|
|
|
|
|
+ t.setMonitorRecord(set.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(", ", ",").trim());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return teStudentExamRecordDtoIPage;
|
|
return teStudentExamRecordDtoIPage;
|