Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cmeeting
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
翟斌
cmeeting
Commits
b87c127c
提交
b87c127c
authored
5月 24, 2025
作者:
duanxincheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
纪要生成服务优化
父级
8a23a94c
全部展开
显示空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
492 行增加
和
323 行删除
+492
-323
pom.xml
+23
-0
src/main/java/com/cmeeting/TencentMeetingCallbackApplication.java
+1
-0
src/main/java/com/cmeeting/config/MasterDataSourceConfig.java
+44
-0
src/main/java/com/cmeeting/config/PrimaryDataSourceConfig.java
+0
-47
src/main/java/com/cmeeting/config/SecondaryDataSourceConfig.java
+0
-47
src/main/java/com/cmeeting/config/SlaveDataSourceConfig.java
+39
-0
src/main/java/com/cmeeting/controller/TencentMeetingController.java
+2
-2
src/main/java/com/cmeeting/email/EmailSender.java
+12
-8
src/main/java/com/cmeeting/job/CmeetingJob.java
+1
-12
src/main/java/com/cmeeting/job/FileProcessTask.java
+0
-0
src/main/java/com/cmeeting/mapper/primary/MeetingInfoMapper.java
+18
-0
src/main/java/com/cmeeting/pojo/MeetingInfo.java
+51
-130
src/main/java/com/cmeeting/service/FileProcessProducer.java
+14
-1
src/main/java/com/cmeeting/service/MeetingInfoService.java
+7
-0
src/main/java/com/cmeeting/service/TecentMeetingService.java
+1
-1
src/main/java/com/cmeeting/service/impl/MeetingInfoServiceImpl.java
+13
-0
src/main/java/com/cmeeting/service/impl/TecentMeetingServiceImpl.java
+49
-25
src/main/java/com/cmeeting/util/MinioUtils.java
+77
-0
src/main/resources/application.properties
+0
-50
src/main/resources/application.yml
+109
-0
src/main/resources/mapper/primary/MeetingInfoMapper.xml
+31
-0
没有找到文件。
pom.xml
浏览文件 @
b87c127c
...
@@ -122,6 +122,11 @@
...
@@ -122,6 +122,11 @@
<version>
2.7.0
</version>
<version>
2.7.0
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
<version>
2.7.0
</version>
<!-- 与你的 Spring Boot 版本保持一致 -->
</dependency>
<dependency>
<groupId>
commons-codec
</groupId>
<groupId>
commons-codec
</groupId>
<artifactId>
commons-codec
</artifactId>
<artifactId>
commons-codec
</artifactId>
<version>
1.15
</version>
<version>
1.15
</version>
...
@@ -313,6 +318,24 @@
...
@@ -313,6 +318,24 @@
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
${mybatis-plus.version}
</version>
<version>
${mybatis-plus.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
io.minio
</groupId>
<artifactId>
minio
</artifactId>
<version>
3.0.10
</version>
<exclusions>
<exclusion>
<groupId>
com.squareup.okhttp3
</groupId>
<artifactId>
okhttp
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
RELEASE
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</dependencies>
...
...
src/main/java/com/cmeeting/TencentMeetingCallbackApplication.java
浏览文件 @
b87c127c
...
@@ -7,6 +7,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
...
@@ -7,6 +7,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@SpringBootApplication
@EnableScheduling
@EnableScheduling
@MapperScan
(
"com.cmeeting.mapper.primary"
)
public
class
TencentMeetingCallbackApplication
{
public
class
TencentMeetingCallbackApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
TencentMeetingCallbackApplication
.
class
,
args
);
SpringApplication
.
run
(
TencentMeetingCallbackApplication
.
class
,
args
);
...
...
src/main/java/com/cmeeting/config/MasterDataSourceConfig.java
0 → 100644
浏览文件 @
b87c127c
package
com
.
cmeeting
.
config
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DataSourceBuilder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
javax.sql.DataSource
;
// 主数据源配置
@Configuration
@MapperScan
(
basePackages
=
"com.cmeeting.mapper.primary"
,
sqlSessionFactoryRef
=
"masterSqlSessionFactory"
)
public
class
MasterDataSourceConfig
{
@Primary
@Bean
(
name
=
"masterDataSource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource.master"
)
public
DataSource
masterDataSource
()
{
return
DataSourceBuilder
.
create
().
build
();
}
@Primary
@Bean
(
name
=
"masterSqlSessionFactory"
)
public
SqlSessionFactory
masterSqlSessionFactory
(
@Qualifier
(
"masterDataSource"
)
DataSource
dataSource
)
throws
Exception
{
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
bean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
().
getResources
(
"classpath:mapper/primary/*.xml"
));
return
bean
.
getObject
();
}
@Primary
@Bean
(
name
=
"masterSqlSessionTemplate"
)
public
SqlSessionTemplate
masterSqlSessionTemplate
(
@Qualifier
(
"masterSqlSessionFactory"
)
SqlSessionFactory
sqlSessionFactory
)
{
return
new
SqlSessionTemplate
(
sqlSessionFactory
);
}
}
\ No newline at end of file
src/main/java/com/cmeeting/config/PrimaryDataSourceConfig.java
deleted
100644 → 0
浏览文件 @
8a23a94c
package
com
.
cmeeting
.
config
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DataSourceBuilder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.jdbc.datasource.DataSourceTransactionManager
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
javax.sql.DataSource
;
@Configuration
@MapperScan
(
basePackages
=
"com.cmeeting.mapper.primary"
,
// 主数据源的 Mapper 包路径
sqlSessionFactoryRef
=
"primarySqlSessionFactory"
)
public
class
PrimaryDataSourceConfig
{
@Bean
(
name
=
"primaryDataSource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource.primary"
)
// 绑定主数据源配置
public
DataSource
primaryDataSource
()
{
return
DataSourceBuilder
.
create
().
build
();
}
@Bean
(
name
=
"primarySqlSessionFactory"
)
public
SqlSessionFactory
primarySqlSessionFactory
(
@Qualifier
(
"primaryDataSource"
)
DataSource
dataSource
)
throws
Exception
{
SqlSessionFactoryBean
factoryBean
=
new
SqlSessionFactoryBean
();
factoryBean
.
setDataSource
(
dataSource
);
// 可额外配置 MyBatis 的 mapperLocations、typeAliases 等
factoryBean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
.
getResources
(
"classpath:mapper/primary/*.xml"
));
return
factoryBean
.
getObject
();
}
@Bean
(
name
=
"primaryTransactionManager"
)
public
PlatformTransactionManager
primaryTransactionManager
(
@Qualifier
(
"primaryDataSource"
)
DataSource
dataSource
)
{
return
new
DataSourceTransactionManager
(
dataSource
);
}
}
\ No newline at end of file
src/main/java/com/cmeeting/config/SecondaryDataSourceConfig.java
deleted
100644 → 0
浏览文件 @
8a23a94c
package
com
.
cmeeting
.
config
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DataSourceBuilder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.jdbc.datasource.DataSourceTransactionManager
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
javax.sql.DataSource
;
@Configuration
@MapperScan
(
basePackages
=
"com.cmeeting.mapper.secondary"
,
// 次数据源的 Mapper 包路径
sqlSessionFactoryRef
=
"secondarySqlSessionFactory"
)
public
class
SecondaryDataSourceConfig
{
@Bean
(
name
=
"secondaryDataSource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource.secondary"
)
// 绑定次数据源配置
public
DataSource
secondaryDataSource
()
{
return
DataSourceBuilder
.
create
().
build
();
}
@Bean
(
name
=
"secondarySqlSessionFactory"
)
public
SqlSessionFactory
secondarySqlSessionFactory
(
@Qualifier
(
"secondaryDataSource"
)
DataSource
dataSource
)
throws
Exception
{
SqlSessionFactoryBean
factoryBean
=
new
SqlSessionFactoryBean
();
factoryBean
.
setDataSource
(
dataSource
);
// 可额外配置 MyBatis 的 mapperLocations、typeAliases 等
// 指定次数据源的 XML 映射文件路径
factoryBean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
.
getResources
(
"classpath:mapper/secondary/*.xml"
));
return
factoryBean
.
getObject
();
}
@Bean
(
name
=
"secondaryTransactionManager"
)
public
PlatformTransactionManager
secondaryTransactionManager
(
@Qualifier
(
"secondaryDataSource"
)
DataSource
dataSource
)
{
return
new
DataSourceTransactionManager
(
dataSource
);
}
}
\ No newline at end of file
src/main/java/com/cmeeting/config/SlaveDataSourceConfig.java
0 → 100644
浏览文件 @
b87c127c
package
com
.
cmeeting
.
config
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DataSourceBuilder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
javax.sql.DataSource
;
// 从数据源配置
@Configuration
@MapperScan
(
basePackages
=
"com.cmeeting.mapper.secondary"
,
sqlSessionFactoryRef
=
"slaveSqlSessionFactory"
)
public
class
SlaveDataSourceConfig
{
@Bean
(
name
=
"slaveDataSource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource.slave"
)
public
DataSource
slaveDataSource
()
{
return
DataSourceBuilder
.
create
().
build
();
}
@Bean
(
name
=
"slaveSqlSessionFactory"
)
public
SqlSessionFactory
slaveSqlSessionFactory
(
@Qualifier
(
"slaveDataSource"
)
DataSource
dataSource
)
throws
Exception
{
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
bean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
().
getResources
(
"classpath:mapper/secondary/*.xml"
));
return
bean
.
getObject
();
}
@Bean
(
name
=
"slaveSqlSessionTemplate"
)
public
SqlSessionTemplate
slaveSqlSessionTemplate
(
@Qualifier
(
"slaveSqlSessionFactory"
)
SqlSessionFactory
sqlSessionFactory
)
{
return
new
SqlSessionTemplate
(
sqlSessionFactory
);
}
}
src/main/java/com/cmeeting/controller/TencentMeetingController.java
浏览文件 @
b87c127c
...
@@ -25,7 +25,7 @@ public class TencentMeetingController {
...
@@ -25,7 +25,7 @@ public class TencentMeetingController {
}
}
@GetMapping
(
"/getMeetingFiles"
)
@GetMapping
(
"/getMeetingFiles"
)
public
void
getMeetingFiles
(
TencentMeetingVO
.
TencentMeetingRequest
requestVO
){
public
void
getMeetingFiles
(){
tecentMeetingService
.
getMeetingFiles
(
requestVO
);
tecentMeetingService
.
getMeetingFiles
();
}
}
}
}
src/main/java/com/cmeeting/email/EmailSender.java
浏览文件 @
b87c127c
...
@@ -2,6 +2,7 @@ package com.cmeeting.email;
...
@@ -2,6 +2,7 @@ package com.cmeeting.email;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
javax.activation.DataHandler
;
import
javax.activation.DataHandler
;
import
javax.activation.DataSource
;
import
javax.activation.DataSource
;
...
@@ -13,12 +14,13 @@ import java.util.Properties;
...
@@ -13,12 +14,13 @@ import java.util.Properties;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
@Slf4j
@Slf4j
@Service
public
class
EmailSender
{
public
class
EmailSender
{
@Value
(
"${email.sender}"
)
@Value
(
"${email.sender}"
)
private
String
SENDER
;
private
String
SENDER
;
@Value
(
"${email.sender
.
pwd}"
)
@Value
(
"${email.sender
-
pwd}"
)
private
String
EMAIL_PWD
;
private
String
EMAIL_PWD
;
@Value
(
"${email.smtp
.
host}"
)
@Value
(
"${email.smtp
-
host}"
)
private
String
SMTP_HOST
;
private
String
SMTP_HOST
;
private
static
final
Integer
MAX_RETRY
=
3
;
private
static
final
Integer
MAX_RETRY
=
3
;
...
@@ -30,10 +32,10 @@ public class EmailSender {
...
@@ -30,10 +32,10 @@ public class EmailSender {
* @param recordFileId 转录文件ID
* @param recordFileId 转录文件ID
* @return
* @return
*/
*/
public
boolean
sendEmailWithAttachment
(
String
toEmail
,
String
subject
,
String
attachmentPath
,
String
recordFileId
)
{
public
boolean
sendEmailWithAttachment
(
String
toEmail
,
String
subject
,
String
attachmentPath
,
String
recordFileId
)
throws
Exception
{
// 邮件服务器配置
// 邮件服务器配置
Properties
props
=
new
Properties
();
Properties
props
=
new
Properties
();
props
.
put
(
"mail.smtp.host"
,
"smtp.office365.com"
);
props
.
put
(
"mail.smtp.host"
,
SMTP_HOST
);
props
.
put
(
"mail.smtp.auth"
,
"true"
);
props
.
put
(
"mail.smtp.auth"
,
"true"
);
// props.put("mail.smtp.port", "465");
// props.put("mail.smtp.port", "465");
...
@@ -50,7 +52,8 @@ public class EmailSender {
...
@@ -50,7 +52,8 @@ public class EmailSender {
Session
session
=
Session
.
getInstance
(
props
,
Session
session
=
Session
.
getInstance
(
props
,
new
javax
.
mail
.
Authenticator
()
{
new
javax
.
mail
.
Authenticator
()
{
protected
PasswordAuthentication
getPasswordAuthentication
()
{
protected
PasswordAuthentication
getPasswordAuthentication
()
{
return
new
PasswordAuthentication
(
"cmeeting_assistant@cimc.com"
,
"scyou@xih45g6@xih4"
);
// return new PasswordAuthentication("cmeeting_assistant@cimc.com", "scyou@xih45g6@xih4");
return
new
PasswordAuthentication
(
SENDER
,
EMAIL_PWD
);
}
}
});
});
String
body
=
"您好:\n"
+
String
body
=
"您好:\n"
+
...
@@ -58,12 +61,12 @@ public class EmailSender {
...
@@ -58,12 +61,12 @@ public class EmailSender {
" 附件为您本次会议的会议纪要,烦请下载查看"
;
" 附件为您本次会议的会议纪要,烦请下载查看"
;
AtomicInteger
retryCount
=
new
AtomicInteger
(
0
);
AtomicInteger
retryCount
=
new
AtomicInteger
(
0
);
try
{
boolean
isSent
=
false
;
boolean
isSent
=
false
;
while
(
retryCount
.
intValue
()
<
MAX_RETRY
&&
!
isSent
){
while
(
retryCount
.
intValue
()
<
MAX_RETRY
&&
!
isSent
){
try
{
// 创建邮件消息
// 创建邮件消息
Message
message
=
new
MimeMessage
(
session
);
Message
message
=
new
MimeMessage
(
session
);
message
.
setFrom
(
new
InternetAddress
(
"cmeeting_assistant@cimc.com"
));
message
.
setFrom
(
new
InternetAddress
(
SENDER
));
message
.
setRecipients
(
Message
.
RecipientType
.
TO
,
message
.
setRecipients
(
Message
.
RecipientType
.
TO
,
InternetAddress
.
parse
(
toEmail
));
InternetAddress
.
parse
(
toEmail
));
message
.
setSubject
(
subject
);
message
.
setSubject
(
subject
);
...
@@ -94,7 +97,6 @@ public class EmailSender {
...
@@ -94,7 +97,6 @@ public class EmailSender {
Transport
.
send
(
message
);
Transport
.
send
(
message
);
log
.
error
(
"邮件已成功发送: recordFileId->{}"
,
recordFileId
);
log
.
error
(
"邮件已成功发送: recordFileId->{}"
,
recordFileId
);
isSent
=
true
;
isSent
=
true
;
}
}
catch
(
MessagingException
e
)
{
}
catch
(
MessagingException
e
)
{
//todo 邮件失败记录
//todo 邮件失败记录
// 异常处理
// 异常处理
...
@@ -112,6 +114,7 @@ public class EmailSender {
...
@@ -112,6 +114,7 @@ public class EmailSender {
}
}
return
false
;
return
false
;
}
}
}
return
true
;
return
true
;
}
}
}
}
\ No newline at end of file
src/main/java/com/cmeeting/job/CmeetingJob.java
浏览文件 @
b87c127c
...
@@ -90,18 +90,7 @@ public class CmeetingJob {
...
@@ -90,18 +90,7 @@ public class CmeetingJob {
logger
.
info
(
"结束时间: "
+
now
.
format
(
formatter
)
+
" | Unix 时间戳: "
+
nowTimestamp
);
logger
.
info
(
"结束时间: "
+
now
.
format
(
formatter
)
+
" | Unix 时间戳: "
+
nowTimestamp
);
logger
.
info
(
"----------------------------------"
);
logger
.
info
(
"----------------------------------"
);
// dojob(beforeDayTimestamp, nowTimestamp);
List
<
TencentMeetingVO
.
RecordFile
>
meetingFiles
=
tecentMeetingService
.
getMeetingFiles
();
AtomicInteger
currentPage
=
new
AtomicInteger
(
1
);
TencentMeetingVO
.
TencentMeetingRequest
request
=
TencentMeetingVO
.
TencentMeetingRequest
.
builder
()
.
page
(
1
)
.
pageSize
(
10
)
.
startTime
(
beforeDayTimestamp
)
.
endTime
(
nowTimestamp
)
.
operatorId
(
tencentAdminUserId
)
.
operatorIdType
(
1
)
.
build
();
List
<
TencentMeetingVO
.
RecordFile
>
meetingFiles
=
tecentMeetingService
.
getMeetingFiles
(
request
);
if
(
meetingFiles
==
null
||
meetingFiles
.
isEmpty
())
{
if
(
meetingFiles
==
null
||
meetingFiles
.
isEmpty
())
{
...
...
src/main/java/com/cmeeting/job/FileProcessTask.java
浏览文件 @
b87c127c
差异被折叠。
点击展开。
src/main/java/com/cmeeting/mapper/primary/MeetingInfoMapper.java
0 → 100644
浏览文件 @
b87c127c
package
com
.
cmeeting
.
mapper
.
primary
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.cmeeting.pojo.MeetingInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Mapper
public
interface
MeetingInfoMapper
extends
BaseMapper
<
MeetingInfo
>
{
void
batchInsert
(
@Param
(
"meetingSaveList"
)
List
<
MeetingInfo
>
meetingSaveList
);
List
<
String
>
getAllMeetingIds
();
}
\ No newline at end of file
src/main/java/com/cmeeting/pojo/MeetingInfo.java
浏览文件 @
b87c127c
package
com
.
cmeeting
.
pojo
;
package
com
.
cmeeting
.
pojo
;
import
java.util.Objects
;
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
;
/**
/**
* 会议信息实体类
* 会议信息实体类
*/
*/
public
class
MeetingInfo
{
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
"cmt_meeting_info"
)
public
class
MeetingInfo
implements
Serializable
{
/**
* 主键id
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
/**
* 会议主题
* 会议主题
*/
*/
...
@@ -17,158 +36,59 @@ public class MeetingInfo {
...
@@ -17,158 +36,59 @@ public class MeetingInfo {
private
String
meetingId
;
private
String
meetingId
;
/**
/**
* 子会议ID
*/
private
String
subMeetingId
;
/**
* 会议号码
* 会议号码
*/
*/
private
String
meetingCode
;
private
String
meetingCode
;
/**
/**
*
用户ID
*
主持人
*/
*/
private
String
user
Id
;
private
String
host
Id
;
/**
/**
*
用户昵称
*
参会人员名单
*/
*/
private
String
nickName
;
private
String
participantUserIds
;
/**
/**
* 会议开始时间(时间戳)
* 会议开始时间(时间戳)
*/
*/
private
Lo
ng
startTime
;
private
Lo
calDateTime
startTime
;
/**
/**
* 会议结束时间(时间戳)
* 会议结束时间(时间戳)
*/
*/
private
Lo
ng
endTime
;
private
Lo
calDateTime
endTime
;
/**
/**
*
参会人数
*
是否生成会议纪要完成
*/
*/
private
Integer
participantsNum
;
private
Boolean
isGenerated
;
/**
/**
*
会议总时长(秒)
*
推送邮件许可 为false不推送
*/
*/
private
Integer
meetingDuration
;
private
Boolean
emailPushAccess
;
/**
/**
*
用户参会时长(秒)
*
是否推送邮件完成
*/
*/
private
Integer
userMeetingDuration
;
private
Boolean
isPushed
;
/**
// 构造方法
* 同步时间
public
MeetingInfo
()
{
*/
}
private
LocalDateTime
syncTime
;
// Getter 和 Setter 方法
public
String
getSubject
()
{
return
subject
;
}
public
void
setSubject
(
String
subject
)
{
this
.
subject
=
subject
;
}
public
String
getMeetingId
()
{
return
meetingId
;
}
public
void
setMeetingId
(
String
meetingId
)
{
this
.
meetingId
=
meetingId
;
}
public
String
getMeetingCode
()
{
return
meetingCode
;
}
public
void
setMeetingCode
(
String
meetingCode
)
{
this
.
meetingCode
=
meetingCode
;
}
public
String
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
Long
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Long
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Long
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Long
endTime
)
{
this
.
endTime
=
endTime
;
}
public
Integer
getParticipantsNum
()
{
return
participantsNum
;
}
public
void
setParticipantsNum
(
Integer
participantsNum
)
{
this
.
participantsNum
=
participantsNum
;
}
public
Integer
getMeetingDuration
()
{
return
meetingDuration
;
}
public
void
setMeetingDuration
(
Integer
meetingDuration
)
{
this
.
meetingDuration
=
meetingDuration
;
}
public
Integer
getUserMeetingDuration
()
{
return
userMeetingDuration
;
}
public
void
setUserMeetingDuration
(
Integer
userMeetingDuration
)
{
this
.
userMeetingDuration
=
userMeetingDuration
;
}
// toString 方法
@Override
public
String
toString
()
{
return
"MeetingInfo{"
+
"subject='"
+
subject
+
'\''
+
", meetingId='"
+
meetingId
+
'\''
+
", meetingCode='"
+
meetingCode
+
'\''
+
", userId='"
+
userId
+
'\''
+
", nickName='"
+
nickName
+
'\''
+
", startTime="
+
startTime
+
", endTime="
+
endTime
+
", participantsNum="
+
participantsNum
+
", meetingDuration="
+
meetingDuration
+
", userMeetingDuration="
+
userMeetingDuration
+
'}'
;
}
// equals 和 hashCode 方法
/**
@Override
* 转录文本
public
boolean
equals
(
Object
o
)
{
*/
if
(
this
==
o
)
return
true
;
private
String
recordContent
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
MeetingInfo
that
=
(
MeetingInfo
)
o
;
return
Objects
.
equals
(
meetingId
,
that
.
meetingId
);
}
@Override
/**
public
int
hashCode
()
{
* 纪要xml
return
Objects
.
hash
(
meetingId
);
*/
}
private
String
recordXml
;
}
}
\ No newline at end of file
src/main/java/com/cmeeting/service/FileProcessProducer.java
浏览文件 @
b87c127c
package
com
.
cmeeting
.
service
;
package
com
.
cmeeting
.
service
;
import
com.cmeeting.email.EmailSender
;
import
com.cmeeting.job.FileProcessTask
;
import
com.cmeeting.job.FileProcessTask
;
import
com.cmeeting.mapper.primary.MeetingInfoMapper
;
import
com.cmeeting.util.MinioUtils
;
import
com.cmeeting.vo.TencentMeetingVO
;
import
com.cmeeting.vo.TencentMeetingVO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -8,6 +11,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -8,6 +11,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -33,6 +37,12 @@ public class FileProcessProducer {
...
@@ -33,6 +37,12 @@ public class FileProcessProducer {
private
String
tencentSecretKey
;
private
String
tencentSecretKey
;
@Value
(
value
=
"${tencent.admin.userId}"
)
@Value
(
value
=
"${tencent.admin.userId}"
)
private
String
tencentAdminUserId
;
private
String
tencentAdminUserId
;
@Resource
private
MeetingInfoMapper
meetingInfoMapper
;
@Resource
private
MinioUtils
minioUtils
;
@Resource
private
EmailSender
emailSender
;
// 批量提交任务
// 批量提交任务
public
void
submitBatchTasks
(
List
<
TencentMeetingVO
.
RecordFile
>
recordFiles
,
String
baseSavePath
)
{
public
void
submitBatchTasks
(
List
<
TencentMeetingVO
.
RecordFile
>
recordFiles
,
String
baseSavePath
)
{
...
@@ -50,7 +60,10 @@ public class FileProcessProducer {
...
@@ -50,7 +60,10 @@ public class FileProcessProducer {
tencentSdkId
,
tencentSdkId
,
tencentSecretId
,
tencentSecretId
,
tencentSecretKey
,
tencentSecretKey
,
tencentAdminUserId
tencentAdminUserId
,
meetingInfoMapper
,
minioUtils
,
emailSender
);
);
// 提交任务到线程池
// 提交任务到线程池
...
...
src/main/java/com/cmeeting/service/MeetingInfoService.java
0 → 100644
浏览文件 @
b87c127c
package
com
.
cmeeting
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.cmeeting.pojo.MeetingInfo
;
public
interface
MeetingInfoService
extends
IService
<
MeetingInfo
>
{
}
src/main/java/com/cmeeting/service/TecentMeetingService.java
浏览文件 @
b87c127c
...
@@ -11,6 +11,6 @@ public interface TecentMeetingService extends IService<TencentMeetingUser> {
...
@@ -11,6 +11,6 @@ public interface TecentMeetingService extends IService<TencentMeetingUser> {
void
doUsers
();
void
doUsers
();
List
<
TencentMeetingVO
.
RecordFile
>
getMeetingFiles
(
TencentMeetingVO
.
TencentMeetingRequest
requestVO
);
List
<
TencentMeetingVO
.
RecordFile
>
getMeetingFiles
();
}
}
src/main/java/com/cmeeting/service/impl/MeetingInfoServiceImpl.java
0 → 100644
浏览文件 @
b87c127c
package
com
.
cmeeting
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.cmeeting.mapper.primary.MeetingInfoMapper
;
import
com.cmeeting.pojo.MeetingInfo
;
import
com.cmeeting.service.MeetingInfoService
;
import
org.springframework.stereotype.Service
;
@Service
public
class
MeetingInfoServiceImpl
extends
ServiceImpl
<
MeetingInfoMapper
,
MeetingInfo
>
implements
MeetingInfoService
{
}
src/main/java/com/cmeeting/service/impl/TecentMeetingServiceImpl.java
浏览文件 @
b87c127c
差异被折叠。
点击展开。
src/main/java/com/cmeeting/util/MinioUtils.java
0 → 100644
浏览文件 @
b87c127c
package
com
.
cmeeting
.
util
;
import
io.minio.MinioClient
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
java.io.ByteArrayInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
@Component
public
class
MinioUtils
{
@Value
(
"${minio.endpoint}"
)
private
String
endpoint
;
@Value
(
"${minio.bucketName}"
)
private
String
bucketName
;
@Value
(
"${minio.accessKey}"
)
private
String
accessKey
;
@Value
(
"${minio.secretKey}"
)
private
String
secretKey
;
private
MinioClient
minioClient
;
public
synchronized
MinioClient
getMinioClient
()
{
try
{
if
(
minioClient
==
null
){
minioClient
=
new
MinioClient
(
endpoint
,
accessKey
,
secretKey
);
}
return
minioClient
;
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
e
);
}
}
public
InputStream
getFile
(
MinioClient
minioClient
,
String
fileName
){
try
{
InputStream
inputStream
=
minioClient
.
getObject
(
bucketName
,
fileName
);
return
inputStream
;
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
e
);
}
}
public
void
upload
(
String
path
,
InputStream
inputStream
)
throws
Exception
{
getMinioClient
().
putObject
(
bucketName
,
path
,
inputStream
,
"application/octet-stream"
);
}
public
void
upload
(
String
path
,
byte
[]
bytes
)
{
try
(
ByteArrayInputStream
inputStream
=
new
ByteArrayInputStream
(
bytes
))
{
// 自动管理流的生命周期,无需手动close
int
data
;
while
((
data
=
inputStream
.
read
())
!=
-
1
)
{
System
.
out
.
print
((
char
)
data
);
}
upload
(
path
,
inputStream
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
public
Boolean
isFileExist
(
MinioClient
minioClient
,
String
fileName
){
boolean
found
=
false
;
try
{
InputStream
inputStream
=
minioClient
.
getObject
(
bucketName
,
fileName
);
found
=
true
;
return
found
;
}
catch
(
Exception
e
){
found
=
false
;
return
false
;
}
}
}
src/main/resources/application.properties
deleted
100644 → 0
浏览文件 @
8a23a94c
server.port
=
8080
# ????????
tencent.meeting.token
=
QQZNb7xWQB47MpZF4C2DFAkv8
tencent.meeting.aesKey
=
agy6ALUePp34lljWz1uIQWa7yQq3dgxxQNmfaN9GROm
# application.yml
# spring.datasource.url=jdbc:mysql://192.168.10.155:3306/cmeeting?useSSL=false&characterEncoding=utf8
# spring.datasource.username=root
# spring.datasource.password=qizhi123
# spring.datasource.driver-class-name=com.mysql.jdbc.Driver
# ?????primary?
spring.datasource.primary.jdbc-url
=
jdbc:mysql://192.168.10.155:3306/robot-standard-enterprise-aigc?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
spring.datasource.primary.username
=
root
spring.datasource.primary.password
=
qizhi123
spring.datasource.primary.driver-class-name
=
com.mysql.jdbc.Driver
# ?????secondary?
spring.datasource.secondary.jdbc-url
=
jdbc:mysql://192.168.10.155:3306/user-admin?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
spring.datasource.secondary.username
=
root
spring.datasource.secondary.password
=
qizhi123
spring.datasource.secondary.driver-class-name
=
com.mysql.jdbc.Driver
# MyBatis ??
# mybatis.mapper-locations=classpath:mapper/primary/*.xml
mybatis.type-aliases-package
=
com.cmeeting.pojo
\
# ??????
mybatis.configuration.map-underscore-to-camel-case: true
logging.level.com.zaxxer.hikari
=
INFO
# tencent meeting
# local
tencent.appId
=
211153201
tencent.sdkId
=
28370276340
tencent.secretId
=
BKOMDZVbvh0iT7k6UHsSizAWBCOVDtT6
tencent.secretKey
=
3Y1j0mzNp7KChKFJGyaEnZHLobFoAQ8eLwfaMx8nLbtXAerO
#tencent.admin.userId=woaJARCQAAJU1EsO73Ww5rn8YHMW6iYA
tencent.admin.userId
=
woaJARCQAAhkyWGuf8n9InhZsxQstjjA
# prod
#tencent.appId=210468336
#tencent.sdkId=28790143843
#tencent.secretId=0ks7u8cgQ8DGVtlYZeRA9TxZCjvUT3oL
#tencent.secretKey=gQU09rkJjiQfiGcUYdhiKq5Ol6LebXg4w7F7Ol0rwvvdv3Xy
#tencent.admin.userId=woaJARCQAAftcvU6GGoOn66rdSZ4IrOA
email.sender
=
cmeeting_assistant@cimc.com
email.sender.pwd
=
scyou@xih45g6@xih4
email.smtp.host
=
smtp.office365.com
src/main/resources/application.yml
0 → 100644
浏览文件 @
b87c127c
server
:
port
:
8080
# ????????
# application.yml
# spring.datasource.url=jdbc:mysql://192.168.10.155:3306/cmeeting?useSSL=false&characterEncoding=utf8
# spring.datasource.username=root
# spring.datasource.password=qizhi123
# spring.datasource.driver-class-name=com.mysql.jdbc.Driver
# ?????primary?
#spring.datasource.primary.jdbc-url=jdbc:mysql://192.168.10.154:3307/aigc-zhongji-test?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
##spring.datasource.primary.username=root
##spring.datasource.primary.password=123456
##spring.datasource.primary.driver-class-name=com.mysql.jdbc.Driver
##
### ?????secondary?
##spring.datasource.secondary.jdbc-url=jdbc:mysql://192.168.10.154:3307/useradmin-zhongji-test?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
##spring.datasource.secondary.username=root
##spring.datasource.secondary.password=123456
##spring.datasource.secondary.driver-class-name=com.mysql.jdbc.Driver
spring
:
datasource
:
# 主数据源
master
:
jdbc-url
:
jdbc:mysql://192.168.10.154:3307/aigc-zhongji-test?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
username
:
root
password
:
123456
driver-class-name
:
com.mysql.jdbc.Driver
# 从数据源
slave
:
jdbc-url
:
jdbc:mysql://192.168.10.154:3307/useradmin-zhongji-test?useSSL=false&characterEncoding=utf8&serverTimezone=UTC
username
:
root
password
:
123456
driver-class-name
:
com.mysql.jdbc.Driver
# MyBatis ??
# mybatis.mapper-locations=classpath:mapper/primary/*.xml
mybatis.type-aliases-package
:
com.cmeeting.pojo\
# ??????
mybatis
:
configuration
:
map-underscore-to-camel-case
:
true
mybatis-plus
:
mapper-locations
:
classpath*:mapper/**/*.xml
configuration
:
map-underscore-to-camel-case
:
true
# 也建议开启
global-config
:
db-config
:
column-underline
:
true
#logging:
# level:
# com:
# zaxxer:
# hikari: INFO
############################################################## minIO
MINIO_ADDRESS
:
http://192.168.10.154:9000
MINIO_BUCKET
:
zhongji
MINIO_USERNAME
:
minio
MINIO_PASSWORD
:
minio123
#Minio服务所在地址
minio.endpoint
:
${MINIO_ADDRESS}
#存储桶名称
minio.bucketName
:
${MINIO_BUCKET}
#访问的key
minio.accessKey
:
${MINIO_USERNAME}
#访问的秘钥
minio.secretKey
:
${MINIO_PASSWORD}
############################################################## minIO
############################################################## tencent meeting
# local
#tencent.appId=211153201
#tencent.sdkId=28370276340
#tencent.secretId=BKOMDZVbvh0iT7k6UHsSizAWBCOVDtT6
#tencent.secretKey=3Y1j0mzNp7KChKFJGyaEnZHLobFoAQ8eLwfaMx8nLbtXAerO
#tencent.admin.userId=woaJARCQAAJU1EsO73Ww5rn8YHMW6iYA
#tencent.admin.userId=woaJARCQAAhkyWGuf8n9InhZsxQstjjA
# prod
tencent
:
appId
:
210468336
sdkId
:
28790143843
secretId
:
0ks7u8cgQ8DGVtlYZeRA9TxZCjvUT3oL
secretKey
:
gQU09rkJjiQfiGcUYdhiKq5Ol6LebXg4w7F7Ol0rwvvdv3Xy
admin.userId
:
woaJARCQAAftcvU6GGoOn66rdSZ4IrOA
meeting
:
token
:
QQZNb7xWQB47MpZF4C2DFAkv8
aesKey
:
agy6ALUePp34lljWz1uIQWa7yQq3dgxxQNmfaN9GROm
email
:
sender
:
cmeeting_assistant@cimc.com
sender-pwd
:
scyou@xih45g6@xih4
smtp-host
:
smtp.office365.com
############################################################## tencent meeting
logging
:
level
:
com.cmeeting.mapper.primary
:
TRACE
com.cmeeting.mapper.secondary
:
TRACE
root
:
DEBUG
\ No newline at end of file
src/main/resources/mapper/primary/MeetingInfoMapper.xml
0 → 100644
浏览文件 @
b87c127c
<?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.MeetingInfoMapper"
>
<insert
id=
"batchInsert"
parameterType=
"list"
>
INSERT IGNORE INTO cmt_meeting_info (subject, meeting_id, meeting_code, host_id, participant_user_ids, start_time,
end_time, is_generated, email_push_access, is_pushed, sync_time, sub_meeting_id, record_content, record_xml)
VALUES
<foreach
collection=
"meetingSaveList"
item=
"meeting"
separator=
","
>
(
#{meeting.subject},
#{meeting.meetingId},
#{meeting.meetingCode},
#{meeting.hostId},
#{meeting.participantUserIds},
#{meeting.startTime},
#{meeting.endTime},
#{meeting.isGenerated},
#{meeting.emailPushAccess},
#{meeting.isPushed},
#{meeting.syncTime},
#{meeting.subMeetingId},
#{meeting.recordContent},
#{meeting.recordXml}
)
</foreach>
</insert>
<select
id=
"getAllMeetingIds"
resultType=
"java.lang.String"
>
select meeting_id from cmt_meeting_info
</select>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论