提交 2acba2f6 作者: 洪东保

相同会议id、子会议id会有不同的recordId

父级 4d29a40f
...@@ -128,9 +128,7 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -128,9 +128,7 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
.build(); .build();
List<TencentMeetingVO.RecordFile> meetingFiles = new ArrayList<>(); List<TencentMeetingVO.RecordFile> meetingFiles = new ArrayList<>();
List<TencentMeetingVO.RecordFile> recordFileUrlList = new ArrayList<>();
List<MeetingInfo> meetingSaveList = new ArrayList<>(); List<MeetingInfo> meetingSaveList = new ArrayList<>();
int i = 0;
// 查询近searchDays天的会议录制列表 // 查询近searchDays天的会议录制列表
try { try {
ZonedDateTime now = ZonedDateTime.now(); ZonedDateTime now = ZonedDateTime.now();
...@@ -160,9 +158,6 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -160,9 +158,6 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
List<TencentMeetingUser> meetingUsers = tecentMeetingMapper.getAlluser(); List<TencentMeetingUser> meetingUsers = tecentMeetingMapper.getAlluser();
Map<String, String> meetingMap = meetingUsers.stream().collect(Collectors.toMap(TencentMeetingUser::getUserId, TencentMeetingUser::getUserName)); Map<String, String> meetingMap = meetingUsers.stream().collect(Collectors.toMap(TencentMeetingUser::getUserId, TencentMeetingUser::getUserName));
while (currentPage.intValue() <= totalPage){ while (currentPage.intValue() <= totalPage){
if (i >= 150) {
break;
}
CorpRecordsVO data = fetchMeetingRecords(tencentAdminUserId, 1, startTime, endTime, currentPage.getAndIncrement(), 20); CorpRecordsVO data = fetchMeetingRecords(tencentAdminUserId, 1, startTime, endTime, currentPage.getAndIncrement(), 20);
//设置总页数 //设置总页数
if (data != null && data.getRecordMeetings() != null && !data.getRecordMeetings().isEmpty()) { if (data != null && data.getRecordMeetings() != null && !data.getRecordMeetings().isEmpty()) {
...@@ -210,16 +205,23 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -210,16 +205,23 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
subMeetingId = historyMeeting.getSubMeetingId(); subMeetingId = historyMeeting.getSubMeetingId();
} }
List<CorpRecordsVO.RecordFile> recordFiles = meeting.getRecordFiles();
//按转录文件时间升序,便于后续的内容拼接
List<String> recordFileIdList = recordFiles.stream().sorted(Comparator.comparingLong(CorpRecordsVO.RecordFile::getRecordStartTime))
.map(CorpRecordsVO.RecordFile::getRecordFileId).collect(Collectors.toList());
Set<String> set1 = new HashSet<>(recordFileIdList);
//如果数据库中已有相同会议id的记录,跳过同步 //如果数据库中已有相同会议id的记录,跳过同步
String finalSubMeetingId = subMeetingId; String finalSubMeetingId = subMeetingId;
if(meetingIds.stream().noneMatch(item->item.getMeetingId().equals(meetingId) && Objects.equals(item.getSubMeetingId(), finalSubMeetingId))){ if(meetingIds.stream().noneMatch
log.info("【会议检索】新的会议meetingId->{}, subId: {} ",meeting.getMeetingId(), finalSubMeetingId); (
List<CorpRecordsVO.RecordFile> recordFiles = meeting.getRecordFiles(); item->item.getMeetingId().equals(meetingId)
//按转录文件时间升序,便于后续的内容拼接 && Objects.equals(item.getSubMeetingId(), finalSubMeetingId)
List<String> recordFileIdList = recordFiles.stream().sorted(Comparator.comparingLong(CorpRecordsVO.RecordFile::getRecordStartTime)) && set1.equals(new HashSet<>(Arrays.asList(item.getRecordFileId().split(","))))
.map(CorpRecordsVO.RecordFile::getRecordFileId).collect(Collectors.toList()); )
TencentMeetingVO.RecordFile recordFileItem = TencentMeetingVO.RecordFile.builder() ){
.recordFileIdList(recordFileIdList).meetingId(meetingId).subMeetingId(subMeetingId).build(); log.info("【会议检索】新的会议meetingId->{}, subId: {} ,recordIds: {}",meeting.getMeetingId(), finalSubMeetingId, String.join(",", recordFileIdList));
String hostId; String hostId;
String hostName; String hostName;
...@@ -249,7 +251,6 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -249,7 +251,6 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
log.info("尝试从会议详情中获取主持人信息"); log.info("尝试从会议详情中获取主持人信息");
hostId = meetingInfo.getCurrentHosts().get(0).getUserid(); hostId = meetingInfo.getCurrentHosts().get(0).getUserid();
hostName = meetingMap.containsKey(hostId) ? meetingMap.get(hostId) :null; hostName = meetingMap.containsKey(hostId) ? meetingMap.get(hostId) :null;
// processLogService.log(meeting.getMeetingId(),subMeetingId,"未找到主持人,默认会议创建人为主持人");
}else{ }else{
log.info("尝试从参会人员列表中获取主持人信息"); log.info("尝试从参会人员列表中获取主持人信息");
// 获取参会成员明细 // 获取参会成员明细
...@@ -281,7 +282,6 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -281,7 +282,6 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
hostName = new String(Base64.getDecoder().decode(host.get().getUserName())); hostName = new String(Base64.getDecoder().decode(host.get().getUserName()));
}else{ }else{
log.error("未找到主持人,默认没有生成纪要权限, meetId: {}, subId: {}", meetingId, subMeetingId); log.error("未找到主持人,默认没有生成纪要权限, meetId: {}, subId: {}", meetingId, subMeetingId);
// processLogService.log(meeting.getMeetingId(),subMeetingId,"未找到主持人,默认没有生成纪要权限");
continue; continue;
} }
} }
...@@ -291,13 +291,9 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -291,13 +291,9 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
boolean generateAccess = accessUserIds.stream().anyMatch(item -> item.getTid().equals(hostId)); boolean generateAccess = accessUserIds.stream().anyMatch(item -> item.getTid().equals(hostId));
if(!generateAccess){ if(!generateAccess){
log.error("【权限校验】主持人{}没有生成纪要权限,跳过生成",hostId); log.error("【权限校验】主持人{}没有生成纪要权限,跳过生成",hostId);
// processLogService.log(meeting.getMeetingId(),subMeetingId,"【权限校验】主持人"+hostId+"没有生成纪要权限,跳过生成");
continue; continue;
} }
log.info("【权限校验】主持人{}允许生成纪要",hostId); log.info("【权限校验】主持人{}允许生成纪要",hostId);
// processLogService.log(meeting.getMeetingId(),subMeetingId,"【权限校验】主持人"+hostId+"允许生成纪要");
UserDTO userDTO = accessUserIds.stream().filter(item -> item.getTid().equals(hostId)).findFirst().get(); UserDTO userDTO = accessUserIds.stream().filter(item -> item.getTid().equals(hostId)).findFirst().get();
...@@ -320,9 +316,7 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -320,9 +316,7 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
.recordFileId(recordFileIdList.stream().collect(Collectors.joining(","))) .recordFileId(recordFileIdList.stream().collect(Collectors.joining(",")))
.email(email) .email(email)
.build(); .build();
recordFileUrlList.add(recordFileItem);
meetingSaveList.add(meetingItem); meetingSaveList.add(meetingItem);
i++;
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -42,5 +42,7 @@ public class TencentMeetingVO { ...@@ -42,5 +42,7 @@ public class TencentMeetingVO {
public static class SimpleMeetingInfo{ public static class SimpleMeetingInfo{
private String meetingId;//如果是周期会议,这个id表示主会议 private String meetingId;//如果是周期会议,这个id表示主会议
private String subMeetingId;//如果是周期会议,这个id表示子会议 private String subMeetingId;//如果是周期会议,这个id表示子会议
private String recordFileId;// 会议记录id,多个以","分隔
} }
} }
\ No newline at end of file
...@@ -32,6 +32,6 @@ ...@@ -32,6 +32,6 @@
</foreach> </foreach>
</insert> </insert>
<select id="getAllMeetingIds" resultType="com.cmeeting.vo.TencentMeetingVO$SimpleMeetingInfo"> <select id="getAllMeetingIds" resultType="com.cmeeting.vo.TencentMeetingVO$SimpleMeetingInfo">
select meeting_id,sub_meeting_id from cmt_meeting_info select meeting_id,sub_meeting_id,record_file_id from cmt_meeting_info
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论