Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cmeeting
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
翟斌
cmeeting
Commits
1a40d520
提交
1a40d520
authored
6月 03, 2025
作者:
duanxincheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
纪要周期流程日志;解决主持人找不到的问题;
父级
e0b7d23d
全部展开
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
255 行增加
和
34 行删除
+255
-34
pom.xml
+23
-3
src/main/java/META-INF/MANIFEST.MF
+3
-0
src/main/java/com/cmeeting/email/EmailSender.java
+12
-2
src/main/java/com/cmeeting/job/CmeetingJob.java
+13
-2
src/main/java/com/cmeeting/job/EmailPushTask.java
+13
-5
src/main/java/com/cmeeting/job/FileProcessTask.java
+30
-9
src/main/java/com/cmeeting/log/entity/ProcessLog.java
+51
-0
src/main/java/com/cmeeting/log/service/ProcessLogService.java
+9
-0
src/main/java/com/cmeeting/log/service/impl/ProcessLogServiceImpl.java
+21
-0
src/main/java/com/cmeeting/mapper/primary/ProcessLogMapper.java
+10
-0
src/main/java/com/cmeeting/mapper/primary/TecentMeetingMapper.java
+2
-0
src/main/java/com/cmeeting/service/FileProcessProducer.java
+5
-1
src/main/java/com/cmeeting/service/impl/TecentMeetingServiceImpl.java
+51
-12
src/main/resources/META-INF/MANIFEST.MF
+3
-0
src/main/resources/mapper/primary/ProcessLogMapper.xml
+5
-0
src/main/resources/mapper/primary/TecentMeetingMapper.xml
+4
-0
没有找到文件。
pom.xml
浏览文件 @
1a40d520
...
@@ -4,9 +4,10 @@
...
@@ -4,9 +4,10 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.example
</groupId>
<groupId>
com.robot
</groupId>
<artifactId>
tencent_callback
</artifactId>
<artifactId>
cmeeting
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<!--<profiles>
<!--<profiles>
<profile>
<profile>
...
@@ -338,6 +339,24 @@
...
@@ -338,6 +339,24 @@
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<mainClass>
com.cmeeting.TencentMeetingCallbackApplication
</mainClass>
<!-- 指定主类 -->
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
<version>
2.7.0
</version>
</plugin>
</plugins>
</build>
</project>
</project>
\ No newline at end of file
src/main/java/META-INF/MANIFEST.MF
0 → 100644
浏览文件 @
1a40d520
Manifest-Version: 1.0
Main-Class: com.cmeeting.TencentMeetingCallbackApplication
src/main/java/com/cmeeting/email/EmailSender.java
浏览文件 @
1a40d520
package
com
.
cmeeting
.
email
;
package
com
.
cmeeting
.
email
;
import
com.cmeeting.log.service.ProcessLogService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -8,9 +9,12 @@ import org.springframework.stereotype.Service;
...
@@ -8,9 +9,12 @@ import org.springframework.stereotype.Service;
import
javax.activation.DataHandler
;
import
javax.activation.DataHandler
;
import
javax.activation.DataSource
;
import
javax.activation.DataSource
;
import
javax.activation.FileDataSource
;
import
javax.activation.FileDataSource
;
import
javax.annotation.Resource
;
import
javax.mail.*
;
import
javax.mail.*
;
import
javax.mail.internet.*
;
import
javax.mail.internet.*
;
import
java.io.File
;
import
java.io.File
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.util.Properties
;
import
java.util.Properties
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
@@ -23,6 +27,8 @@ public class EmailSender {
...
@@ -23,6 +27,8 @@ public class EmailSender {
private
String
EMAIL_PWD
;
private
String
EMAIL_PWD
;
@Value
(
"${email.smtp-host}"
)
@Value
(
"${email.smtp-host}"
)
private
String
SMTP_HOST
;
private
String
SMTP_HOST
;
@Resource
private
ProcessLogService
processLogService
;
private
static
final
Integer
MAX_RETRY
=
3
;
private
static
final
Integer
MAX_RETRY
=
3
;
...
@@ -65,6 +71,7 @@ public class EmailSender {
...
@@ -65,6 +71,7 @@ public class EmailSender {
boolean
isSent
=
false
;
boolean
isSent
=
false
;
if
(
StringUtils
.
isEmpty
(
toEmail
)){
if
(
StringUtils
.
isEmpty
(
toEmail
)){
log
.
error
(
"收件邮箱为空,推送失败"
);
log
.
error
(
"收件邮箱为空,推送失败"
);
processLogService
.
log
(
meetingId
,
null
,
"收件邮箱为空,推送失败"
);
return
false
;
return
false
;
}
}
while
(
retryCount
.
intValue
()
<
MAX_RETRY
&&
!
isSent
){
while
(
retryCount
.
intValue
()
<
MAX_RETRY
&&
!
isSent
){
...
@@ -103,9 +110,12 @@ public class EmailSender {
...
@@ -103,9 +110,12 @@ public class EmailSender {
log
.
error
(
"邮件已成功发送: meetingId->{}"
,
meetingId
);
log
.
error
(
"邮件已成功发送: meetingId->{}"
,
meetingId
);
isSent
=
true
;
isSent
=
true
;
}
catch
(
MessagingException
e
)
{
}
catch
(
MessagingException
e
)
{
//todo 邮件失败记录
// 异常处理
retryCount
.
getAndIncrement
();
retryCount
.
getAndIncrement
();
// 异常处理
StringWriter
sw
=
new
StringWriter
();
PrintWriter
pw
=
new
PrintWriter
(
sw
);
e
.
printStackTrace
(
pw
);
processLogService
.
log
(
meetingId
,
null
,
"【邮件推送异常】:"
+
sw
.
toString
());
if
(
retryCount
.
intValue
()
>
MAX_RETRY
)
{
if
(
retryCount
.
intValue
()
>
MAX_RETRY
)
{
log
.
error
(
"邮件发送达到最大重试次数: meetingId->{}"
,
meetingId
);
log
.
error
(
"邮件发送达到最大重试次数: meetingId->{}"
,
meetingId
);
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
src/main/java/com/cmeeting/job/CmeetingJob.java
浏览文件 @
1a40d520
...
@@ -17,6 +17,7 @@ import org.springframework.scheduling.annotation.Scheduled;
...
@@ -17,6 +17,7 @@ import org.springframework.scheduling.annotation.Scheduled;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.PostConstruct
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
...
@@ -37,6 +38,16 @@ public class CmeetingJob {
...
@@ -37,6 +38,16 @@ public class CmeetingJob {
@Autowired
@Autowired
private
FileProcessProducer
producer
;
private
FileProcessProducer
producer
;
// @PostConstruct
// public void weComUserInit(){
// weComUserSync();
// }
//
// @PostConstruct
// public void tencentUserInit(){
// TencentUserSync();
// }
/**
/**
* 企微人员定时同步
* 企微人员定时同步
*/
*/
...
@@ -122,8 +133,8 @@ public class CmeetingJob {
...
@@ -122,8 +133,8 @@ public class CmeetingJob {
userIdMapper
.
insertUsers
(
userIds
);
userIdMapper
.
insertUsers
(
userIds
);
}
}
@Scheduled
(
fixedRate
=
5
*
60
*
1000
,
initialDelay
=
2
*
60
*
1000
)
//
@Scheduled(fixedRate = 5 * 60 * 1000,initialDelay = 2 * 60 * 1000)
//
@Scheduled(fixedRate = 5 * 60 * 1000)
@Scheduled
(
fixedRate
=
5
*
60
*
1000
)
public
void
execute
()
{
public
void
execute
()
{
// 定义时间格式化器
// 定义时间格式化器
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
src/main/java/com/cmeeting/job/EmailPushTask.java
浏览文件 @
1a40d520
...
@@ -36,6 +36,7 @@ import okhttp3.Response;
...
@@ -36,6 +36,7 @@ import okhttp3.Response;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.xwpf.extractor.XWPFWordExtractor
;
import
org.apache.poi.xwpf.extractor.XWPFWordExtractor
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.io.*
;
import
java.io.*
;
...
@@ -90,7 +91,7 @@ public class EmailPushTask {
...
@@ -90,7 +91,7 @@ public class EmailPushTask {
xml
=
convertInputStreamToString
(
is
);
xml
=
convertInputStreamToString
(
is
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
());
continue
;
throw
new
RuntimeException
(
e
)
;
}
}
//将xml格式的内容转换为map,用于填充模板
//将xml格式的内容转换为map,用于填充模板
...
@@ -103,15 +104,22 @@ public class EmailPushTask {
...
@@ -103,15 +104,22 @@ public class EmailPushTask {
participantsMap
.
put
(
"meeting_host"
,
meetingInfo
.
getHost
());
participantsMap
.
put
(
"meeting_host"
,
meetingInfo
.
getHost
());
dataModel
.
putAll
(
participantsMap
);
dataModel
.
putAll
(
participantsMap
);
String
path
=
Thread
.
currentThread
().
getContextClassLoader
().
getResource
(
""
).
getPath
();
String
path
=
Thread
.
currentThread
().
getContextClassLoader
().
getResource
(
""
).
getPath
();
XWPFTemplate
template
=
XWPFTemplate
.
compile
(
path
+
"template/data_net_template.docx"
).
render
(
dataModel
);
ClassPathResource
resource
=
new
ClassPathResource
(
"template/data_net_template.docx"
);
meetingName
=
dataModel
.
get
(
"meeting_name"
)
!=
null
?
String
.
valueOf
(
dataModel
.
get
(
"meeting_name"
))
:
"腾讯会议纪要"
;
meetingName
=
dataModel
.
get
(
"meeting_name"
)
!=
null
?
String
.
valueOf
(
dataModel
.
get
(
"meeting_name"
))
:
"腾讯会议纪要"
;
targetFileName
=
meetingName
+
"_"
+
nowTime
;
targetFileName
=
meetingName
+
"_"
+
nowTime
;
template
.
writeAndClose
(
new
FileOutputStream
(
savePath
+
targetFileName
+
".docx"
));
try
(
InputStream
inputStream
=
resource
.
getInputStream
())
{
byte
[]
recordXmlData
=
Files
.
readAllBytes
(
Paths
.
get
(
savePath
+
targetFileName
+
".docx"
));
XWPFTemplate
template
=
XWPFTemplate
.
compile
(
inputStream
).
render
(
dataModel
);
template
.
writeAndClose
(
new
FileOutputStream
(
path
+
targetFileName
+
".docx"
));
byte
[]
recordXmlData
=
Files
.
readAllBytes
(
Paths
.
get
(
path
+
targetFileName
+
".docx"
));
minioUtils
.
upload
(
recordXmlPath
,
recordXmlData
);
minioUtils
.
upload
(
recordXmlPath
,
recordXmlData
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
//邮件推送
//邮件推送
isSuccess
=
emailSender
.
sendEmailWithAttachment
(
"duanxincheng@chatbot.cn"
,
meetingName
,
savePath
+
targetFileName
+
".docx"
,
meetingId
);
// isSuccess = emailSender.sendEmailWithAttachment("duanxincheng@chatbot.cn",meetingName,savePath + targetFileName + ".docx",meetingId);
isSuccess
=
emailSender
.
sendEmailWithAttachment
(
meetingInfo
.
getEmail
(),
meetingName
,
savePath
+
targetFileName
+
".docx"
,
meetingId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
// 异常处理
// 异常处理
int
currentRetryCount
=
retryCount
.
getAndIncrement
();
int
currentRetryCount
=
retryCount
.
getAndIncrement
();
...
...
src/main/java/com/cmeeting/job/FileProcessTask.java
浏览文件 @
1a40d520
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.cmeeting.dto.UserDTO
;
import
com.cmeeting.dto.UserDTO
;
import
com.cmeeting.email.EmailSender
;
import
com.cmeeting.email.EmailSender
;
import
com.cmeeting.log.service.ProcessLogService
;
import
com.cmeeting.mapper.primary.MeetingInfoMapper
;
import
com.cmeeting.mapper.primary.MeetingInfoMapper
;
import
com.cmeeting.mapper.primary.MeetingRecordTemplateMapper
;
import
com.cmeeting.mapper.primary.MeetingRecordTemplateMapper
;
import
com.cmeeting.pojo.MeetingInfo
;
import
com.cmeeting.pojo.MeetingInfo
;
...
@@ -86,6 +87,7 @@ public class FileProcessTask {
...
@@ -86,6 +87,7 @@ public class FileProcessTask {
private
MinioUtils
minioUtils
;
private
MinioUtils
minioUtils
;
private
EmailSender
emailSender
;
private
EmailSender
emailSender
;
private
MeetingRecordTemplateMapper
meetingRecordTemplateMapper
;
private
MeetingRecordTemplateMapper
meetingRecordTemplateMapper
;
private
ProcessLogService
processLogService
;
// 实际处理逻辑
// 实际处理逻辑
public
void
process
()
{
public
void
process
()
{
...
@@ -156,6 +158,7 @@ public class FileProcessTask {
...
@@ -156,6 +158,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
,
"获取的转录文本为空,跳过纪要生成"
);
throw
new
RuntimeException
(
"获取的转录文本为空,跳过纪要生成"
);
throw
new
RuntimeException
(
"获取的转录文本为空,跳过纪要生成"
);
}
}
// 3. 处理文件 (调用Claude API等)
// 3. 处理文件 (调用Claude API等)
...
@@ -166,6 +169,10 @@ public class FileProcessTask {
...
@@ -166,6 +169,10 @@ public class FileProcessTask {
isSuccess
=
true
;
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
StringWriter
sw
=
new
StringWriter
();
PrintWriter
pw
=
new
PrintWriter
(
sw
);
e
.
printStackTrace
(
pw
);
processLogService
.
log
(
meetingId
,
subMeetingId
,
sw
.
toString
());
// 异常处理
// 异常处理
retryCount
++;
retryCount
++;
if
(
retryCount
>
MAX_RETRY
)
{
if
(
retryCount
>
MAX_RETRY
)
{
...
@@ -279,20 +286,24 @@ public class FileProcessTask {
...
@@ -279,20 +286,24 @@ public class FileProcessTask {
dataModel
.
putAll
(
participantsMap
);
dataModel
.
putAll
(
participantsMap
);
ClassPathResource
resource
=
new
ClassPathResource
(
"template/data_net_template.docx"
);
ClassPathResource
resource
=
new
ClassPathResource
(
"template/data_net_template.docx"
);
Properties
properties
=
new
Properties
();
meetingName
=
dataModel
.
get
(
"meeting_name"
)
!=
null
?
String
.
valueOf
(
dataModel
.
get
(
"meeting_name"
))
:
"腾讯会议纪要"
;
meetingName
=
dataModel
.
get
(
"meeting_name"
)
!=
null
?
String
.
valueOf
(
dataModel
.
get
(
"meeting_name"
))
:
"腾讯会议纪要"
;
targetFileName
=
meetingName
+
"_"
+
nowTime
;
targetFileName
=
meetingName
+
"_"
+
nowTime
;
XWPFTemplate
template
;
try
(
InputStream
inputStream
=
resource
.
getInputStream
())
{
try
(
InputStream
inputStream
=
resource
.
getInputStream
())
{
XWPFTemplate
template
=
XWPFTemplate
.
compile
(
inputStream
).
render
(
dataModel
);
template
=
XWPFTemplate
.
compile
(
inputStream
).
render
(
dataModel
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
template
.
writeAndClose
(
new
FileOutputStream
(
path
+
targetFileName
+
".docx"
));
template
.
writeAndClose
(
new
FileOutputStream
(
path
+
targetFileName
+
".docx"
));
byte
[]
recordXmlData
=
Files
.
readAllBytes
(
Paths
.
get
(
path
+
targetFileName
+
".docx"
));
byte
[]
recordXmlData
=
Files
.
readAllBytes
(
Paths
.
get
(
path
+
targetFileName
+
".docx"
));
minioUtils
.
upload
(
recordXmlPath
,
recordXmlData
);
minioUtils
.
upload
(
recordXmlPath
,
recordXmlData
);
}
catch
(
IOException
e
)
{
processLogService
.
log
(
meetingId
,
subMeetingId
,
"填充会议纪要成功"
);
e
.
printStackTrace
();
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"填充会议纪要失败: {}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"填充会议纪要失败: {}"
,
e
.
getMessage
(),
e
);
StringWriter
sw
=
new
StringWriter
();
PrintWriter
pw
=
new
PrintWriter
(
sw
);
e
.
printStackTrace
(
pw
);
processLogService
.
log
(
meetingId
,
subMeetingId
,
"填充会议纪要失败"
+
sw
.
toString
());
throw
new
RuntimeException
(
"填充会议纪要失败"
);
throw
new
RuntimeException
(
"填充会议纪要失败"
);
}
}
...
@@ -301,11 +312,15 @@ public class FileProcessTask {
...
@@ -301,11 +312,15 @@ public class FileProcessTask {
if
(
meetingInfo
.
getEmailPushAccess
()){
if
(
meetingInfo
.
getEmailPushAccess
()){
log
.
info
(
"用户允许邮件推送,准备推送邮件至{}------"
,
meetingInfo
.
getEmail
());
log
.
info
(
"用户允许邮件推送,准备推送邮件至{}------"
,
meetingInfo
.
getEmail
());
//邮件推送
//邮件推送
isPushed
=
emailSender
.
sendEmailWithAttachment
(
"duanxincheng@chatbot.cn"
,
meetingName
,
path
+
targetFileName
+
".docx"
,
meetingId
);
// isPushed = emailSender.sendEmailWithAttachment("duanxincheng@chatbot.cn",meetingName,path + targetFileName + ".docx",meetingId);
isPushed
=
emailSender
.
sendEmailWithAttachment
(
meetingInfo
.
getEmail
(),
meetingName
,
path
+
targetFileName
+
".docx"
,
meetingId
);
if
(
isPushed
)
processLogService
.
log
(
meetingId
,
subMeetingId
,
"用户允许邮件推送,推送邮件至"
+
meetingInfo
.
getEmail
());
// emailSender.sendEmailWithAttachment("xuwentao@chatbot.cn",meetingName,path + targetFileName + ".docx",meetingId);
// emailSender.sendEmailWithAttachment("xuwentao@chatbot.cn",meetingName,path + targetFileName + ".docx",meetingId);
// emailSender.sendEmailWithAttachment("jiaqi.cai@cimc.com",meetingName,path + targetFileName + ".docx",meetingId);
// emailSender.sendEmailWithAttachment("jiaqi.cai@cimc.com",meetingName,path + targetFileName + ".docx",meetingId);
}
else
{
}
else
{
log
.
info
(
"用户关闭了邮件推送,推送终止------"
);
log
.
info
(
"用户关闭了邮件推送,推送终止------"
);
processLogService
.
log
(
meetingId
,
subMeetingId
,
"用户关闭了邮件推送,推送终止"
);
isPushed
=
Boolean
.
FALSE
;
isPushed
=
Boolean
.
FALSE
;
}
}
...
@@ -349,7 +364,7 @@ public class FileProcessTask {
...
@@ -349,7 +364,7 @@ public class FileProcessTask {
return
json
;
return
json
;
}
}
p
ublic
static
String
call_llm
(
String
apiAddr
,
String
model
,
String
token
,
List
<
Message
>
messages
,
int
maxTokens
)
{
p
rivate
String
call_llm
(
String
apiAddr
,
String
model
,
String
token
,
List
<
Message
>
messages
,
int
maxTokens
)
{
LLMService
service
=
new
LLMService
(
token
,
apiAddr
);
LLMService
service
=
new
LLMService
(
token
,
apiAddr
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
try
{
try
{
...
@@ -373,6 +388,10 @@ public class FileProcessTask {
...
@@ -373,6 +388,10 @@ public class FileProcessTask {
});
});
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
StringWriter
sw
=
new
StringWriter
();
PrintWriter
pw
=
new
PrintWriter
(
sw
);
e
.
printStackTrace
(
pw
);
processLogService
.
log
(
meetingId
,
subMeetingId
,
"【大模型处理异常】:"
+
sw
.
toString
());
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
service
.
shutdownExecutor
();
service
.
shutdownExecutor
();
...
@@ -422,7 +441,7 @@ public class FileProcessTask {
...
@@ -422,7 +441,7 @@ public class FileProcessTask {
public
FileProcessTask
(
List
<
String
>
recordFileIdList
,
String
meetingId
,
String
subMeetingId
,
String
savePath
,
Map
<
String
,
Object
>
metadata
,
String
tencentAppId
,
public
FileProcessTask
(
List
<
String
>
recordFileIdList
,
String
meetingId
,
String
subMeetingId
,
String
savePath
,
Map
<
String
,
Object
>
metadata
,
String
tencentAppId
,
String
tencentSdkId
,
String
tencentSecretId
,
String
tencentSecretKey
,
String
tencentAdminUserId
,
String
tencentSdkId
,
String
tencentSecretId
,
String
tencentSecretKey
,
String
tencentAdminUserId
,
MeetingInfoMapper
meetingInfoMapper
,
MinioUtils
minioUtils
,
EmailSender
emailSender
,
MeetingRecordTemplateMapper
meetingRecordTemplateMapper
,
MeetingInfoMapper
meetingInfoMapper
,
MinioUtils
minioUtils
,
EmailSender
emailSender
,
MeetingRecordTemplateMapper
meetingRecordTemplateMapper
,
String
llmApiAddr
,
Boolean
finalRetry
)
{
String
llmApiAddr
,
Boolean
finalRetry
,
ProcessLogService
processLogService
)
{
this
.
recordFileIdList
=
recordFileIdList
;
this
.
recordFileIdList
=
recordFileIdList
;
this
.
savePath
=
savePath
;
this
.
savePath
=
savePath
;
this
.
metadata
=
metadata
;
this
.
metadata
=
metadata
;
...
@@ -439,5 +458,6 @@ public class FileProcessTask {
...
@@ -439,5 +458,6 @@ public class FileProcessTask {
this
.
meetingRecordTemplateMapper
=
meetingRecordTemplateMapper
;
this
.
meetingRecordTemplateMapper
=
meetingRecordTemplateMapper
;
this
.
llmApiAddr
=
llmApiAddr
;
this
.
llmApiAddr
=
llmApiAddr
;
this
.
finalRetry
=
finalRetry
;
this
.
finalRetry
=
finalRetry
;
this
.
processLogService
=
processLogService
;
}
}
}
}
\ No newline at end of file
src/main/java/com/cmeeting/log/entity/ProcessLog.java
0 → 100644
浏览文件 @
1a40d520
package
com
.
cmeeting
.
log
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* 纪要生成周期流程日志
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
"log_process_log"
)
public
class
ProcessLog
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
26238487532381000L
;
/**
* 主键id
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
* 会议ID(字符串类型)
*/
private
String
meetingId
;
/**
* 子会议ID
*/
private
String
subMeetingId
;
/**
* 消息
*/
private
String
message
;
/**
* 处理时间
*/
private
LocalDateTime
operateTime
;
}
\ No newline at end of file
src/main/java/com/cmeeting/log/service/ProcessLogService.java
0 → 100644
浏览文件 @
1a40d520
package
com
.
cmeeting
.
log
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.cmeeting.log.entity.ProcessLog
;
public
interface
ProcessLogService
extends
IService
<
ProcessLog
>
{
boolean
log
(
String
meetingId
,
String
subMeetingId
,
String
message
);
}
src/main/java/com/cmeeting/log/service/impl/ProcessLogServiceImpl.java
0 → 100644
浏览文件 @
1a40d520
package
com
.
cmeeting
.
log
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.cmeeting.log.entity.ProcessLog
;
import
com.cmeeting.mapper.primary.ProcessLogMapper
;
import
com.cmeeting.log.service.ProcessLogService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
@Service
@Slf4j
public
class
ProcessLogServiceImpl
extends
ServiceImpl
<
ProcessLogMapper
,
ProcessLog
>
implements
ProcessLogService
{
@Override
public
boolean
log
(
String
meetingId
,
String
subMeetingId
,
String
message
)
{
ProcessLog
processLog
=
ProcessLog
.
builder
().
meetingId
(
meetingId
).
subMeetingId
(
subMeetingId
).
message
(
message
).
operateTime
(
LocalDateTime
.
now
()).
build
();
boolean
save
=
save
(
processLog
);
return
save
;
}
}
src/main/java/com/cmeeting/mapper/primary/ProcessLogMapper.java
0 → 100644
浏览文件 @
1a40d520
package
com
.
cmeeting
.
mapper
.
primary
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.cmeeting.log.entity.ProcessLog
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
ProcessLogMapper
extends
BaseMapper
<
ProcessLog
>
{
}
\ No newline at end of file
src/main/java/com/cmeeting/mapper/primary/TecentMeetingMapper.java
浏览文件 @
1a40d520
...
@@ -10,4 +10,6 @@ import java.util.List;
...
@@ -10,4 +10,6 @@ import java.util.List;
public
interface
TecentMeetingMapper
extends
BaseMapper
<
TencentMeetingUser
>
{
public
interface
TecentMeetingMapper
extends
BaseMapper
<
TencentMeetingUser
>
{
void
batchInsertUsers
(
@Param
(
"userList"
)
List
<
TencentMeetingUser
>
userList
);
void
batchInsertUsers
(
@Param
(
"userList"
)
List
<
TencentMeetingUser
>
userList
);
List
<
TencentMeetingUser
>
getAlluser
();
List
<
TencentMeetingUser
>
getAlluser
();
String
getUsernameByUserId
(
@Param
(
"userId"
)
String
userId
);
}
}
src/main/java/com/cmeeting/service/FileProcessProducer.java
浏览文件 @
1a40d520
...
@@ -4,6 +4,7 @@ import com.cmeeting.dto.UserDTO;
...
@@ -4,6 +4,7 @@ import com.cmeeting.dto.UserDTO;
import
com.cmeeting.email.EmailSender
;
import
com.cmeeting.email.EmailSender
;
import
com.cmeeting.job.EmailPushTask
;
import
com.cmeeting.job.EmailPushTask
;
import
com.cmeeting.job.FileProcessTask
;
import
com.cmeeting.job.FileProcessTask
;
import
com.cmeeting.log.service.ProcessLogService
;
import
com.cmeeting.mapper.primary.MeetingInfoMapper
;
import
com.cmeeting.mapper.primary.MeetingInfoMapper
;
import
com.cmeeting.mapper.primary.MeetingRecordTemplateMapper
;
import
com.cmeeting.mapper.primary.MeetingRecordTemplateMapper
;
import
com.cmeeting.pojo.UserId
;
import
com.cmeeting.pojo.UserId
;
...
@@ -51,6 +52,8 @@ public class FileProcessProducer {
...
@@ -51,6 +52,8 @@ public class FileProcessProducer {
private
MinioUtils
minioUtils
;
private
MinioUtils
minioUtils
;
@Resource
@Resource
private
EmailSender
emailSender
;
private
EmailSender
emailSender
;
@Resource
private
ProcessLogService
processLogService
;
/**
/**
* 批量提交生成纪要任务
* 批量提交生成纪要任务
...
@@ -79,7 +82,8 @@ public class FileProcessProducer {
...
@@ -79,7 +82,8 @@ public class FileProcessProducer {
emailSender
,
emailSender
,
meetingRecordTemplateMapper
,
meetingRecordTemplateMapper
,
llmApiAddr
,
llmApiAddr
,
finalRetry
finalRetry
,
processLogService
);
);
// 提交任务到线程池
// 提交任务到线程池
...
...
src/main/java/com/cmeeting/service/impl/TecentMeetingServiceImpl.java
浏览文件 @
1a40d520
差异被折叠。
点击展开。
src/main/resources/META-INF/MANIFEST.MF
0 → 100644
浏览文件 @
1a40d520
Manifest-Version: 1.0
Main-Class: com.cmeeting.TencentMeetingCallbackApplication
src/main/resources/mapper/primary/ProcessLogMapper.xml
0 → 100644
浏览文件 @
1a40d520
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cmeeting.mapper.primary.ProcessLogMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mapper/primary/TecentMeetingMapper.xml
浏览文件 @
1a40d520
...
@@ -21,4 +21,7 @@
...
@@ -21,4 +21,7 @@
<select
id=
"getAlluser"
resultType=
"com.cmeeting.pojo.TencentMeetingUser"
>
<select
id=
"getAlluser"
resultType=
"com.cmeeting.pojo.TencentMeetingUser"
>
SELECT * FROM user_tencentmeeting
SELECT * FROM user_tencentmeeting
</select>
</select>
<select
id=
"getUsernameByUserId"
resultType=
"java.lang.String"
>
SELECT user_name FROM user_tencentmeeting where user_id = #{userId}
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论