Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cmeeting
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
翟斌
cmeeting
Commits
5b8b243d
提交
5b8b243d
authored
7月 17, 2025
作者:
洪东保
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'hongdongbao'
父级
9a12a389
dd2d04ce
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
125 行增加
和
36 行删除
+125
-36
src/main/java/com/cmeeting/job/CmeetingJob.java
+24
-7
src/main/resources/application.yml
+18
-29
src/test/java/MeetingApiTest.java
+83
-0
没有找到文件。
src/main/java/com/cmeeting/job/CmeetingJob.java
浏览文件 @
5b8b243d
...
...
@@ -10,6 +10,7 @@ import com.cmeeting.service.*;
import
com.cmeeting.vo.TencentMeetingVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -39,17 +40,19 @@ public class CmeetingJob {
private
MeetingRecordTemplateService
meetingRecordTemplateService
;
@Resource
private
UserIdMapper
userIdMapper
;
@Value
(
"${isDev}"
)
private
Boolean
isDev
;
@PostConstruct
//
@PostConstruct
public
void
weComUserInit
(){
weComUserSync
();
}
@PostConstruct
//
@PostConstruct
public
void
tencentUserInit
(){
TencentUserSync
();
}
@PostConstruct
//
@PostConstruct
public
void
userBindInit
(){
userBind
();
}
...
...
@@ -59,6 +62,9 @@ public class CmeetingJob {
*/
@Scheduled
(
cron
=
"0 30 6 * * ?"
)
public
void
weComUserSync
()
{
if
(
isDev
)
{
return
;
}
try
{
log
.
info
(
"-------企微人员定时同步任务开始-------"
);
log
.
info
(
"当前时间: "
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ISO_LOCAL_DATE
));
...
...
@@ -74,8 +80,10 @@ public class CmeetingJob {
* 腾讯会议人员定时同步
*/
@Scheduled
(
cron
=
"0 0 7 * * ?"
)
// @Scheduled(fixedRate = 5 * 60 * 1000)
public
void
TencentUserSync
()
{
if
(
isDev
)
{
return
;
}
try
{
log
.
info
(
"-------腾讯会议人员定时同步任务开始-------"
);
log
.
info
(
"当前时间: "
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ISO_LOCAL_DATE
));
...
...
@@ -92,6 +100,9 @@ public class CmeetingJob {
*/
@Scheduled
(
cron
=
"0 20 7 * * ?"
)
public
void
userBind
()
{
if
(
isDev
)
{
return
;
}
log
.
info
(
"-------关联企微腾会人员定时任务开始-------"
);
log
.
info
(
"当前时间: "
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ISO_LOCAL_DATE
));
weComService
.
userBind
();
...
...
@@ -99,8 +110,10 @@ public class CmeetingJob {
}
@Scheduled
(
fixedRate
=
20
*
60
*
1000
,
initialDelay
=
2
*
60
*
1000
)
// @Scheduled(fixedRate = 20 * 60 * 1000)
public
void
execute
()
{
if
(
isDev
)
{
return
;
}
//查出企微id和腾会id的关联关系
List
<
UserId
>
userIdRelations
=
userIdMapper
.
selectList
(
null
);
Map
<
String
,
String
>
widTidRelations
=
userIdRelations
.
stream
().
collect
(
Collectors
.
toMap
(
UserId:
:
getWid
,
UserId:
:
getTid
));
...
...
@@ -136,8 +149,10 @@ public class CmeetingJob {
* 定时扫描早于一小时之前的,所有未重试过的会议,重新生成纪要
*/
@Scheduled
(
fixedRate
=
30
*
60
*
1000
,
initialDelay
=
10
*
60
*
1000
)
// @Scheduled(fixedRate = 30 * 60 * 1000)
public
void
meetingMinutesRetry
()
{
if
(
isDev
)
{
return
;
}
try
{
log
.
info
(
"-------生成纪要重试定时任务开始-------"
);
log
.
info
(
"当前时间: "
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ISO_LOCAL_DATE
));
...
...
@@ -182,8 +197,10 @@ public class CmeetingJob {
* 定时扫描早于一小时之前的,所有邮件推送未重试过的会议,重新推送邮件
*/
@Scheduled
(
fixedRate
=
30
*
60
*
1000
,
initialDelay
=
15
*
60
*
1000
)
// @Scheduled(fixedRate = 30 * 60 * 1000)
public
void
emailPushRetry
()
{
if
(
isDev
)
{
return
;
}
try
{
log
.
info
(
"-------邮件推送重试定时任务开始-------"
);
log
.
info
(
"当前时间: "
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ISO_LOCAL_DATE
));
...
...
src/main/resources/application.yml
浏览文件 @
5b8b243d
server
:
port
:
8
081
port
:
8
105
############################################################## minio
MINIO_ADDRESS
:
http://192.168.10.
154:9000
MINIO_ADDRESS
:
http://192.168.10.
50:9001
MINIO_BUCKET
:
zhongji
MINIO_USERNAME
:
minio
MINIO_PASSWORD
:
minio123
MINIO_USERNAME
:
aigc
MINIO_PASSWORD
:
aigc1qaz2wsx
############################################################## redis
REDIS_ADDRESS
:
192.168.10.15
4
REDIS_PORT
:
63
80
REDIS_ADDRESS
:
192.168.10.15
7
REDIS_PORT
:
63
79
REDIS_PASS
:
standard123
REDIS_DATABASE
:
8
REDIS_DATABASE
:
3
############################################################## llm
# local
LLM_API_ADDR
:
https://bedrock.chatbot.cn
# prod
#LLM_API_ADDR: http://10.56.1.150:8000
############################################################## tencent meeting
# local
#TENCENT_APPID: 211153201
#TENCENT_SDKID: 28370276340
#TENCENT_SECRETID: BKOMDZVbvh0iT7k6UHsSizAWBCOVDtT6
#TENCENT_SECRETKEY: 3Y1j0mzNp7KChKFJGyaEnZHLobFoAQ8eLwfaMx8nLbtXAerO
#TENCENT_ADMIN_USERID: woaJARCQAAhkyWGuf8n9InhZsxQstjjA
#TENCENT_ADMIN_USERID: woaJARCQAAJU1EsO73Ww5rn8YHMW6iYA
# prod
TENCENT_APPID
:
210468336
...
...
@@ -52,15 +42,15 @@ spring:
datasource
:
# 主数据源
master
:
jdbc-url
:
jdbc:mysql://192.168.10.15
4:3307/aigc-zhongji-test
?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
jdbc-url
:
jdbc:mysql://192.168.10.15
7:3306/zhongji-aigc
?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
username
:
root
password
:
123456
password
:
qizhi123
driver-class-name
:
com.mysql.jdbc.Driver
# 从数据源
slave
:
jdbc-url
:
jdbc:mysql://192.168.10.15
4:3307/useradmin-zhongji-test
?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
jdbc-url
:
jdbc:mysql://192.168.10.15
7:3306/zhongji-user
?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
username
:
root
password
:
123456
password
:
qizhi123
driver-class-name
:
com.mysql.jdbc.Driver
redis
:
database
:
${REDIS_DATABASE}
...
...
@@ -75,9 +65,6 @@ spring:
timeout
:
6000ms
password
:
${REDIS_PASS}
# MyBatis ??
# mybatis.mapper-locations=classpath:mapper/primary/*.xml
mybatis.type-aliases-package
:
com.cmeeting.pojo\
mybatis
:
configuration
:
...
...
@@ -141,12 +128,12 @@ ldap:
domain
:
'
@cimc.com'
userAdmin
:
domain
:
http://192.168.10.15
4:83
03
systemDomain
:
http://192.168.10.15
4:83
01
domain
:
http://192.168.10.15
7:81
03
systemDomain
:
http://192.168.10.15
7:81
01
appId
:
af94e0ec9cc0bef2bfa63f470f6f4351
secret
:
4luHTMYMyXzOmDHN0ZOSMwOst702plcr9EKqAHtT8Nag6EPlP0VSFvqv9Zq0NRDE
file-download-path
:
/download/minio/
docDomain
:
http://192.168.10.15
4:83
02/knowledgePlatform
docDomain
:
http://192.168.10.15
7:81
02/knowledgePlatform
removeMenus
:
关键词回复,业务词库,同义词管理,答案库
...
...
@@ -168,4 +155,6 @@ logging:
level
:
com.cmeeting.mapper.primary
:
TRACE
com.cmeeting.mapper.secondary
:
TRACE
root
:
DEBUG
\ No newline at end of file
root
:
DEBUG
isDev
:
true
\ No newline at end of file
src/test/java/MeetingApiTest.java
0 → 100644
浏览文件 @
5b8b243d
import
com.tencentcloudapi.wemeet.Client
;
import
com.tencentcloudapi.wemeet.core.authenticator.JWTAuthenticator
;
import
com.tencentcloudapi.wemeet.core.exception.ClientException
;
import
com.tencentcloudapi.wemeet.core.exception.ServiceException
;
import
com.tencentcloudapi.wemeet.service.records.api.RecordsApi
;
import
com.tencentcloudapi.wemeet.service.records.model.V1AddressesRecordFileIdGet200Response
;
import
com.tencentcloudapi.wemeet.service.records.model.V1AddressesRecordFileIdGet200ResponseAiMeetingTranscriptsInner
;
import
okhttp3.OkHttpClient
;
import
okhttp3.Request
;
import
okhttp3.Response
;
import
java.io.IOException
;
import
java.math.BigInteger
;
import
java.nio.charset.StandardCharsets
;
import
java.security.SecureRandom
;
import
java.util.List
;
public
class
MeetingApiTest
{
public
static
void
main
(
String
[]
args
)
throws
ServiceException
,
ClientException
{
// 根据recordFileId下载源文件
String
tencentAppId
=
"210468336"
;
String
tencentSdkId
=
"28790143843"
;
String
tencentSecretId
=
"0ks7u8cgQ8DGVtlYZeRA9TxZCjvUT3oL"
;
String
tencentSecretKey
=
"gQU09rkJjiQfiGcUYdhiKq5Ol6LebXg4w7F7Ol0rwvvdv3Xy"
;
String
tencentAdminUserId
=
"woaJARCQAAftcvU6GGoOn66rdSZ4IrOA"
;
String
recordFileId
=
"1943182582051381249"
;
Client
client
=
new
Client
.
Builder
()
.
withAppId
(
tencentAppId
).
withSdkId
(
tencentSdkId
)
.
withSecret
(
tencentSecretId
,
tencentSecretKey
)
.
build
();
RecordsApi
.
ApiV1AddressesRecordFileIdGetRequest
addressRequest
=
new
RecordsApi
.
ApiV1AddressesRecordFileIdGetRequest
.
Builder
(
recordFileId
)
.
operatorId
(
tencentAdminUserId
)
.
operatorIdType
(
"1"
)
.
build
();
RecordsApi
.
ApiV1AddressesRecordFileIdGetResponse
addressResponse
=
client
.
records
().
v1AddressesRecordFileIdGet
(
addressRequest
,
new
JWTAuthenticator
.
Builder
().
nonce
(
BigInteger
.
valueOf
(
Math
.
abs
((
new
SecureRandom
()).
nextInt
())))
.
timestamp
(
String
.
valueOf
(
System
.
currentTimeMillis
()
/
1000L
)));
// 处理响应
if
(
addressResponse
!=
null
&&
addressResponse
.
getData
()
!=
null
)
{
V1AddressesRecordFileIdGet200Response
addressData
=
addressResponse
.
getData
();
// 获取AI会议转录文件
List
<
V1AddressesRecordFileIdGet200ResponseAiMeetingTranscriptsInner
>
transcripts
=
addressData
.
getAiMeetingTranscripts
();
if
(
transcripts
!=
null
&&
!
transcripts
.
isEmpty
())
{
// 处理每个转录文件
for
(
V1AddressesRecordFileIdGet200ResponseAiMeetingTranscriptsInner
transcript
:
transcripts
)
{
String
fileType
=
transcript
.
getFileType
();
if
(
fileType
.
equalsIgnoreCase
(
"txt"
))
{
String
downloadUrl
=
transcript
.
getDownloadAddress
();
System
.
out
.
println
(
"downloadUrl: "
+
downloadUrl
);
byte
[]
fileData
=
downloadFile
(
downloadUrl
);
// 2. 将二进制文件转换为文本
String
recordTextContent
=
new
String
(
fileData
,
StandardCharsets
.
UTF_8
);
System
.
out
.
println
(
recordTextContent
);
}
}
}
}
}
private
static
byte
[]
downloadFile
(
String
url
)
{
// 实现文件下载逻辑
OkHttpClient
client
=
new
OkHttpClient
();
Request
request
=
new
Request
.
Builder
().
url
(
url
).
build
();
try
{
Response
response
=
client
.
newCall
(
request
).
execute
();
if
(!
response
.
isSuccessful
())
throw
new
IOException
(
"Unexpected code "
+
response
);
return
response
.
body
().
bytes
();
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
"下载文件失败"
,
e
);
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论