提交 b2f17d40 作者: 洪东保

转录文件为空

父级 382e9d26
...@@ -10,12 +10,14 @@ public enum MeetingState { ...@@ -10,12 +10,14 @@ public enum MeetingState {
// 新会议待处理 // 新会议待处理
NEW(0, "新会议待处理"), NEW(0, "新会议待处理"),
// 处理中 // 处理中
GENERATE_ERROR(1, "处理中"), GENERATE_ERROR(1, "生成纪要失败"),
// 生成纪要成功 // 生成纪要成功
NOTE_GENERATED(2, "生成纪要成功"), NOTE_GENERATED(2, "生成纪要成功"),
// 推送纪要成功 // 推送纪要成功
PUSH_SUCCESS(3, "推送纪要邮件成功"), PUSH_SUCCESS(3, "推送纪要邮件成功"),
PUSH_ERROR(4, "推送纪要邮件失败"); PUSH_ERROR(4, "推送纪要邮件失败"),
EMPTY(5, "转录文件为空")
;
// 状态码 // 状态码
private final int code; private final int code;
......
...@@ -110,6 +110,7 @@ public class FileProcessTask { ...@@ -110,6 +110,7 @@ public class FileProcessTask {
log.warn("key already exists in redis!, key: {}", key); log.warn("key already exists in redis!, key: {}", key);
return; return;
} }
Integer status = null;
while (retryCount <= MAX_RETRY && !isSuccess) { while (retryCount <= MAX_RETRY && !isSuccess) {
Client client = new Client.Builder() Client client = new Client.Builder()
.withAppId(tencentAppId).withSdkId(tencentSdkId) .withAppId(tencentAppId).withSdkId(tencentSdkId)
...@@ -261,6 +262,7 @@ public class FileProcessTask { ...@@ -261,6 +262,7 @@ public class FileProcessTask {
if(StringUtils.isEmpty(recordTextBuffer.toString().replaceAll("\\n","").trim())){ if(StringUtils.isEmpty(recordTextBuffer.toString().replaceAll("\\n","").trim())){
log.info("获取的转录文本为空,跳过纪要生成,meetingId:{},fileRecordId:{}",meetingId,recordFileIdList.toString()); log.info("获取的转录文本为空,跳过纪要生成,meetingId:{},fileRecordId:{}",meetingId,recordFileIdList.toString());
processLogService.log(meetingId,subMeetingId,"获取的转录文本为空,跳过纪要生成"); processLogService.log(meetingId,subMeetingId,"获取的转录文本为空,跳过纪要生成");
status = MeetingState.EMPTY.getCode();
throw new RuntimeException("获取的转录文本为空,跳过纪要生成"); throw new RuntimeException("获取的转录文本为空,跳过纪要生成");
} }
// 3. 处理文件 (调用Claude API等) // 3. 处理文件 (调用Claude API等)
...@@ -351,7 +353,9 @@ public class FileProcessTask { ...@@ -351,7 +353,9 @@ public class FileProcessTask {
new LambdaUpdateWrapper<MeetingInfo>() new LambdaUpdateWrapper<MeetingInfo>()
.eq(MeetingInfo::getMeetingId,meetingId) .eq(MeetingInfo::getMeetingId,meetingId)
.eq(subMeetingId != null,MeetingInfo::getSubMeetingId,subMeetingId) .eq(subMeetingId != null,MeetingInfo::getSubMeetingId,subMeetingId)
.set(MeetingInfo::getGenerateRetry,Boolean.TRUE)); .set(MeetingInfo::getGenerateRetry,Boolean.TRUE)
.set(MeetingInfo::getStatus, status != null ? status : MeetingState.GENERATE_ERROR.getCode())
);
} }
}else{ }else{
// 指数退避 // 指数退避
......
...@@ -91,7 +91,7 @@ public class MeetingInfo implements Serializable { ...@@ -91,7 +91,7 @@ public class MeetingInfo implements Serializable {
*/ */
private Boolean isPushed; private Boolean isPushed;
/** /**
* 会议状态: 0新会议待处理 1生成纪要失败 2生成纪要成功 3推送邮件成功 4推送邮件失败 * 会议状态: 0新会议待处理 1生成纪要失败 2生成纪要成功 3推送邮件成功 4推送邮件失败 5转录文件为空
*/ */
private Integer status; private Integer status;
/** /**
......
...@@ -133,7 +133,7 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T ...@@ -133,7 +133,7 @@ public class TencentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,T
//获取总页数 //获取总页数
CorpRecordsVO firstData = fetchMeetingRecords(tencentAdminUserId, 1, startTime, endTime, 1, 20); CorpRecordsVO firstData = fetchMeetingRecords(tencentAdminUserId, 1, startTime, endTime, 1, 20);
Integer totalPage = firstData.getTotalPage(); Integer totalPage = firstData.getTotalPage();
log.info("总页数: {}", totalPage);
//目前已存储的会议id //目前已存储的会议id
List<TencentMeetingVO.SimpleMeetingInfo> meetingIds = meetingInfoMapper.getAllMeetingIds(); List<TencentMeetingVO.SimpleMeetingInfo> meetingIds = meetingInfoMapper.getAllMeetingIds();
List<TencentMeetingUser> meetingUsers = tecentMeetingMapper.getAlluser(); List<TencentMeetingUser> meetingUsers = tecentMeetingMapper.getAlluser();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<insert id="batchInsert" parameterType="list"> <insert id="batchInsert" parameterType="list">
INSERT IGNORE INTO cmt_meeting_info (subject, meeting_id, meeting_code, host, host_uid, participant_users, start_time, INSERT IGNORE INTO cmt_meeting_info (subject, meeting_id, meeting_code, host, host_uid, participant_users, start_time,
end_time, is_generated, email_push_access, is_pushed, sync_time, sub_meeting_id, record_content, record_xml, generate_retry, end_time, is_generated, email_push_access, is_pushed, sync_time, sub_meeting_id, record_content, record_xml, generate_retry,
push_retry, record_file_id,email) push_retry, record_file_id, status, email)
VALUES VALUES
<foreach collection="meetingSaveList" item="meeting" separator=","> <foreach collection="meetingSaveList" item="meeting" separator=",">
( (
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#{meeting.generateRetry}, #{meeting.generateRetry},
#{meeting.pushRetry}, #{meeting.pushRetry},
#{meeting.recordFileId}, #{meeting.recordFileId},
#{meeting.status},
#{meeting.email} #{meeting.email}
) )
</foreach> </foreach>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论